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