controlpanelui/src/cpcategorymodel/src/cpcategorysettingformmodel.cpp
changeset 40 593f946f4fec
parent 19 36aa4756ee82
equal deleted inserted replaced
22:a5692c68d772 40:593f946f4fec
     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:  An extension to HbDataFormModel, can be filled with model items comes from controlpanel plugins.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include "cpcategorysettingformmodel.h"
    18 #include "cpcategorysettingformmodel.h"
    19 #include <QString>
    19 #include <QString>
    20 
       
    21 #include "cpcategorymodelutility.h"
    20 #include "cpcategorymodelutility.h"
    22 #include <cpitemdatahelper.h>
    21 #include <cpitemdatahelper.h>
    23 
    22 
       
    23 /*
       
    24  * Private implementation
       
    25  */
    24 class CpCategorySettingFormModelPrivate
    26 class CpCategorySettingFormModelPrivate
    25 {
    27 {
    26 public:
    28 public:
    27 	CpCategorySettingFormModelPrivate(const QString &configFile) : 
    29 	CpCategorySettingFormModelPrivate(const QString &configFile) : 
    28 	  mInitialized(false),
    30 	  mInitialized(false),
    37 public:
    39 public:
    38 	bool mInitialized;
    40 	bool mInitialized;
    39 	QString mConfigFile;
    41 	QString mConfigFile;
    40 };
    42 };
    41 
    43 
       
    44 /*
       
    45  * Constructor
       
    46  */
    42 CpCategorySettingFormModel::CpCategorySettingFormModel(const QString &configFile) : 
    47 CpCategorySettingFormModel::CpCategorySettingFormModel(const QString &configFile) : 
    43 	d (new CpCategorySettingFormModelPrivate(configFile))
    48 	d (new CpCategorySettingFormModelPrivate(configFile))
    44 {
    49 {
    45 }
    50 }
    46 
    51 
       
    52 /*
       
    53  * Destructor
       
    54  */
    47 CpCategorySettingFormModel::~CpCategorySettingFormModel()
    55 CpCategorySettingFormModel::~CpCategorySettingFormModel()
    48 {
    56 {
    49 	delete d;
    57 	delete d;
    50 }
    58 }
    51 
    59 
       
    60 /*
       
    61  * Initialize
       
    62  */
    52 void CpCategorySettingFormModel::initialize(CpItemDataHelper &itemDataHelper)
    63 void CpCategorySettingFormModel::initialize(CpItemDataHelper &itemDataHelper)
    53 {
    64 {
    54     //avoid to be called twice
    65     //avoid to be called twice
    55     if (!d->mInitialized) {
    66     if (!d->mInitialized) {
    56         //give derived class a change do their special things before loading config plugins
    67         //give derived class a change do their special things before loading config plugins
    68 
    79 
    69         d->mInitialized = true;
    80         d->mInitialized = true;
    70     }
    81     }
    71 }
    82 }
    72 
    83 
    73 
    84 /*
       
    85  * Derived class can override this function to do some specific work before loading config plugins
       
    86  */
    74 void CpCategorySettingFormModel::beforeLoadingConfigPlugins(CpItemDataHelper&/*itemDataHelper*/)
    87 void CpCategorySettingFormModel::beforeLoadingConfigPlugins(CpItemDataHelper&/*itemDataHelper*/)
    75 {
    88 {
    76 }
    89 }
    77 
    90 
       
    91 /*
       
    92  * Derived class can override this function to do some specific work after loading config plugins
       
    93  */
    78 void CpCategorySettingFormModel::afterLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
    94 void CpCategorySettingFormModel::afterLoadingConfigPlugins(CpItemDataHelper &/*itemDataHelper*/)
    79 {
    95 {
    80 }
    96 }
       
    97 
       
    98 //End of File