|
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: Positioning settings advanced operation class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef POSSETTINGSENGADVANCEDOPERATION_H |
|
19 #define POSSETTINGSENGADVANCEDOPERATION_H |
|
20 |
|
21 |
|
22 #include "possettingsglobal.h" |
|
23 #include <QObject.h> |
|
24 #include <hbview.h> |
|
25 #include <hbdataform.h> |
|
26 #include <hbdataformmodel.h> |
|
27 #include <hbdataformmodelitem.h> |
|
28 |
|
29 class POSSETTINGS_EXPORT PosSettingsAdvOp : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 |
|
33 public: |
|
34 /** |
|
35 * Constructor |
|
36 */ |
|
37 PosSettingsAdvOp(HbView* view); |
|
38 |
|
39 /** |
|
40 * Destructor |
|
41 */ |
|
42 ~PosSettingsAdvOp(); |
|
43 |
|
44 /** |
|
45 * Appends dataform model item to the dataform model. |
|
46 */ |
|
47 void appendDataFormItem( HbDataFormModelItem *data, |
|
48 HbDataFormModelItem *parent = 0 ); |
|
49 |
|
50 /*** |
|
51 * Makes connections for the data form model items |
|
52 */ |
|
53 void addConnection( HbDataFormModelItem *item, const char* signal, |
|
54 QObject *receiver, const char* slot ); |
|
55 |
|
56 /** |
|
57 * Used to add menue items & actions |
|
58 */ |
|
59 void addAction( HbAction *action, HbView::ActionContainer |
|
60 preferedActionContainer ); |
|
61 /** |
|
62 * Gets the index of a particular data form model item |
|
63 * @param[in] item - data form model item whose index is required |
|
64 * @return - index of the data form model item within the data form model |
|
65 */ |
|
66 QModelIndex indexFromItem(const HbDataFormModelItem * item ); |
|
67 /** |
|
68 * Removes connection that were already made |
|
69 */ |
|
70 void removeConnection(HbDataFormModelItem *item, const char *signal, QObject *receiver, const char *slot); |
|
71 /** |
|
72 * Sets the model item to be expanded/collapsed |
|
73 */ |
|
74 void setExpanded(const QModelIndex &index, bool expanded); |
|
75 /** |
|
76 * Checks if a particualr data model item is expanded |
|
77 */ |
|
78 bool isExpanded (const QModelIndex &index) const; |
|
79 /** |
|
80 * Removes a particualr data form model item from the model |
|
81 */ |
|
82 bool removeItem(HbDataFormModelItem* item); |
|
83 /** |
|
84 * set prototype for data form |
|
85 */ |
|
86 void setItemPrototypes(QList<HbAbstractViewItem *> &protoTypeList); |
|
87 |
|
88 /** |
|
89 * gets prototype list for the data form |
|
90 */ |
|
91 void itemPrototypes(QList<HbAbstractViewItem *> &protoTypeList); |
|
92 private: |
|
93 |
|
94 /** |
|
95 * Pointer to view. |
|
96 * Not own. |
|
97 */ |
|
98 HbView* mView; |
|
99 |
|
100 /** |
|
101 * Pointer to data form |
|
102 * Not own. |
|
103 */ |
|
104 HbDataForm* mDataForm; |
|
105 |
|
106 /** |
|
107 * Pointer to data form model. |
|
108 * Not own. |
|
109 */ |
|
110 HbDataFormModel* mDataFormModel; |
|
111 }; |
|
112 |
|
113 |
|
114 #endif /* POSSETTINGSENGADVANCEDOPERATION_H_ */ |