screensaver/snsrplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledclockwidget.h
changeset 97 66b5fe3c07fd
child 98 e6f74eb7f69f
equal deleted inserted replaced
95:32e56106abf2 97:66b5fe3c07fd
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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: Oled Clock Widget.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SNSROLEDCLOCKWIDGET_H
       
    19 #define SNSROLEDCLOCKWIDGET_H
       
    20 
       
    21 #include <hbwidget.h>
       
    22 #include "snsrtest_global.h"
       
    23 
       
    24 SCREENSAVER_TEST_CLASS(T_SnsrClockWidgets)
       
    25 
       
    26 class HbIconItem;
       
    27 class HbTextItem;
       
    28 
       
    29 
       
    30 class SnsrOledClockWidget: public HbWidget
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34 public:
       
    35 
       
    36     explicit SnsrOledClockWidget(QGraphicsItem *parent = 0);
       
    37     virtual ~SnsrOledClockWidget();
       
    38 
       
    39 public slots:
       
    40 
       
    41     void tick();
       
    42 
       
    43 private:
       
    44 
       
    45     void resizeEvent (QGraphicsSceneResizeEvent *event);
       
    46     void createPrimitives();
       
    47     void updatePrimitives();
       
    48     void polish( HbStyleParameters& params );
       
    49 
       
    50 private:
       
    51 
       
    52     HbIconItem *mClockBackground;
       
    53     HbIconItem *mClockHourHand;
       
    54     HbIconItem *mClockMinuteHand;
       
    55     HbTextItem *mClockAmPmLabel;
       
    56     
       
    57     Q_DISABLE_COPY(SnsrOledClockWidget)
       
    58     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets)
       
    59 
       
    60 };
       
    61 
       
    62 #endif // SNSROLEDCLOCKWIDGET_H