searchui/stateproviders/searchstateprovider/inc/settingswidget.h
changeset 12 993ab30e92fc
parent 3 6832643895f7
child 15 df6898e696c6
child 17 7d8c8d8f5eab
equal deleted inserted replaced
11:773be20e0a25 12:993ab30e92fc
    19 
    19 
    20 #include <hbwidget.h>
    20 #include <hbwidget.h>
    21 #include <qlist.h>
    21 #include <qlist.h>
    22 #include <hbgridview.h>
    22 #include <hbgridview.h>
    23 #include <search_global.h>
    23 #include <search_global.h>
       
    24 #include <hbicon.h>
       
    25 class OnlineHandler;
    24 class HbCheckBox;
    26 class HbCheckBox;
    25 class HbDialog;
    27 class HbDialog;
    26 class QSignalMapper;
    28 class QSignalMapper;
    27 class HbDocumentLoader;
    29 class HbDocumentLoader;
    28 class HbDataFormModel;
    30 class HbDataFormModel;
    71     /**
    73     /**
    72      * Load setting from application ini file
    74      * Load setting from application ini file
    73      * 
    75      * 
    74      */
    76      */
    75     void loadDeviceSettings();
    77     void loadDeviceSettings();
    76     
    78 
    77     /**
    79     /**
    78      * Load default settings for search categories to ini file
    80      * Load default settings for search categories to ini file
    79      * 
    81      * 
    80      */
    82      */
    81 
    83 
    89     /**
    91     /**
    90      * enable default settings in the application ini file
    92      * enable default settings in the application ini file
    91      * 
    93      * 
    92      */
    94      */
    93     void storeDefaultSettings();
    95     void storeDefaultSettings();
    94     
    96 
    95     /**
    97     /**
    96      * setting up gui for the settings widget
    98      * setting up gui for the settings widget
    97      */
    99      */
    98 
   100 
    99     void createGui();
   101     void createGui();
   100     
   102 
   101     /**
   103     /**
   102      * Filter out categories from the sql database provided by the engine
   104      * Filter out categories from the sql database provided by the engine
   103      * for only those categories that have been successfully harvested
   105      * for only those categories that have been successfully harvested
   104      */
   106      */
   105 
   107 
   106     void preparecategories();
   108     void preparecategories();
   107     
   109 
   108     
   110     /**
   109     /**
   111      * initilize the settings wizard while entering to the setting state
   110       * initilize the settings wizard while entering to the setting state
   112      */
   111       */
       
   112 
   113 
   113     void initialize();
   114     void initialize();
   114   
   115     
       
   116     void setSettingsFilePath();
       
   117     
       
   118     void loadIS();
       
   119 
   115 public slots:
   120 public slots:
   116     /**
   121     /**
   117      * will be called when settings OK is clicked
   122      * will be called when settings OK is clicked
   118      */
   123      */
   119     void checkBoxOkEvent();
   124     void checkBoxOkEvent();
   124     /**
   129     /**
   125      * will be called whenn any check box is checked
   130      * will be called whenn any check box is checked
   126      */
   131      */
   127     void itemChecked(int);
   132     void itemChecked(int);
   128     /**
   133     /**
   129       * slot called while clicking items added to  the combobox
   134      * slot called while clicking items added to  the combobox
   130       */
   135      */
   131 
   136 
   132     void q_currentIndexChanged(int);
   137     void q_currentIndexChanged(int);
       
   138 
       
   139     void slotproviderDetails(QString, HbIcon, int);
       
   140 
       
   141     void slotdefaultProvider(const int);
       
   142     
       
   143     void slotitemSelected(int);
   133 signals:
   144 signals:
   134     /**
   145     /**
   135      * Emitted when setting closed
   146      * Emitted when setting closed
   136      * 
   147      * 
   137      */
   148      */
   144     /**
   155     /**
   145      * Emitted when categories selected or deselected
   156      * Emitted when categories selected or deselected
   146      * 
   157      * 
   147      */
   158      */
   148     void selectedItemCategory(int, bool);
   159     void selectedItemCategory(int, bool);
       
   160     
       
   161     void ISProvidersIcon(HbIcon,int);
   149 
   162 
   150 private:
   163 private:
   151     /**
   164     /**
   152      * for Device category list
   165      * for Device category list
   153      */
   166      */
   175      */
   188      */
   176     QMap<QString, bool> mCategoryDbMapping;
   189     QMap<QString, bool> mCategoryDbMapping;
   177 
   190 
   178     QStringList mDeviceListDisplay;
   191     QStringList mDeviceListDisplay;
   179     /**
   192     /**
   180       * list of hardcoded device categories:cretaed to
   193      * list of hardcoded device categories:cretaed to
   181       * set up default category values to the ini file
   194      * set up default category values to the ini file
   182       */
   195      */
   183 
   196 
   184     QStringList mDeviceCategoryRefList;
   197     QStringList mDeviceCategoryRefList;
   185     /**
   198     /**
   186       * intermediate variable to store selected category values
   199      * intermediate variable to store selected category values
   187       */
   200      */
   188 
   201 
   189     QList<bool> mDeviceMapping;
   202     QList<bool> mDeviceMapping;
   190     /**
   203     /**
   191      * list of hardcoded service providers
   204      * list of hardcoded service providers
   192      */
   205      */
   193     QStringList internetCategoryList;
   206     //QStringList internetCategoryList;
   194     /**
   207     /**
   195      * for unit testing
   208      * for unit testing
   196      */
   209      */
   197     QStringList mCategoryList;
   210     QStringList mCategoryList;
   198     /**
   211     /**
   199       * DocumentLoader variable for the setting widget
   212      * DocumentLoader variable for the setting widget
   200       */
   213      */
   201 
   214 
   202     HbDocumentLoader* mDocumentLoader;
   215     HbDocumentLoader* mDocumentLoader;
   203     
   216 
   204     /**
   217     /**
   205      * Dataform for the settingwidget
   218      * Dataform for the settingwidget
   206      */
   219      */
   207 
   220 
   208     HbDataForm* dataform;
   221     HbDataForm* dataform;
   209 
   222 
   210     /**
   223     /**
   211       * Dataform model
   224      * Dataform model
   212       */
   225      */
   213     HbDataFormModel* mModel;
   226     HbDataFormModel* mModel;
   214     /**
   227     /**
   215       * variable for customizing each item the in the dataform
   228      * variable for customizing each item the in the dataform
   216       */
   229      */
   217 
   230 
   218     QList<HbDataFormModelItem*> mModelItemList;
   231     QList<HbDataFormModelItem*> mModelItemList;
   219 
   232 
   220     QList<QAction*> mActions;
   233     QList<QAction*> mActions;
   221 
   234 
   222     int mSelectedScope;
   235     int mSelectedScope;
   223 
   236 
   224     int mSelectedProvider;
   237     int mSelectedProvider;
   225     /**
   238     /**
   226       * Radio buttion list for internet search categories
   239      * Radio buttion list for internet search categories
   227       */
   240      */
   228 
   241 
   229     HbRadioButtonList* mradiolist;
   242     HbRadioButtonList* mradiolist;
   230 	
   243 
   231     /** 
   244     /** 
   232      * combobox items
   245      * combobox items
   233      */    
   246      */
   234     HbComboBox *comboBox ;
   247     HbComboBox *comboBox;
   235 
   248 
   236     bool mInstialize;
   249     bool mInstialize;
   237     bool mchangestate;
   250     bool mchangestate;
       
   251 
       
   252     OnlineHandler *mInternetHandler;
       
   253    // QStringList mServiceProviders;
       
   254     QMap<int, QString> mServiceProviders;
       
   255     
       
   256     QString mSettingFileName;
   238 SEARCH_FRIEND_CLASS    (SearchStateProviderTest)
   257 SEARCH_FRIEND_CLASS    (SearchStateProviderTest)
   239     };
   258     };
   240 #endif
   259 #endif