author | hgs |
Fri, 15 Oct 2010 12:58:46 +0300 | |
changeset 78 | baacf668fe89 |
parent 76 | cfea66083b62 |
permissions | -rw-r--r-- |
37 | 1 |
/*! |
78 | 2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
37 | 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: Phone UI's Qt view. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef PHONEUIQTVIEW_H |
|
19 |
#define PHONEUIQTVIEW_H |
|
20 |
||
21 |
#include <QObject> |
|
22 |
#include <hbview.h> |
|
23 |
#include "phoneuiqtviewif.h" |
|
24 |
#include <bubblemanagerif.h> |
|
25 |
||
26 |
class HbAction; |
|
78 | 27 |
class PhoneUIQtViewPrivate; |
37 | 28 |
|
29 |
#ifdef BUILD_PHONEUIQTVIEW |
|
30 |
#define PHONEUIQTVIEW_EXPORT Q_DECL_EXPORT |
|
31 |
#else |
|
32 |
#define PHONEUIQTVIEW_EXPORT Q_DECL_IMPORT |
|
33 |
#endif |
|
34 |
||
35 |
||
36 |
||
37 |
class PHONEUIQTVIEW_EXPORT PhoneUIQtView : public HbView, public PhoneUIQtViewIF |
|
38 |
{ |
|
39 |
Q_OBJECT |
|
40 |
||
41 |
public: |
|
42 |
||
43 |
/*! |
|
44 |
Constructor |
|
45 |
*/ |
|
78 | 46 |
PhoneUIQtView(HbMainWindow &window, QGraphicsItem *parent = 0); |
37 | 47 |
|
48 |
/*! |
|
49 |
Destructor |
|
50 |
*/ |
|
78 | 51 |
virtual ~PhoneUIQtView(); |
37 | 52 |
|
53 |
/*! |
|
54 |
\fn void PhoneUIQtView::bubbleManager () |
|
55 |
||
56 |
Returns BubbleManager interface. |
|
57 |
*/ |
|
58 |
BubbleManagerIF& bubbleManager(); |
|
59 |
||
60 |
/*! |
|
61 |
\fn void PhoneUIQtView::addBubbleCommand () |
|
62 |
||
63 |
Adds new command to bubble. Command id will be emitted as |
|
78 | 64 |
a parameter from view's command(int) signal. Ownership transferred. |
37 | 65 |
*/ |
78 | 66 |
void addBubbleCommand(int bubbleId, HbAction* action); |
37 | 67 |
|
68 |
/*! |
|
69 |
\fn void PhoneUIQtView::clearBubbleCommands () |
|
70 |
||
71 |
Clears commands from bubble. |
|
72 |
*/ |
|
78 | 73 |
void clearBubbleCommands(int bubbleId); |
37 | 74 |
|
75 |
/*! |
|
76 |
\fn void PhoneUIQtView::addParticipantListAction () |
|
77 |
||
78 |
Adds new patricipant list command to conference bubble. |
|
79 |
*/ |
|
80 |
void addParticipantListAction(int commandId, const QString &text, const HbIcon &icon); |
|
81 |
||
82 |
/*! |
|
83 |
\fn void PhoneUIQtView::clearBubbleCommands () |
|
84 |
||
85 |
Clears participant list commands from conference bubble. |
|
86 |
*/ |
|
87 |
void clearParticipantListActions(); |
|
88 |
||
89 |
/*! |
|
90 |
\fn void PhoneUIQtViewIF::setToolbarActions() |
|
91 |
||
78 | 92 |
Sets toolbar actions. Ownership transferred. |
37 | 93 |
*/ |
78 | 94 |
void setToolbarActions(const QList<HbAction *> &actions); |
37 | 95 |
|
96 |
/*! |
|
97 |
\fn void PhoneUIQtView::hideToolbar () |
|
98 |
||
99 |
Hides toolbar. |
|
100 |
*/ |
|
78 | 101 |
void hideToolbar(); |
37 | 102 |
|
103 |
/*! |
|
104 |
\fn void PhoneUIQtView::showToolbar () |
|
105 |
||
106 |
Shows toolbar. |
|
107 |
*/ |
|
78 | 108 |
void showToolbar(); |
37 | 109 |
|
110 |
/*! |
|
111 |
\fn void PhoneUIQtView::volumeSliderValue () |
|
112 |
||
113 |
Returns HbVolumeSliderPopup's volume value. |
|
114 |
If this volume slider isn't active -1 is returned. |
|
115 |
*/ |
|
78 | 116 |
int volumeSliderValue(); |
37 | 117 |
|
118 |
/*! |
|
119 |
\fn void PhoneUIQtView::setVolumeSliderValue (int value) |
|
120 |
||
121 |
Sets slider value to HbVolumeSliderPopup. |
|
122 |
*/ |
|
78 | 123 |
void setVolumeSliderValue( |
37 | 124 |
int value, |
125 |
int commandId, |
|
126 |
int maxVolumeValue, |
|
127 |
int minVolumeValue); |
|
78 | 128 |
|
37 | 129 |
/*! |
78 | 130 |
\fn void PhoneUIQtView::removeVolumeSlider() |
37 | 131 |
|
132 |
Removes HbVolumeSliderPopup. |
|
133 |
*/ |
|
78 | 134 |
void removeVolumeSlider(); |
135 |
||
37 | 136 |
/*! |
137 |
\fn void PhoneUIQtView::setExpandAction () |
|
138 |
||
139 |
Sets expand action. |
|
140 |
*/ |
|
141 |
void setExpandAction(int bubbleId, int commandId); |
|
142 |
||
143 |
/*! |
|
144 |
\fn void PhoneUIQtView::removeExpandAction () |
|
145 |
||
146 |
Removes expand action. |
|
147 |
*/ |
|
148 |
void removeExpandAction(int bubbleId); |
|
149 |
||
150 |
/*! |
|
151 |
\fn void PhoneUIQtView::showDialpad() |
|
152 |
||
153 |
Shows dialpad widget. |
|
154 |
*/ |
|
155 |
void showDialpad(); |
|
156 |
||
157 |
/*! |
|
158 |
\fn void PhoneUIQtView::hideDialpad() |
|
159 |
||
160 |
Hides dialer widget. |
|
161 |
*/ |
|
162 |
void hideDialpad(); |
|
163 |
||
164 |
/*! |
|
165 |
\fn void PhoneUIQtView::isDialpadVisible() |
|
166 |
||
167 |
Checks is dialpad visible. |
|
168 |
*/ |
|
169 |
bool isDialpadVisible(); |
|
170 |
||
171 |
/*! |
|
172 |
\fn void PhoneUIQtView::dialpadText() |
|
173 |
||
174 |
Returns content of the dialpad. |
|
175 |
*/ |
|
176 |
QString dialpadText(); |
|
177 |
||
178 |
/*! |
|
179 |
\fn void PhoneUIQtView::dialpadString() |
|
180 |
||
181 |
Clears and hides dialpad. |
|
182 |
*/ |
|
183 |
void clearAndHideDialpad(); |
|
184 |
||
185 |
/*! |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
186 |
\fn void PhoneUIQtView::clearDialpad() |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
187 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
188 |
Clears text from dialpad. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
189 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
190 |
void clearDialpad(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
191 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
192 |
/*! |
37 | 193 |
\fn void PhoneUIQtView::bringToForeground() |
194 |
||
195 |
Brings to foreground. |
|
196 |
*/ |
|
197 |
void bringToForeground(); |
|
198 |
||
199 |
/*! |
|
78 | 200 |
\fn void PhoneUIQtViewIF::hide() |
201 |
||
202 |
Lowers the phone to the bottom of the stack. |
|
203 |
*/ |
|
204 |
void hide(); |
|
205 |
||
206 |
/*! |
|
37 | 207 |
\fn void PhoneUIQtViewIF::setToolbarActions() |
208 |
||
78 | 209 |
Sets menu actions for call handling. Ownership transferred. |
37 | 210 |
*/ |
78 | 211 |
void setMenuActions(const QList<HbAction *> &actions); |
37 | 212 |
|
213 |
/*! |
|
214 |
\fn void PhoneUIQtView::setBackButtonVisible() |
|
215 |
||
216 |
Set the Back command visibility in TitleBar |
|
217 |
*/ |
|
218 |
void setBackButtonVisible(bool visible); |
|
219 |
||
220 |
/*! |
|
221 |
\fn void PhoneUIQtViewIF::menuReference() |
|
222 |
||
223 |
Returns HbMenu reference. |
|
224 |
*/ |
|
225 |
HbMenu &menuReference(); |
|
226 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
227 |
/*! |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
228 |
\fn void PhoneUIQtViewIF::captureKey() |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
229 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
230 |
Captures key. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
231 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
232 |
void captureKey(Qt::Key key, bool capture); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
233 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
234 |
/* |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
235 |
\fn void setRestrictedMode() |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
236 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
237 |
Sets Ui to restricted mode. Decides which keyevent are allowed. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
238 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
239 |
void setRestrictedMode(bool restrictedMode); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
240 |
|
37 | 241 |
/*! |
242 |
\fn void PhoneUIQtView::shutdownPhoneApp() |
|
243 |
||
244 |
Shutdown phone application. |
|
245 |
*/ |
|
246 |
void shutdownPhoneApp(); |
|
247 |
signals: |
|
248 |
||
249 |
/*! |
|
250 |
\fn void keyPressed (QKeyEvent *event) |
|
251 |
||
252 |
This signal is emitted when key is pressed down. |
|
253 |
*/ |
|
78 | 254 |
void keyPressed(QKeyEvent *event); |
37 | 255 |
|
256 |
/*! |
|
257 |
\fn void keyPressed (QKeyEvent *event) |
|
258 |
||
259 |
This signal is emitted when key is released. |
|
260 |
*/ |
|
78 | 261 |
void keyReleased(QKeyEvent *event); |
37 | 262 |
|
263 |
/*! |
|
264 |
\fn void command(int command) |
|
265 |
||
266 |
This signal is emitted when UI action is handled. |
|
267 |
*/ |
|
78 | 268 |
void command(int command); |
37 | 269 |
|
270 |
/*! |
|
271 |
\fn void dialpadIsAboutToClose() |
|
272 |
||
273 |
This signal is emitted when dialpad is about to close. |
|
274 |
*/ |
|
275 |
void dialpadIsAboutToClose(); |
|
276 |
||
277 |
/*! |
|
278 |
\fn void windowActivated(); |
|
279 |
||
280 |
This signal is emitted when window is activated |
|
281 |
*/ |
|
282 |
void windowActivated(); |
|
283 |
||
284 |
/*! |
|
285 |
\fn void windowDeactivated(); |
|
286 |
||
287 |
This signal is emitted when window is deactivated |
|
288 |
*/ |
|
289 |
void windowDeactivated(); |
|
290 |
||
78 | 291 |
public slots: |
37 | 292 |
/*! |
78 | 293 |
\fn void handleOrientationChange(Qt::Orientation orientation) |
37 | 294 |
*/ |
78 | 295 |
void handleOrientationChange(Qt::Orientation orientation); |
37 | 296 |
|
297 |
private: |
|
78 | 298 |
friend class PhoneUIQtViewPrivate; |
299 |
PhoneUIQtViewPrivate *m_priv; |
|
37 | 300 |
}; |
301 |
||
302 |
#endif // PHONEUIQTVIEW_H |