author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 00:16:48 +0300 | |
changeset 77 | 2be0b271d017 |
parent 72 | c76a0b1755b9 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2009-2010 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
#ifndef CPBARRINGPLUGINGROUP_H |
|
18 |
#define CPBARRINGPLUGINGROUP_H |
|
19 |
||
20 |
#include <QQueue> |
|
21 |
#include <cpsettingformitemdata.h> |
|
22 |
#include <psetcallbarringwrapper.h> |
|
23 |
||
24 |
class PSetWrapper; |
|
25 |
class QModelIndex; |
|
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
26 |
class PsUiNotes; |
37 | 27 |
class QValidator; |
28 |
class HbDataFormModel; |
|
29 |
||
30 |
||
31 |
/*! |
|
32 |
\class CpBarringPluginGroup |
|
33 |
\brief The class CpBarringPluginGroup defines barring items shown on UI. |
|
34 |
*/ |
|
35 |
class CpBarringPluginGroup : public CpSettingFormItemData |
|
36 |
{ |
|
37 |
Q_OBJECT |
|
38 |
||
39 |
public: |
|
40 |
||
41 |
// Change barring password operation phases |
|
42 |
enum ChangeBarringPasswordPhase |
|
43 |
{ |
|
44 |
NonePhase, |
|
45 |
CurrentPasswordPhase, |
|
46 |
NewPasswordPhase, |
|
47 |
VerifyNewPasswordPhase |
|
48 |
}; |
|
49 |
||
50 |
explicit CpBarringPluginGroup(CpItemDataHelper &helper); |
|
51 |
~CpBarringPluginGroup(); |
|
52 |
||
53 |
public slots: |
|
54 |
||
55 |
void itemShown(const QModelIndex& item); |
|
56 |
||
57 |
private: |
|
58 |
||
59 |
void setupConnectionsToWrapper(); |
|
60 |
||
61 |
void createBarringItems(); |
|
62 |
CpSettingFormItemData *createBarringItem( |
|
63 |
const HbDataFormModelItem::DataItemType &itemType, |
|
64 |
const QString &label, |
|
65 |
const QString &widgetTextData, |
|
66 |
const PSetCallBarringWrapper::BarringType &barringType); |
|
67 |
||
68 |
void processBarringStatusRequestQueue(); |
|
69 |
bool updateDependentBarringProgramStatuses( |
|
70 |
const CpSettingFormItemData &changedBarringItem); |
|
71 |
CpSettingFormItemData &barringItemByProgram( |
|
72 |
const PSetCallBarringWrapper::BarringType &barringProgram); |
|
73 |
void revertCheckStateOfItem( |
|
74 |
CpSettingFormItemData *barringItem); |
|
75 |
void updateCheckStateOfItem( |
|
76 |
CpSettingFormItemData &barringItem, |
|
77 |
const Qt::CheckState &newState); |
|
78 |
||
79 |
private slots: |
|
80 |
||
81 |
void barringStatusRequestCompleted( |
|
82 |
int result, |
|
83 |
const QList<unsigned char> & basicServiceGroupIds, |
|
84 |
PSetCallBarringWrapper::BarringStatus status); |
|
85 |
||
86 |
void enableBarringRequestCompleted( |
|
87 |
int result, |
|
88 |
PSetCallBarringWrapper::BarringType barringType, |
|
89 |
PSetCallBarringWrapper::BarringStatus barringStatus, |
|
90 |
bool plural); |
|
91 |
||
92 |
void disableBarringRequestCompleted( |
|
93 |
int result, |
|
94 |
PSetCallBarringWrapper::BarringType barringType, |
|
95 |
PSetCallBarringWrapper::BarringStatus barringStatus, |
|
96 |
bool plural); |
|
97 |
||
98 |
void barringPasswordChangeRequestCompleted(int result); |
|
99 |
||
100 |
void changeBarringStateRequested(int checkState); |
|
101 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
102 |
void changeBarringPasswordRequested(); |
37 | 103 |
|
104 |
void completeBarringStateChangeRequestHandling( |
|
105 |
QString barringPassword, |
|
106 |
bool okPressed); |
|
107 |
||
108 |
void changeBarringPasswordPhasesHandling( |
|
109 |
QString barringPassword, |
|
110 |
bool okPressed); |
|
111 |
||
112 |
private: |
|
113 |
||
114 |
CpItemDataHelper &m_helper; |
|
115 |
QScopedPointer<PSetWrapper> m_pSetWrapper; |
|
116 |
PSetCallBarringWrapper *m_barringWrapper; |
|
117 |
CpSettingFormItemData *m_editBarringPasswordItem; |
|
118 |
QQueue<CpSettingFormItemData *> m_barringRequestQueue; |
|
119 |
bool m_barringStatusRequestOngoing; |
|
120 |
int m_activeNoteId; |
|
72
c76a0b1755b9
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
56
diff
changeset
|
121 |
int m_activeProgressNoteId; |
56
5bcb308bd24d
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
122 |
PsUiNotes* m_phoneNotes; |
37 | 123 |
QValidator *m_barringPasswordValidator; |
124 |
bool m_delayedBarringActivationNote; |
|
125 |
CpSettingFormItemData* m_clickedBarringItem; // Not own. |
|
126 |
ChangeBarringPasswordPhase m_changeBarringPasswordPhase; |
|
127 |
QString m_currentPassword; |
|
128 |
QString m_newPassword; |
|
129 |
QString m_newPasswordVerified; |
|
130 |
QValidator* m_verifyPasswordValidator; // Own. |
|
131 |
HbDataFormModel* m_model; |
|
132 |
}; |
|
133 |
||
134 |
#endif // CPBARRINGPLUGINGROUP_H |