27 |
27 |
28 // Forward declarations |
28 // Forward declarations |
29 class QGraphicsSceneMouseEvent; |
29 class QGraphicsSceneMouseEvent; |
30 class QGraphicsLinearLayout; |
30 class QGraphicsLinearLayout; |
31 class QTranslator; |
31 class QTranslator; |
|
32 class QGestureEvent; |
32 class HbDialog; |
33 class HbDialog; |
33 class HbIconItem; |
34 class HbIconItem; |
34 class HbMarqueeItem; |
35 class HbMarqueeItem; |
35 class HbLabel; |
36 class HbLabel; |
36 class HbCheckBox; |
37 class HbCheckBox; |
37 class HbPushButton; |
38 class HbPushButton; |
38 class HbFrameItem; |
39 class HbFrameItem; |
39 class HbAction; |
40 class HbAction; |
40 class InfoWidgetEngine; |
41 class InfoWidgetEngine; |
41 class InfoWidgetPreferences; |
42 class InfoWidgetPreferences; |
42 |
43 |
|
44 |
43 // Class declaration |
45 // Class declaration |
44 class InfoWidget : public HbWidget |
46 class InfoWidget : public HbWidget |
45 { |
47 { |
46 Q_OBJECT |
48 Q_OBJECT |
47 |
49 |
79 void setSatDisplay(QString value); |
81 void setSatDisplay(QString value); |
80 QString spnDisplay(); |
82 QString spnDisplay(); |
81 void setSpnDisplay(QString value); |
83 void setSpnDisplay(QString value); |
82 |
84 |
83 protected: |
85 protected: |
84 void mousePressEvent(QGraphicsSceneMouseEvent *event); |
86 void gestureEvent(QGestureEvent *event); |
85 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); |
|
86 void mouseMoveEvent(QGraphicsSceneMouseEvent *event); |
|
87 void changeEvent(QEvent *event); |
87 void changeEvent(QEvent *event); |
88 void timerEvent(QTimerEvent *event); |
88 void timerEvent(QTimerEvent *event); |
89 |
89 |
90 void updateInfoDisplay(); |
90 void updateInfoDisplay(); |
91 bool readPersistentPreferences(); |
91 bool readPersistentPreferences(); |
92 void initializeCheckBoxStates(); |
92 void initializeCheckBoxStates(); |
93 bool installTranslator(QString translationFile); |
|
94 void removeTranslators(); |
|
95 |
93 |
96 private: |
94 private: |
97 void updateItemsVisibility(); |
95 void updateItemsVisibility(); |
98 void layoutInfoDisplay(); |
96 void layoutInfoDisplay(); |
99 void updateInfoDisplayItem( |
97 void updateInfoDisplayItem( |
131 void setPreferences(const QStringList &names); |
129 void setPreferences(const QStringList &names); |
132 |
130 |
133 private: |
131 private: |
134 Q_DISABLE_COPY(InfoWidget) |
132 Q_DISABLE_COPY(InfoWidget) |
135 |
133 |
136 // Engine for widget, owned |
134 // Guarded objects, owned |
137 QScopedPointer<InfoWidgetEngine> m_engine; |
135 QScopedPointer<InfoWidgetEngine> m_engine; |
138 |
|
139 // Widget preference store, owned |
|
140 QScopedPointer<InfoWidgetPreferences> m_preferences; |
136 QScopedPointer<InfoWidgetPreferences> m_preferences; |
|
137 QScopedPointer<InfoWidgetLayoutManager> m_layoutManager; |
141 |
138 |
142 // Layout manager for widget, owned |
139 // Widget main layout, not owned |
143 QScopedPointer<InfoWidgetLayoutManager> m_layoutManager; |
|
144 |
|
145 // Translators, owned |
|
146 QList<QTranslator *> m_translators; |
|
147 |
|
148 // Current widget layout, not owned |
|
149 QGraphicsLinearLayout *m_layout; |
140 QGraphicsLinearLayout *m_layout; |
150 |
141 |
151 // Currently animating item(s), not owned |
142 // Currently animating item(s), not owned |
152 HbMarqueeItem *m_animatingItem; |
143 HbMarqueeItem *m_animatingItem; |
153 QList<HbMarqueeItem *> m_animatingItems; |
144 QList<HbMarqueeItem *> m_animatingItems; |