screensaverapp/screensaverproviders/snsrbigclockscreensaverprovider/snsrclockwidgets/inc/snsranalogclockwidget.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:  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 QGraphicsItem;
       
    27 
       
    28 class SnsrAnalogClockWidget: public HbWidget
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33 
       
    34     explicit SnsrAnalogClockWidget(QGraphicsItem *parent = 0);
       
    35     virtual ~SnsrAnalogClockWidget();
       
    36 
       
    37 public slots:
       
    38 
       
    39     void tick();
       
    40 
       
    41 private:
       
    42 
       
    43     void resizeEvent (QGraphicsSceneResizeEvent *event);
       
    44     void createPrimitives();
       
    45     void updatePrimitives();
       
    46 
       
    47 private:
       
    48 
       
    49     QString mStylePluginName;
       
    50 
       
    51     QGraphicsItem *mClockBackground;
       
    52     QGraphicsItem *mClockHourHand;
       
    53     QGraphicsItem *mClockMinuteHand;
       
    54 
       
    55     Q_DISABLE_COPY(SnsrAnalogClockWidget)
       
    56     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets)
       
    57 
       
    58 };
       
    59 
       
    60 #endif // SNSRANALOGCLOCKWIDGET_H