controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.h
changeset 40 593f946f4fec
parent 19 36aa4756ee82
equal deleted inserted replaced
22:a5692c68d772 40:593f946f4fec
    17 
    17 
    18 #ifndef CPPROFILEMODEL_P_H
    18 #ifndef CPPROFILEMODEL_P_H
    19 #define CPPROFILEMODEL_P_H
    19 #define CPPROFILEMODEL_P_H
    20 
    20 
    21 #include <qglobal.h>
    21 #include <qglobal.h>
    22 #include <QMap>
    22 #include <QList>
    23 class CpProfileModel;
    23 class CpProfileModel;
    24 class CpProfileSettings;
    24 class CpProfileSettings;
    25 class MProfileEngineExtended2;
    25 class MProfileEngineExtended2;
    26 class MProfileExtended2;
    26 class MProfileExtended2;
    27 class MProfileFeedbackSettings;
    27 class MProfileFeedbackSettings;
    28 class MProfileSetFeedbackSettings;
    28 class MProfileSetFeedbackSettings;
    29 class CRepository;
    29 class CRepository;
    30 class QStringList;
    30 class QStringList;
    31 struct TProfileToneSettings;
    31 class MProfilesNamesArray;
    32 
    32 struct TProfileToneSettings; 
    33 class CpProfileModelPrivate
    33 class CpProfileModelPrivate
    34 {
    34 {
    35     Q_DECLARE_PUBLIC(CpProfileModel)
    35     Q_DECLARE_PUBLIC(CpProfileModel)
    36 public:
    36 public:
    37     CpProfileModelPrivate();
    37     CpProfileModelPrivate();
    38     ~CpProfileModelPrivate();
    38     ~CpProfileModelPrivate();
    39     void initialize(CpProfileModel *parent);
    39     void initialize(CpProfileModel *parent);
    40 public:
    40 public:
    41     int initiationFlag();
    41     QString profileName(int profileId) const;
    42     QString profileName(int profileId)const;
       
    43     QStringList profileNames() const;
    42     QStringList profileNames() const;
       
    43     void setProfileName(int profileId, const QString &name);
    44     int activateProfile(int profileId);
    44     int activateProfile(int profileId);
    45     int activeProfileId() const;
    45     int activeProfileId() const;
    46     void profileSettings(int profileId, CpProfileSettings& profileSettings);
    46     void profileSettings(int profileId, CpProfileSettings& profileSettings);
    47     int setProfileSettings(int profileId, CpProfileSettings& profileSettings);
    47     void setProfileSettings(int profileId, CpProfileSettings& profileSettings);
    48 
    48 
    49     /*!
       
    50      * set ring tone in personalization group in control panel's homeview
       
    51      */
       
    52     QString ringTone() const;
    49     QString ringTone() const;
    53     void setRingTone(const QString& filePath);
    50     void setRingTone(const QString& filePath);
    54 
    51 
    55     int masterVolume() const;
    52     int masterVolume() const;
    56     void setMasterVolume(int volume);
    53     void setMasterVolume(int volume);
    58     bool masterVibra() const;
    55     bool masterVibra() const;
    59     void setMasterVibra(bool isVibra);
    56     void setMasterVibra(bool isVibra);
    60 
    57 
    61     bool silenceMode() const;
    58     bool silenceMode() const;
    62     void setSilenceMode(bool isSlience);
    59     void setSilenceMode(bool isSlience);
    63 
       
    64     bool offLineMode() const;    
       
    65     void setOffLineMode(bool isOffLine);
       
    66 
    60 
    67     QString ringTone(int profileId)const;
    61     QString ringTone(int profileId)const;
    68     void setRingTone(int profileId, const QString& filePath);
    62     void setRingTone(int profileId, const QString& filePath);
    69     QString messageTone(int profileId) const;
    63     QString messageTone(int profileId) const;
    70     void setMessageTone(int profileId, const QString& filePath);
    64     void setMessageTone(int profileId, const QString& filePath);
    77     void setNotificationTone(int profileId, bool isActive);
    71     void setNotificationTone(int profileId, bool isActive);
    78     
    72     
    79     int keyTouchScreenTone(int profileId) const;
    73     int keyTouchScreenTone(int profileId) const;
    80     void setKeyTouchScreenTone(int profileId, int level);
    74     void setKeyTouchScreenTone(int profileId, int level);
    81     
    75     
    82     bool ringAlertVibra(int profileId) const;
       
    83     void setRingAlertVibra(int profileId, bool isActive);
       
    84     
       
    85     bool messageVibra(int profileId) const;
       
    86     void setMessageVibra(int profileId, bool isActive);
       
    87     
       
    88     bool emailVibra(int profileId) const;
       
    89     void setEmailVibra(int profileId, bool isActive);
       
    90     
       
    91     bool reminderVibra(int profileId) const;
       
    92     void setReminderVibra(int profileId, bool isActive) ;
       
    93     
       
    94     bool notificationVibra(int profileId) const;
       
    95     void setNotificationVibra(int profileId, bool isActive);
       
    96     
       
    97     int keyTouchScreenVibra(int profileId)const;
    76     int keyTouchScreenVibra(int profileId)const;
    98     void setKeyTouchScreenVibra(int profileId, int level);
    77     void setKeyTouchScreenVibra(int profileId, int level);
    99     /*    int setEditingProfile(int profileId);
       
   100      QString ringTone();
       
   101      int setRingTone(const QString& filePath);
       
   102      QString messageTone();
       
   103      int setMessageTone(const QString& filePath);
       
   104      QString emailTone();
       
   105      int setEmailTone(const QString& filePath);
       
   106      QString calendarTone();
       
   107      void setCalendarTone(const QString& filePath);
       
   108      QString alarmTone();
       
   109      void setAlarmTone(const QString& filePath);
       
   110      int ringVolume();
       
   111      void setRingVolume(int volume);
       
   112      void activateBeep();
       
   113      bool isBeep();
       
   114      void activateSilent();
       
   115      bool isSilent();
       
   116      bool vibraStatus();
       
   117      void setVibraStatus(bool status);
       
   118      int keyVolume();
       
   119      void setKeyVolume(int volume);
       
   120      int screenVolume();
       
   121      void setScreenVolume(int volume);
       
   122      int screenVibra();
       
   123      void setScreenVibra(int volume);
       
   124      */
       
   125 #ifdef Q_OS_SYMBIAN
       
   126 private:
       
   127     //void UpdateProfileSettingsL(int profileId);
       
   128     //int commitChange();
       
   129 
    78 
   130 private:
    79 private:
       
    80     bool isValidProfile(int profileId) const;
       
    81     
       
    82 private:
       
    83 #ifdef Q_OS_SYMBIAN
   131     MProfileEngineExtended2 *mEngine;
    84     MProfileEngineExtended2 *mEngine;
   132     QMap<int, MProfileExtended2*> mProfileList;
    85     // Valid profile id list
   133     //MProfileExtended2 *mProfileExt;
    86     QList<int> mProfileList;
   134     //TProfileToneSettings *mToneSettings;
    87     MProfilesNamesArray *mProfileNames;
   135     //const MProfileFeedbackSettings *mFeedbackSettings;
    88 
   136     //MProfileSetFeedbackSettings *mSetFeedbackSettings;
    89 #endif // Q_OS_SYMBIAN
   137     //CRepository *mVibraCenRep;
       
   138     int mInitErrFlag;
       
   139     CRepository *mOffLineCenRep;
       
   140     CpProfileModel *q_ptr;
    90     CpProfileModel *q_ptr;
   141 #endif // Q_OS_SYMBIAN
       
   142 };
    91 };
   143 
    92 
   144 #endif
    93 #endif