clock/clockui/clockwidget/inc/analogclock.h
changeset 45 b6db4fd4947b
parent 23 fd30d51f876b
child 46 ecd7b9840282
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: 
       
    15 *
       
    16 */
       
    17 
       
    18 // analogclock.h
       
    19 
       
    20 #ifndef ANALOGCLOCK_H
       
    21 #define ANALOGCLOCK_H
       
    22 
       
    23 #include <QObject>
       
    24 
       
    25 #include <hbwidget.h>
       
    26 #include <hbeffect.h>
       
    27 
       
    28 class QGraphicsWidget;
       
    29 class QStyleOptionGraphicsItem;
       
    30 class QPainter;
       
    31 class HbIconItem;
       
    32 class HbStackedLayout;
       
    33 
       
    34 class AnalogClock : public HbWidget
       
    35 {
       
    36 	Q_OBJECT
       
    37 
       
    38 public:
       
    39 	AnalogClock(QGraphicsWidget *parent = 0);
       
    40 	~AnalogClock();
       
    41 
       
    42 public:
       
    43 	void showNext();
       
    44 	void showPrev();
       
    45 
       
    46 public slots:
       
    47 	void updateDisplay();
       
    48 
       
    49 protected:
       
    50 	void paint(QPainter *painter,
       
    51 	           const QStyleOptionGraphicsItem *option,
       
    52 	           QWidget *widget = 0);
       
    53 
       
    54 private:
       
    55 	void constructImages();
       
    56 
       
    57 private slots:
       
    58 	void widget_hidden(const HbEffect::EffectStatus &status);
       
    59 
       
    60 private:
       
    61 	QString mFaceName;
       
    62 	QString mHourName;
       
    63 	QString mMinuteName;
       
    64 
       
    65 	HbIconItem *mClockFace;
       
    66 	HbIconItem *mHourHand;
       
    67 	HbIconItem *mMinuteHand;
       
    68 	HbStackedLayout* mParentLayout;
       
    69 
       
    70 	bool mIsDay;
       
    71 	bool mFirstDraw;
       
    72 	int mCurrentClock;
       
    73 };
       
    74 
       
    75 #endif // ANALOGCLOCK_P_H
       
    76 
       
    77 // End of file