equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: Helper class by which a plugin can communicate with the associated dataform. |
15 * |
15 * |
16 */ |
16 */ |
17 #include "cpitemdatahelper.h" |
17 #include "cpitemdatahelper.h" |
18 #include <QList> |
18 #include <QList> |
19 #include <hbdataform.h> |
19 #include <hbdataform.h> |
20 #include <hbdataformmodelitem.h> |
20 #include <hbdataformmodelitem.h> |
21 #include <hbdataformviewitem.h> |
21 #include <hbdataformviewitem.h> |
22 #include <hbdataformmodel.h> |
22 #include <hbdataformmodel.h> |
23 |
23 |
|
24 /*! |
|
25 \internal |
|
26 */ |
24 class CpItemDataHelperPrivate |
27 class CpItemDataHelperPrivate |
25 { |
28 { |
26 public: |
29 public: |
|
30 /*! |
|
31 \internal |
|
32 */ |
27 class ItemConnection |
33 class ItemConnection |
28 { |
34 { |
29 public: |
35 public: |
30 ItemConnection(HbDataFormModelItem *item, |
36 ItemConnection(HbDataFormModelItem *item, |
31 const char *signal, |
37 const char *signal, |
202 }; |
208 }; |
203 |
209 |
204 |
210 |
205 /*! |
211 /*! |
206 \class CpItemDataHelper |
212 \class CpItemDataHelper |
207 \brief The CpItemDataHelper class is a helper class to help control panel plugins (group plugins) to connect slots to inner widgets of setting items. |
213 \brief The CpItemDataHelper class is a helper class to help controlpanel plugins to comminicate with the associated dataform, |
|
214 such as connecting slots to inner widgets of setting items, add item prototypes. |
208 And add prototypes to dataform. |
215 And add prototypes to dataform. |
209 */ |
216 */ |
210 |
217 |
211 |
218 |
212 /*! |
219 /*! |
284 { |
291 { |
285 d->bindToForm(form); |
292 d->bindToForm(form); |
286 } |
293 } |
287 |
294 |
288 |
295 |
289 /* |
296 /*! |
290 Get the HbWidget instance from data form. |
297 Get the HbWidget instance from data form. |
291 */ |
298 */ |
292 HbWidget *CpItemDataHelper::widgetFromModelIndex(const QModelIndex &index) |
299 HbWidget *CpItemDataHelper::widgetFromModelIndex(const QModelIndex &index) |
293 { |
300 { |
294 return d->widgetFromModelIndex(index); |
301 return d->widgetFromModelIndex(index); |
295 } |
302 } |
296 |
303 |
|
304 /*! |
|
305 Get the HbDataFormModelItem with a QModelIndex from associated data form's model. |
|
306 */ |
297 HbDataFormModelItem *CpItemDataHelper::modelItemFromModelIndex(const QModelIndex &index) |
307 HbDataFormModelItem *CpItemDataHelper::modelItemFromModelIndex(const QModelIndex &index) |
298 { |
308 { |
299 return d->modelItemFromModelIndex(index); |
309 return d->modelItemFromModelIndex(index); |
300 } |
310 } |
301 |
311 |