|
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: Declaration of the Positioning Methods plugin to the |
|
15 * Avanced settings view |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef POSPSYSETTINGSPLUGIN_H |
|
20 #define POSPSYSETTINGSPLUGIN_H |
|
21 |
|
22 |
|
23 #include "possettingsadvinterface.h" |
|
24 #include "pospsysettingscommon.h" |
|
25 #include "possettingssignalmapper.h" |
|
26 |
|
27 #include <QObject> |
|
28 #include <QSignalMapper> |
|
29 #include <hbdataformmodelitem.h> |
|
30 |
|
31 // Forward Declaration |
|
32 class PosPsySettingsEngine; |
|
33 class PosSettingsAdvOp; |
|
34 class PosSettingsSignalMapper; |
|
35 |
|
36 class PosPsySettingsPlugin : public QObject, public PosSettingsAdvInterface |
|
37 { |
|
38 Q_OBJECT |
|
39 Q_INTERFACES( PosSettingsAdvInterface ) |
|
40 public: |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 PosPsySettingsPlugin(); |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 ~PosPsySettingsPlugin(); |
|
49 public: |
|
50 /** |
|
51 * Derived from PosSettingsAdvInterface |
|
52 */ |
|
53 int initialise( PosSettingsAdvOp* operation ); |
|
54 |
|
55 private slots: |
|
56 /** |
|
57 * This will be called when any of the positioning methods checkbox is clicked. |
|
58 * @param[in] state - indicates the state of the checkbox,whether enabled/disabled |
|
59 * @param[in] psyUid - indicates the Uid of the Psy that has been clciked. |
|
60 */ |
|
61 void onPsyPressed(int index); |
|
62 /** |
|
63 * This method will be called on a change in any of the psy info. |
|
64 * It willbe used to update the positioning methods group to reflect |
|
65 * the latest available info of psys. |
|
66 */ |
|
67 void updateGroup(); |
|
68 |
|
69 private: |
|
70 /** |
|
71 * adds items to the group & make connections |
|
72 */ |
|
73 void addItems(); |
|
74 |
|
75 |
|
76 private: |
|
77 /** |
|
78 * Pointer to the PosPsySettingsEngine |
|
79 * Owns |
|
80 */ |
|
81 PosPsySettingsEngine* mEngine; |
|
82 /** |
|
83 * List of available Positioning methods |
|
84 */ |
|
85 QList<PosPsyInfo> mPsyList; |
|
86 /** |
|
87 * pointer to the HbDataFormModelItem |
|
88 * Does not own |
|
89 */ |
|
90 HbDataFormModelItem* mGroup; |
|
91 /** |
|
92 * Signal mapper used to map the signal emitted from |
|
93 * each of the psy check box to the slot |
|
94 * Owns |
|
95 */ |
|
96 QSignalMapper *mSignalMapper; |
|
97 /** |
|
98 * List of psy signal mapper class |
|
99 */ |
|
100 QList<PosSettingsSignalMapper*> mPsySignalMapperList; |
|
101 /** |
|
102 * reference to PosSettingsAdvOp |
|
103 */ |
|
104 PosSettingsAdvOp* mOperation; |
|
105 |
|
106 }; |
|
107 #endif // POSPSYSETTINGSPLUGIN_H |