|
1 /* |
|
2 * Copyright (c) 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 * CM Manager Application Settings UI private interface. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CMAPPLSETTINGSUI_P_H |
|
20 #define CMAPPLSETTINGSUI_P_H |
|
21 |
|
22 // System includes |
|
23 |
|
24 #include <QObject> |
|
25 #include <QFlags> |
|
26 #include <QSet> |
|
27 #include <QList> |
|
28 #include <QSharedPointer> |
|
29 |
|
30 // User includes |
|
31 |
|
32 #include "cmconnectionmethod_shim.h" |
|
33 #include "cmdestination_shim.h" |
|
34 #include "cmsettingdata.h" |
|
35 #include "cmapplsettingsui.h" |
|
36 |
|
37 // Forward declarations |
|
38 |
|
39 class QTranslator; |
|
40 class CmManagerShim; |
|
41 class CmRadioDialog; |
|
42 class TestCmApplSettingsUi; |
|
43 |
|
44 // External data types |
|
45 |
|
46 // Constants |
|
47 |
|
48 // Class declaration |
|
49 |
|
50 class CmApplSettingsUiPrivate : QObject |
|
51 { |
|
52 Q_OBJECT |
|
53 |
|
54 public: |
|
55 |
|
56 // Data types |
|
57 |
|
58 explicit CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer); |
|
59 |
|
60 virtual ~CmApplSettingsUiPrivate(); |
|
61 |
|
62 void setOptions( |
|
63 const QFlags<CmApplSettingsUi::SelectionDialogItems> &listItems, |
|
64 const QSet<CmApplSettingsUi::BearerTypeFilter> &bearerFilter); |
|
65 |
|
66 void setSelection( |
|
67 const CmApplSettingsUi::SettingSelection &selection); |
|
68 |
|
69 CmApplSettingsUi::SettingSelection selection() const; |
|
70 |
|
71 void open(); |
|
72 |
|
73 signals: |
|
74 |
|
75 public slots: |
|
76 |
|
77 protected: |
|
78 |
|
79 protected slots: |
|
80 |
|
81 private: |
|
82 |
|
83 Q_DISABLE_COPY(CmApplSettingsUiPrivate) |
|
84 |
|
85 void runDestinationDialog(); |
|
86 |
|
87 void runConnectionMethodDialog(); |
|
88 |
|
89 int findDestination(uint destinationId) const; |
|
90 |
|
91 int findConnectionMethod(uint connMethodId) const; |
|
92 |
|
93 void emitFinished(uint status) const; |
|
94 |
|
95 private slots: |
|
96 |
|
97 void destinationDialogResult(bool success); |
|
98 |
|
99 void connMethodDialogResult(bool success); |
|
100 |
|
101 private: // data |
|
102 |
|
103 //! "Not found" search index value. |
|
104 static const int ItemNotFound = -1; |
|
105 |
|
106 // General member data |
|
107 CmApplSettingsUi *q_ptr; //!< Public implementation |
|
108 QSharedPointer<CmManagerShim> mCmManagerShim; //!< CM Manager client instance |
|
109 QTranslator *mAppTranslator; //!< Translator for application text ID's |
|
110 QTranslator *mCommonTranslator; //!< Translator for common text ID's |
|
111 |
|
112 // Configuration |
|
113 QFlags<CmApplSettingsUi::SelectionDialogItems> mListItems; //!< Wanted dialog type's |
|
114 |
|
115 // State data |
|
116 CmSettingData mSettingData; //!< Setting data |
|
117 CmRadioDialog *mDestinationDialog; //!< Destination dialog |
|
118 CmRadioDialog *mConnMethodDialog; //!< Connection method dialog |
|
119 CmApplSettingsUi::SettingSelection mSelection; //!< Current selection |
|
120 QList< QSharedPointer<CmSettingData::Destination> > mDestinations; //! Destinations |
|
121 QList< QSharedPointer<CmSettingData::ConnMethod> > mConnMethods; //! Connection methods |
|
122 |
|
123 // Friend classes |
|
124 |
|
125 // Test class needs direct access |
|
126 friend class TestCmApplSettingsUi; |
|
127 }; |
|
128 |
|
129 #endif // CMAPPLSETTINGSUI_P_H |