clock/clockui/clockwidget/clockwidgetimpl/inc/analogclockwidget.h
changeset 45 b6db4fd4947b
child 55 2c54b51f39c4
equal deleted inserted replaced
23:fd30d51f876b 45:b6db4fd4947b
       
     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:  Clock widget
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef ANALOGCLOCKWIDGET_H
       
    19 #define ANALOGCLOCKWIDGET_H
       
    20 
       
    21 // User includes 
       
    22 #include <hbwidget.h>
       
    23 #include <QPointer>
       
    24 
       
    25 // Forward declarations
       
    26 class HbIconItem;
       
    27 class QTimer;
       
    28 
       
    29 class AnalogClockWidget : public HbWidget
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34     AnalogClockWidget(QGraphicsItem *parent = 0);
       
    35     virtual ~AnalogClockWidget();
       
    36 
       
    37 public slots:
       
    38     void tick();
       
    39 
       
    40 protected:
       
    41     void resizeEvent(QGraphicsSceneResizeEvent *event);
       
    42     void polish(HbStyleParameters& params);
       
    43 
       
    44 private:    
       
    45     void updatePrimitives();
       
    46 
       
    47 private:
       
    48     QPointer<QTimer>     mTimer;
       
    49     QPointer<HbIconItem> mClockBackground;
       
    50     QPointer<HbIconItem> mClockHourHand;
       
    51     QPointer<HbIconItem> mClockMinuteHand;
       
    52     QPointer<HbIconItem> mClockSecondHand;
       
    53 };
       
    54 
       
    55 #endif
       
    56 
       
    57 // End of file  --Don't remove this.