author | hgs |
Mon, 04 Oct 2010 16:06:10 +0300 | |
changeset 76 | cfea66083b62 |
parent 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef CPNETWORKPLUGINFORM_H |
|
19 |
#define CPNETWORKPLUGINFORM_H |
|
20 |
||
21 |
#include <hbdataform.h> |
|
22 |
#include <QStringList> |
|
23 |
#include <QSharedPointer> |
|
24 |
#include <psetnetworkwrapper.h> |
|
25 |
#include <hbmessagebox.h> |
|
26 |
||
27 |
class HbDataFormModelItem; |
|
76 | 28 |
class SettingsWrapper; |
37 | 29 |
class PSetWrapper; |
30 |
class HbListWidget; |
|
31 |
class PSetNetworkWrapper; |
|
32 |
class CpSettingFormItemData; |
|
50 | 33 |
class PsUiNotes; |
37 | 34 |
class CellularDataSettings; |
35 |
||
36 |
class CpNetworkPluginForm : public HbDataForm |
|
37 |
{ |
|
38 |
Q_OBJECT |
|
39 |
||
40 |
public: |
|
41 |
explicit CpNetworkPluginForm(QGraphicsItem *parent = 0); |
|
42 |
virtual ~CpNetworkPluginForm(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
43 |
|
37 | 44 |
void searchAvailableNetworks(); |
45 |
||
46 |
signals: |
|
47 |
void showGlobalProgressNote(int ¬eId, const QString& text); |
|
48 |
void showGlobalNote( |
|
49 |
int ¬eId, const QString& text, HbMessageBox::MessageBoxType msgBoxType); |
|
65 | 50 |
void showNotificationDialog(const QString& text); |
37 | 51 |
void cancelNote(int noteId); |
52 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
53 |
public slots: |
37 | 54 |
void cellularDataUseHomeStateChanged(int index); |
55 |
void cellularDataUseRoamStateChanged(int index); |
|
56 |
void networkModeStateChanged(int index); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
57 |
void operatorSelectionStateChanged(); |
37 | 58 |
void networkAccessModeGot(int mode); |
59 |
void availableNetworksGot( |
|
60 |
QList<PSetNetworkWrapper::NetworkInfo*> &m_networkInfoList); |
|
61 |
void networkReqestFailed( |
|
62 |
PSetNetworkWrapper::ErrorCode error, |
|
63 |
PSetNetworkWrapper::RequestType type); |
|
64 |
void userCancel(); |
|
65 |
void handleSearchingNetworks(PSetNetworkWrapper::RequestType &type); |
|
66 |
void handleRequestingSelectedNetwork(bool ongoing); |
|
67 |
void handleNetworkChanged( |
|
68 |
PSetNetworkWrapper::NetworkInfo& currentInfo, |
|
69 |
PSetNetworkWrapper::RegistrationStatus& status); |
|
70 |
void finishedManualSelectiondialog(HbAction* action); |
|
60 | 71 |
void chageVisbilityOfManualNetworkSelection(bool visible); |
37 | 72 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
73 |
protected: |
37 | 74 |
HbDataFormModelItem *createNetworkModeItem(); |
75 |
HbDataFormModelItem *createOperatorSelectionItem(); |
|
76 |
HbDataFormModelItem *createHomeDataUsageItem(); |
|
77 |
HbDataFormModelItem *createRoamDataUsageItem(); |
|
78 |
||
79 |
void automaticOperatorSelection(); |
|
80 |
void manualOperatorSelection(); |
|
81 |
||
82 |
void dualModeSelection(); |
|
83 |
void umtsSelection(); |
|
84 |
void gsmSelection(); |
|
85 |
||
86 |
HbDialog* createDialog(const QString& heading) const; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
87 |
void addItemToListWidget(HbListWidget* w, const QString& item, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
88 |
const int& data, const HbIcon& primaryIcon) const; |
37 | 89 |
|
90 |
void showManualSelectiondialog(); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
91 |
void restoreOperatorSelectionUi(); |
37 | 92 |
QString networkName(PSetNetworkWrapper::NetworkInfo &info); |
93 |
||
94 |
void connectToNetworkWrapper(PSetNetworkWrapper &wrapper); |
|
50 | 95 |
void connectToPhoneNotes(PsUiNotes ¬es); |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
96 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
97 |
QString primaryIconForNetwork(const PSetNetworkWrapper::NetworkInfo &info); |
37 | 98 |
|
99 |
private: |
|
100 |
||
101 |
QStringList mNetworkModeOptions; |
|
102 |
QStringList mOperatorSelectionOptions; |
|
103 |
QStringList mCellularUseHomeOptions; |
|
104 |
QStringList mCellularUseRoamOptions; |
|
105 |
int m_activeNoteId; |
|
106 |
int m_activeProgressNoteId; |
|
107 |
// Own |
|
108 |
PSetWrapper *m_pSetWrapper; |
|
76 | 109 |
SettingsWrapper *m_cpSettingsWrapper; |
37 | 110 |
QSharedPointer<CellularDataSettings> mCellularSettings; |
111 |
HbDialog *m_dialog; |
|
112 |
||
113 |
// Not own |
|
114 |
PSetNetworkWrapper *m_psetNetworkWrapper; |
|
115 |
CpSettingFormItemData *m_NetworkModeOptionsItemData; |
|
116 |
CpSettingFormItemData *m_NetworkOperatorSelectionItemData; |
|
117 |
CpSettingFormItemData *mCellularUseHomeSelectionItemData; |
|
118 |
CpSettingFormItemData *mCellularUseRoamSelectionItemData; |
|
119 |
QList<PSetNetworkWrapper::NetworkInfo*> *m_networkInfoList; |
|
120 |
}; |
|
121 |
||
122 |
#endif // CPNETWORKPLUGINFORM_H |