equal
deleted
inserted
replaced
18 |
18 |
19 #ifndef VIDEOHINTWIDGET_H |
19 #ifndef VIDEOHINTWIDGET_H |
20 #define VIDEOHINTWIDGET_H |
20 #define VIDEOHINTWIDGET_H |
21 |
21 |
22 #include <hbwidget.h> |
22 #include <hbwidget.h> |
|
23 #include <hbicon.h> |
23 |
24 |
24 class HbPushButton; |
25 class HbPushButton; |
25 class HbLabel; |
26 class HbLabel; |
26 class VideoCollectionUiLoader; |
27 class VideoCollectionUiLoader; |
27 class QGraphicsItem; |
28 class QGraphicsItem; |
69 * @param level The current level. |
70 * @param level The current level. |
70 */ |
71 */ |
71 void setLevel(HintLevel level); |
72 void setLevel(HintLevel level); |
72 |
73 |
73 /** |
74 /** |
74 * Overridden from QGraphicsItem. Sets the visibility of this widget. |
75 * Adjusts if the button is shown in landscape. |
75 * |
|
76 * @param visible true if widget is set visible, false othervise. |
|
77 */ |
76 */ |
78 void setVisible(bool visible); |
77 void setButtonShown(bool shown); |
|
78 |
|
79 /** |
|
80 * Method enables and displays this widget. |
|
81 */ |
|
82 void activate(); |
|
83 |
|
84 /** |
|
85 * Method disables and hides this widget. |
|
86 */ |
|
87 void deactivate(); |
79 |
88 |
80 private slots: |
89 private slots: |
81 |
90 |
82 /** |
91 /** |
83 * Method activates correct view based on the given orientation. |
92 * Method activates correct view based on the given orientation. |
84 */ |
93 */ |
85 void orientationChangedSlot(Qt::Orientation orientation); |
94 void orientationChangedSlot(Qt::Orientation orientation); |
86 |
95 |
87 private: |
96 private: |
88 |
|
89 /** |
|
90 * Method enables and displays current active view |
|
91 * |
|
92 * @return int 0 initialization ok, < 0 if fails. |
|
93 */ |
|
94 void activate(); |
|
95 |
|
96 /** |
|
97 * Method disables and hides current active view |
|
98 */ |
|
99 void deactivate(); |
|
100 |
97 |
101 /** |
98 /** |
102 * Shows/hides the correct UI components for current state. |
99 * Shows/hides the correct UI components for current state. |
103 */ |
100 */ |
104 void updateUiComponents(); |
101 void updateUiComponents(); |
109 |
106 |
110 /** |
107 /** |
111 * Pointer to the XML UI (DocML) loader, not owned |
108 * Pointer to the XML UI (DocML) loader, not owned |
112 */ |
109 */ |
113 VideoCollectionUiLoader *mUiLoader; |
110 VideoCollectionUiLoader *mUiLoader; |
114 |
|
115 /** |
|
116 * Service button object. |
|
117 */ |
|
118 HbPushButton *mServiceButton; |
|
119 |
|
120 /** |
|
121 * Hint text label (ie. the second row label). |
|
122 */ |
|
123 HbLabel *mHintLabel; |
|
124 |
111 |
125 /** |
112 /** |
126 * Service icon resource string. |
113 * Service icon resource string. |
127 */ |
114 */ |
128 QString mServiceIconString; |
115 QString mServiceIconString; |
136 * Service icon. |
123 * Service icon. |
137 */ |
124 */ |
138 HbIcon *mServiceIcon; |
125 HbIcon *mServiceIcon; |
139 |
126 |
140 /** |
127 /** |
|
128 * Add videos icon. |
|
129 */ |
|
130 HbIcon *mAddVideosIcon; |
|
131 |
|
132 /** |
141 * Current hint level. |
133 * Current hint level. |
142 */ |
134 */ |
143 HintLevel mCurrentLevel; |
135 HintLevel mCurrentLevel; |
|
136 |
|
137 /** |
|
138 * If button is shown in landscape at all. |
|
139 */ |
|
140 bool mButtonShown; |
|
141 |
|
142 /** |
|
143 * true if widget has been activated. |
|
144 */ |
|
145 bool mActivated; |
144 |
146 |
145 }; |
147 }; |
146 |
148 |
147 #endif // VIDEOHINTWIDGET_H |
149 #endif // VIDEOHINTWIDGET_H |