author | hgs |
Fri, 23 Jul 2010 12:55:58 +0300 | |
changeset 52 | a49bfe5190e4 |
parent 45 | 6b911d05207e |
child 51 | f39ed5e045e0 |
child 65 | 2a5d4ab426d3 |
permissions | -rw-r--r-- |
37 | 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: Handles phone notes. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef PHONENOTECONTROLLER_H |
|
19 |
#define PHONENOTECONTROLLER_H |
|
20 |
||
21 |
#include <QObject> |
|
22 |
#include <QString> |
|
23 |
#include "tphonecmdparamnote.h" |
|
24 |
#include "phoneaction.h" |
|
25 |
||
26 |
// FORWARD DECLARATION |
|
27 |
class TPhoneCommandParam; |
|
28 |
class TPhoneCmdParamQuery; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
29 |
class TPhoneCmdParamGlobalNote; |
37 | 30 |
class HbDeviceMessageBox; |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
31 |
class HbDeviceNotificationDialog; |
37 | 32 |
class HbDeviceProgressDialog; |
33 |
class HbProgressDialog; |
|
34 |
class HbMessageBox; |
|
35 |
class HbAction; |
|
36 |
class QSignalMapper; |
|
37 |
class QTimer; |
|
38 |
||
39 |
||
40 |
class PhoneNoteController : public QObject |
|
41 |
{ |
|
42 |
Q_OBJECT |
|
43 |
||
44 |
public: |
|
45 |
||
46 |
/*! |
|
47 |
\fn PhoneNoteController (QObject *parent) |
|
48 |
*/ |
|
49 |
PhoneNoteController(QObject *parent = 0); |
|
50 |
||
51 |
/*! |
|
52 |
Destructor |
|
53 |
*/ |
|
54 |
virtual ~PhoneNoteController (); |
|
55 |
||
56 |
/*! |
|
57 |
\fn void showGlobalNote () |
|
58 |
||
59 |
This method shows global note. |
|
60 |
||
61 |
*/ |
|
62 |
void showGlobalNote(TPhoneCommandParam *commandParam); |
|
63 |
||
64 |
/*! |
|
65 |
\fn void showNote () |
|
66 |
||
67 |
This method shows a note. |
|
68 |
||
69 |
*/ |
|
70 |
void showNote(TPhoneCommandParam *commandParam); |
|
71 |
||
72 |
/*! |
|
73 |
\fn void showNote () |
|
74 |
||
75 |
This method shows a query. |
|
76 |
||
77 |
*/ |
|
78 |
void showQuery(TPhoneCommandParam *commandParam); |
|
79 |
||
80 |
/*! |
|
81 |
\fn void removeDtmfNote () |
|
82 |
||
83 |
This method removes dtmf note. |
|
84 |
||
85 |
*/ |
|
86 |
void removeDtmfNote(); |
|
87 |
||
88 |
/*! |
|
89 |
\fn void removeNote() |
|
90 |
||
91 |
This method removes notes. |
|
92 |
||
93 |
*/ |
|
94 |
void removeNote(); |
|
95 |
||
96 |
/*! |
|
97 |
\fn void removeQuery() |
|
98 |
||
99 |
This method removes queries. |
|
100 |
||
101 |
*/ |
|
102 |
void removeQuery(); |
|
103 |
||
104 |
/*! |
|
105 |
\fn void removeGlobalWaitNote() |
|
106 |
||
107 |
This method removes global wait note. |
|
108 |
||
109 |
*/ |
|
110 |
void removeGlobalWaitNote(); |
|
111 |
||
112 |
signals: |
|
113 |
||
114 |
/*! |
|
115 |
\fn void command(int command) |
|
116 |
||
117 |
This signal is emitted when note action is handled. |
|
118 |
*/ |
|
119 |
void command (int command); |
|
120 |
||
121 |
private slots: |
|
122 |
||
123 |
/*! |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
124 |
\fn void destroyDialog() |
37 | 125 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
126 |
Slot is called when device message box is closed. |
37 | 127 |
|
128 |
*/ |
|
129 |
void destroyDialog(); |
|
130 |
||
131 |
/*! |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
132 |
\fn void destroyNotification() |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
133 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
134 |
Slot is called when device notification dialog is closed. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
135 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
136 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
137 |
void destroyNotification(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
138 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
139 |
/*! |
37 | 140 |
\fn void removeMappings () |
141 |
||
142 |
Slot is called when note or query is closed. |
|
143 |
||
144 |
*/ |
|
145 |
void removeMappings(); |
|
146 |
||
147 |
/*! |
|
148 |
\fn void queryCancelled () |
|
149 |
||
150 |
Slot is called when query is canceled. |
|
151 |
||
152 |
*/ |
|
153 |
void queryCancelled(); |
|
154 |
||
155 |
/*! |
|
156 |
\fn void queryTimeout () |
|
157 |
||
158 |
Slot is called when query timeout expires. |
|
159 |
||
160 |
*/ |
|
161 |
void queryTimeout(); |
|
162 |
||
163 |
private: |
|
164 |
||
165 |
/*! |
|
166 |
\fn QString globalNoteText() |
|
167 |
||
168 |
This method returns text for global note. |
|
169 |
*/ |
|
170 |
QString globalNoteText(TPhoneCommandParam *commandParam); |
|
171 |
||
172 |
||
173 |
/*! |
|
174 |
\fn void showDtmfNote() |
|
175 |
||
176 |
This method shows dtmf sending note. |
|
177 |
*/ |
|
178 |
void showDtmfNote(TPhoneCmdParamNote* noteParam); |
|
179 |
||
180 |
/*! |
|
181 |
\fn void showDefaultQuery() |
|
182 |
||
183 |
This method shows default query. |
|
184 |
*/ |
|
185 |
void showDefaultQuery(TPhoneCmdParamQuery* params); |
|
186 |
||
187 |
/*! |
|
188 |
\fn void showDefaultQuery() |
|
189 |
||
190 |
This method shows global wait note. |
|
191 |
*/ |
|
192 |
void showGlobalWaitNote(TPhoneCmdParamQuery* params); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
193 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
194 |
/*! |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
195 |
\fn void showDeviceMessageBox() |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
196 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
197 |
This method shows device message box. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
198 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
199 |
void showDeviceMessageBox(TPhoneCmdParamGlobalNote* params); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
200 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
201 |
/*! |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
202 |
\fn void showDeviceNotificationDialog() |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
203 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
204 |
This method shows device notification dialog. |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
205 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
206 |
void showDeviceNotificationDialog(TPhoneCmdParamGlobalNote* params); |
37 | 207 |
|
208 |
private: |
|
209 |
||
210 |
QTimer *m_timer; |
|
211 |
QList<HbDeviceMessageBox *> m_messageBoxList; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
212 |
QList<HbDeviceNotificationDialog* > m_notificationList; |
37 | 213 |
HbDeviceProgressDialog *m_progressDialog; |
214 |
HbProgressDialog *m_dtmfNote; |
|
215 |
HbMessageBox *m_queryNote; |
|
216 |
QSignalMapper *m_signalMapper; |
|
217 |
QList<HbAction*> m_actions; |
|
218 |
int m_queryCanceledCommand; |
|
219 |
int m_timeoutCommand; |
|
220 |
||
221 |
}; |
|
222 |
||
223 |
#endif // PHONENOTECONTROLLER_H |