|
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: 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 //class SnsrLabel; |
|
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 // TODO: not known yet what label (or any) is shown in clock face (day or am/pm or none) |
|
56 //HbIconItem *mClockDateFrame; |
|
57 //SnsrLabel *mClockDateLabel; |
|
58 |
|
59 Q_DISABLE_COPY(SnsrOledClockWidget) |
|
60 SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets) |
|
61 |
|
62 }; |
|
63 |
|
64 #endif // SNSROLEDCLOCKWIDGET_H |