controlpanelui/src/inc/cpprofilemodel.h
changeset 12 624337f114fe
parent 10 0a74be98a8bc
child 14 23411a3be0db
equal deleted inserted replaced
11:10d0dd0e43f1 12:624337f114fe
    19 #define CPPROFILEMODEL_H
    19 #define CPPROFILEMODEL_H
    20 
    20 
    21 #include "cpprofilewrappermacro.h"
    21 #include "cpprofilewrappermacro.h"
    22 #include <QtCore/qglobal.h>
    22 #include <QtCore/qglobal.h>
    23 #include <QString>
    23 #include <QString>
    24 
    24 #include <QtCore/QObject>
    25 class CpProfileModelPrivate;
    25 class CpProfileModelPrivate;
    26 
    26 
       
    27 /*!
       
    28      Profile id is defined in profile engine
       
    29  */
    27 enum ProfileWrapperProfileId
    30 enum ProfileWrapperProfileId
    28     {
    31 {
    29     EProfileWrapperGeneralId = 0,
    32     EProfileWapperStart = -1,
    30     EProfileWrapperSilentId  = 1,
    33     EProfileWrapperGeneralId = 0, 
    31     EProfileWrapperMeetingId = 2
    34     EProfileWrapperMeetingId = 2,
    32     };
    35     EPRofileWrapperEnd    
    33 
    36 };
    34 class PROFILE_WRAPPER_EXPORT CpProfileModel
    37 class CpProfileSettings
    35     {
    38 {
    36 public:
    39 public:
    37     CpProfileModel();
    40     QString mRingTone;
       
    41     QString mMessageTone;
       
    42     QString mEmailTone;
       
    43     QString mReminderTone;
       
    44     bool mNotificationTone;
       
    45     int mKeyTouchScreenTone; // 0-5
       
    46     
       
    47     bool mRingAlertVibra;
       
    48     bool mMessageVibra;
       
    49     bool mEmailVibra;
       
    50     bool mReminderAlertVibra;
       
    51     bool mNotificationVibra;
       
    52     int mKeyTouchScreenVibra; //0-5    
       
    53 };
       
    54 class PROFILE_WRAPPER_EXPORT CpProfileModel : QObject
       
    55 {
       
    56     Q_OBJECT
       
    57 public:
       
    58     CpProfileModel(QObject *parent = 0);
    38     ~CpProfileModel();
    59     ~CpProfileModel();
    39 
    60 
    40 public:
    61 public:
    41     int initiationFlag();
    62     int initiationFlag();
    42     QString profileName(int profileId);
    63     QString profileName(int profileId)const;
       
    64     QStringList profileNames()const;
    43     int activateProfile(int profileId);
    65     int activateProfile(int profileId);
    44     int activeProfileId();
    66     int activeProfileId();
    45     QString ringTone();
    67     int setEditingProfile(int profileId); 
    46     int setRingTone(const QString& filePath);
    68     int profileSettings(int profileId, CpProfileSettings& profileSettings);
    47     QString messageTone();
    69     int setProfileSettings(int profileId, CpProfileSettings& profileSettings );
    48     int setMessageTone(const QString& filePath);
    70     
    49     QString emailTone();
    71     /*!
    50     int setEmailTone(const QString& filePath);
    72      * set ring tone in personalization group in control panel's homeview
    51     QString calendarTone();
    73      */
    52     void setCalendarTone(const QString& filePath);
    74     QString ringTone() const;
    53     QString alarmTone();
    75     void setRingTone(const QString& filePath);
    54     void setAlarmTone(const QString& filePath);
    76     
    55     int ringVolume();
    77    /* QString alarmTone();
    56     void setRingVolume(int volume);
    78     void setAlarmTone(const QString& filePath);*/
    57     void activateBeep();
    79     
    58     bool isBeep();
    80     int masterVolume() const;
    59     void activateSilent();
    81     void setMasterVolume(int volume);
    60     bool isSilent();
    82     
    61     bool vibraStatus();
    83     
    62     void setVibraStatus(bool status);
    84     bool masterVibra() const;
    63     int keyVolume();
    85     void setMasterVibra(bool isVibra);
    64     void setKeyVolume(int volume);
    86         
    65     int screenVolume();
    87     bool isSilenceMode() const;
    66     void setScreenVolume(int volume);
    88     void setSilenceMode(bool isSlience);
    67     int screenVibra();
    89     
    68     void setScreenVibra(int volume);
    90     bool isOffLineMode() const;    
       
    91     void setOffLineMode(bool isOffLine);
       
    92     
       
    93     /*!
       
    94      *  For profile settings 
       
    95      */
       
    96     
       
    97     QString ringTone(int profileId)const;
       
    98     void setRingTone(int profileId, const QString& filePath);
       
    99     QString messageTone(int profileId) const;
       
   100     void setMessageTone(int profileId, const QString& filePath);
       
   101     QString emailTone(int profileId) const;
       
   102     void setEmailTone(int profileId, const QString& filePath);
       
   103     QString reminderTone(int profileId) const;
       
   104     void setReminderTone(int profileId, const QString& filePath);
       
   105     
       
   106     bool notificationTone(int profileId) const;
       
   107     void setNotificationTone(int profileId, bool isActive);
       
   108     
       
   109     int keyTouchScreenTone(int profileId) const;
       
   110     void setKeyTouchScreenTone(int profileId, int level);
       
   111     
       
   112     bool ringAlertVibra(int profileId) const;
       
   113     void setRingAlertVibra(int profileId, bool isActive);
       
   114     
       
   115     bool messageVibra(int profileId) const;
       
   116     void setMessageVibra(int profileId, bool isActive);
       
   117     
       
   118     bool emailVibra(int profileId) const;
       
   119     void setEmailVibra(int profileId, bool isActive);
       
   120     
       
   121     bool reminderVibra(int profileId) const;
       
   122     void setReminderVibra(int profileId, bool isActive);
       
   123     
       
   124     bool notificationVibra(int profileId) const;
       
   125     void setNotificationVibra(int profileId, bool isActive);
       
   126     
       
   127     int keyTouchScreenVibra(int profileId)const;
       
   128     void setKeyTouchScreenVibra(int profileId, int level);
    69 
   129 
    70 private:
   130 private:
       
   131     CpProfileModelPrivate *const d_ptr;
       
   132 
       
   133 private:    
    71     Q_DISABLE_COPY(CpProfileModel)
   134     Q_DISABLE_COPY(CpProfileModel)
    72     
   135     Q_DECLARE_PRIVATE_D(d_ptr,CpProfileModel)
    73 private:
   136 };
    74     CpProfileModelPrivate* dptr;
       
    75     };
       
    76 
   137 
    77 #endif
   138 #endif