screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/inc/snsrbigclockcontainer.h
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 42 517f4fb5ec74
child 46 23b5d6a29cce
equal deleted inserted replaced
36:cdae8c6c3876 39:4e8ebe173323
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:  Base class container.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SNSRBIGCLOCKCONTAINER_H
       
    19 #define SNSRBIGCLOCKCONTAINER_H
       
    20 
       
    21 #include <hbwidget.h>
       
    22 
       
    23 #include "snsrtest_global.h"
       
    24 #include "snsrdocumentloader.h"
       
    25 
       
    26 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverProvider)
       
    27 
       
    28 class QGraphicsLinearLayout;
       
    29 
       
    30 class SnsrBigClockContainer : public HbWidget
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34 public:
       
    35 
       
    36     SnsrBigClockContainer();
       
    37     ~SnsrBigClockContainer();
       
    38 
       
    39 public slots:
       
    40 
       
    41     virtual void update() = 0;
       
    42     virtual void changeLayout(Qt::Orientation orientation) = 0;
       
    43 
       
    44 protected:
       
    45 
       
    46     virtual void changeEvent(QEvent * event);
       
    47 
       
    48 private:
       
    49 
       
    50     void setBackgroundColor(); 
       
    51     void paint(
       
    52             QPainter *painter,
       
    53             const QStyleOptionGraphicsItem *option,
       
    54             QWidget *widget = 0
       
    55             );
       
    56 
       
    57 protected:
       
    58 
       
    59     QGraphicsWidget *mMainContainer;
       
    60     QGraphicsLinearLayout *mBackgroundContainerLayout;
       
    61 
       
    62     SnsrDocumentLoader mDocumentLoader;
       
    63     QObjectList mDocumentObjects;
       
    64 
       
    65     int mCurrentOrientation;
       
    66 
       
    67 private:
       
    68 
       
    69     QColor mBackgroundColor;
       
    70 
       
    71     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverProvider)
       
    72 };
       
    73 
       
    74 #endif // SNSRBIGCLOCKCONTAINER_H