controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.h
changeset 19 36aa4756ee82
parent 12 624337f114fe
child 22 a5692c68d772
equal deleted inserted replaced
12:624337f114fe 19:36aa4756ee82
    17 
    17 
    18 #ifndef CPPROFILESETTINGFORM_H
    18 #ifndef CPPROFILESETTINGFORM_H
    19 #define CPPROFILESETTINGFORM_H
    19 #define CPPROFILESETTINGFORM_H
    20 
    20 
    21 #include <hbdataform.h>
    21 #include <hbdataform.h>
       
    22 #include <QHash>
    22 
    23 
    23 class HbDataFormModel;
    24 class HbDataFormModel;
    24 class HbDataFormModelItem;
    25 class HbDataFormModelItem;
    25 class CpItemDataHelper;
    26 class CpItemDataHelper;
    26 class CpProfileModel;
    27 class CpProfileModel;
    27 class QFileIconProvider;
    28 class QFileIconProvider;
       
    29 class XQSettingsManager;
       
    30 class XQSettingsKey;
       
    31 class QVariant;
    28 
    32 
    29 class CpProfileSettingForm : public HbDataForm
    33 class CpProfileSettingForm : public HbDataForm
    30 {
    34 {
    31     Q_OBJECT
    35     Q_OBJECT
    32 public:
    36 public:
       
    37     
       
    38     enum ProfileItemId {
       
    39         ProfileItemRingTone,
       
    40         ProfileItemMessageTone,
       
    41         ProfileItemEmailTone,
       
    42         ProfileItemReminderTone,
       
    43         ProfileItemNotificationTones,
       
    44         ProfileItemKeyandTouchScreenTones,
       
    45         ProfileItemTouchScreenVibra
       
    46     };
       
    47     
    33     CpProfileSettingForm();
    48     CpProfileSettingForm();
    34     virtual ~CpProfileSettingForm();
    49     virtual ~CpProfileSettingForm();
    35     
    50     
    36 private slots:
    51 private slots:
    37     
    52     
    47     void on_general_notificationVibra_stateChanged( int state );
    62     void on_general_notificationVibra_stateChanged( int state );
    48     void on_general_screenVibra_ValueChanged( int value );
    63     void on_general_screenVibra_ValueChanged( int value );
    49 
    64 
    50     //meeting tones
    65     //meeting tones
    51     void on_meeting_notificationTones_stateChanged(int state);
    66     void on_meeting_notificationTones_stateChanged(int state);
    52     void on_meeting_keysAndScreenSlider_ValueChanged( int value );
    67     void on_meeting_keysAndScreenToneSlider_ValueChanged( int value );
    53     
    68     
    54     //meeting vibar
    69     //meeting vibar
    55     void on_meeting_ringVibar_stateChanged( int state );
    70     void on_meeting_ringVibar_stateChanged( int state );
    56     void on_meeting_messageVibra_stateChanged( int state );
    71     void on_meeting_messageVibra_stateChanged( int state );
    57     void on_meeting_emailVibra_stateChanged( int state );
    72     void on_meeting_emailVibra_stateChanged( int state );
    58     void on_meeting_reminderVibra_stateChanged( int state );
    73     void on_meeting_reminderVibra_stateChanged( int state );
    59     void on_meeting_notificationVibra_stateChanged( int state );
    74     void on_meeting_notificationVibra_stateChanged( int state );
    60     void on_meeting_screenVibra_ValueChanged( int value );
    75     void on_meeting_screenVibra_ValueChanged( int value );
       
    76     
       
    77     void settingValueChanged(const XQSettingsKey &key, const QVariant &value);
    61 private:
    78 private:
    62     void initModel();
    79     void initModel();
    63     void initGeneralTonesGroup();
    80     void initGeneralTonesGroup();
    64     //void initGeneralVibraGroup();
    81     //void initGeneralVibraGroup();
    65     void initMeetingTonesGroup();
    82     void initMeetingTonesGroup();
    67     bool checkBoxStateToBool( int state );
    84     bool checkBoxStateToBool( int state );
    68  //   void initRingToneGroup(HbDataFormModelItem *parent);
    85  //   void initRingToneGroup(HbDataFormModelItem *parent);
    69  //   void initMessageToneGroup(HbDataFormModelItem *parent);
    86  //   void initMessageToneGroup(HbDataFormModelItem *parent);
    70  //   void initAlertToneGroup(HbDataFormModelItem *parent);
    87  //   void initAlertToneGroup(HbDataFormModelItem *parent);
    71  //   void initKeyAndScreenToneGroup(HbDataFormModelItem *parent);
    88  //   void initKeyAndScreenToneGroup(HbDataFormModelItem *parent);
       
    89     
       
    90     void initProfileItems(int profileId,HbDataFormModelItem *parent);
       
    91     HbDataFormModelItem *profileItem(int profileId,int profileItemId);
    72 private:
    92 private:
    73     HbDataFormModel *mModel;
    93     HbDataFormModel *mModel;
    74     CpItemDataHelper *mItemDataHelper;
    94     CpItemDataHelper *mItemDataHelper;
    75     CpProfileModel  *mProfileModel;
    95     CpProfileModel  *mProfileModel;
    76     QFileIconProvider *mFileIconProvider;
    96     QFileIconProvider *mFileIconProvider;
    78     HbDataFormModelItem *mGeneralPage;
    98     HbDataFormModelItem *mGeneralPage;
    79     HbDataFormModelItem *mMeetingPage;
    99     HbDataFormModelItem *mMeetingPage;
    80     
   100     
    81     HbDataFormModelItem *mCurrentPage;
   101     HbDataFormModelItem *mCurrentPage;
    82     
   102     
    83     HbDataFormModelItem *mGeneralKeysAndScreenToneSlider;
   103   //  HbDataFormModelItem *mGeneralKeysAndScreenToneSlider;
    84     HbDataFormModelItem *mGeneralSreenVibra;
   104  //   HbDataFormModelItem *mGeneralSreenVibra;
    85     HbDataFormModelItem *mMeetingKeysAndScreenToneSlider;
   105  //   HbDataFormModelItem *mMeetingKeysAndScreenToneSlider;
    86     HbDataFormModelItem *mMeetingSreenVibra;
   106   //  HbDataFormModelItem *mMeetingSreenVibra;
       
   107     
       
   108     XQSettingsManager *mSettingManager;
       
   109     
       
   110     QHash< int,QHash<int,HbDataFormModelItem*>  > mProfileModelItems;
    87 };
   111 };
    88 
   112 
    89 
   113 
    90 #endif //CPPROFILESETTINGFORM_H
   114 #endif //CPPROFILESETTINGFORM_H