screensaver/snsrplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsranalogclockwidget.h
changeset 97 66b5fe3c07fd
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:  Analog Clock Widget.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SNSRANALOGCLOCKWIDGET_H
       
    19 #define SNSRANALOGCLOCKWIDGET_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 class SnsrAnalogClockWidget: public HbWidget
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34 
       
    35     explicit SnsrAnalogClockWidget(QGraphicsItem *parent = 0);
       
    36     virtual ~SnsrAnalogClockWidget();
       
    37 
       
    38 public slots:
       
    39 
       
    40     void tick();
       
    41     
       
    42 protected:
       
    43 
       
    44     virtual void changeEvent(QEvent *event);
       
    45 
       
    46 private:
       
    47 
       
    48     void resizeEvent (QGraphicsSceneResizeEvent *event);
       
    49     void createPrimitives();
       
    50     void updatePrimitives();
       
    51     void polish( HbStyleParameters& params );
       
    52 
       
    53 private:
       
    54 
       
    55     HbIconItem *mClockBackground;
       
    56     HbIconItem *mClockHourHand;
       
    57     HbIconItem *mClockMinuteHand;
       
    58     HbIconItem *mClockSecondHand;
       
    59     HbTextItem *mClockAmPmLabel;
       
    60 
       
    61     Q_DISABLE_COPY(SnsrAnalogClockWidget)
       
    62     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets)
       
    63 
       
    64 };
       
    65 
       
    66 #endif // SNSRANALOGCLOCKWIDGET_H