controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.h
changeset 12 624337f114fe
parent 10 0a74be98a8bc
child 14 23411a3be0db
equal deleted inserted replaced
11:10d0dd0e43f1 12:624337f114fe
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0""
     5  * under the terms of "Eclipse Public License v1.0""
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:  
    14  * Description:  
    15 *
    15  *
    16 */
    16  */
    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 
    22 class CpProfileSettings;
    23 class MProfileEngineExtended;
    23 class CpProfileModel;
    24 class MProfileExtended;
    24 class MProfileEngineExtended2;
       
    25 class MProfileExtended2;
    25 class MProfileFeedbackSettings;
    26 class MProfileFeedbackSettings;
    26 class MProfileSetFeedbackSettings;
    27 class MProfileSetFeedbackSettings;
    27 class CRepository;
    28 class CRepository;
       
    29 class QStringList;
    28 struct TProfileToneSettings;
    30 struct TProfileToneSettings;
    29 
    31 
    30 
       
    31 class CpProfileModelPrivate
    32 class CpProfileModelPrivate
    32     {
    33 {
       
    34     Q_DECLARE_PUBLIC(CpProfileModel)
    33 public:
    35 public:
    34     CpProfileModelPrivate();
    36     CpProfileModelPrivate();
    35     ~CpProfileModelPrivate();
    37     ~CpProfileModelPrivate();
    36 
    38     void initialize(CpProfileModel *parent);
    37 public:
    39 public:
    38     int initiationFlag();
    40     int initiationFlag();
    39     QString profileName(int profileId);
    41     QString profileName(int profileId)const;
       
    42     QStringList profileNames() const;
    40     int activateProfile(int profileId);
    43     int activateProfile(int profileId);
    41     int activeProfileId();
    44     int activeProfileId();
    42     QString ringTone();
    45     int setEditingProfile(int profileId);
    43     int setRingTone(const QString& filePath);
    46     int profileSettings(int profileId, CpProfileSettings& profileSettings);
    44     QString messageTone();
    47     int setProfileSettings(int profileId, CpProfileSettings& profileSettings);
    45     int setMessageTone(const QString& filePath);
       
    46     QString emailTone();
       
    47     int setEmailTone(const QString& filePath);
       
    48     QString calendarTone();
       
    49     void setCalendarTone(const QString& filePath);
       
    50     QString alarmTone();
       
    51     void setAlarmTone(const QString& filePath);
       
    52     int ringVolume();
       
    53     void setRingVolume(int volume);
       
    54     void activateBeep();
       
    55     bool isBeep();
       
    56     void activateSilent();
       
    57     bool isSilent();
       
    58     bool vibraStatus();
       
    59     void setVibraStatus(bool status);
       
    60     int keyVolume();
       
    61     void setKeyVolume(int volume);
       
    62     int screenVolume();
       
    63     void setScreenVolume(int volume);
       
    64     int screenVibra();
       
    65     void setScreenVibra(int volume);
       
    66 
    48 
       
    49     /*!
       
    50      * set ring tone in personalization group in control panel's homeview
       
    51      */
       
    52     QString ringTone() const;
       
    53     void setRingTone(const QString& filePath);
       
    54 
       
    55     int masterVolume() const;
       
    56     void setMasterVolume(int volume);
       
    57 
       
    58     bool masterVibra() const;
       
    59     void setMasterVibra(bool isVibra);
       
    60 
       
    61     bool isSilenceMode() const;
       
    62     void setSilenceMode(bool isSlience);
       
    63 
       
    64     bool isOffLineMode() const;    
       
    65     void setOffLineMode(bool isOffLine);
       
    66 
       
    67     QString ringTone(int profileId)const;
       
    68     void setRingTone(int profileId, const QString& filePath);
       
    69     QString messageTone(int profileId) const;
       
    70     void setMessageTone(int profileId, const QString& filePath);
       
    71     QString emailTone(int profileId) const;
       
    72     void setEmailTone(int profileId, const QString& filePath);
       
    73     QString reminderTone(int profileId) const;
       
    74     void setReminderTone(int profileId, const QString& filePath);
       
    75     
       
    76     bool notificationTone(int profileId) const;
       
    77     void setNotificationTone(int profileId, bool isActive);
       
    78     
       
    79     int keyTouchScreenTone(int profileId) const;
       
    80     void setKeyTouchScreenTone(int profileId, int level);
       
    81     
       
    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;
       
    98     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      */
    67 #ifdef Q_OS_SYMBIAN
   125 #ifdef Q_OS_SYMBIAN
    68 private:
   126 private:
    69     void UpdateProfileL();
   127     void UpdateProfileSettingsL(int profileId);
    70     int commitChange();
   128     int commitChange();
    71 
   129 
    72 private:
   130 private:
    73     MProfileEngineExtended* mEngine;
   131     MProfileEngineExtended2 *mEngine;
    74     MProfileExtended* mProfileExt;
   132     //MProfileExtended2 *mProfileExt;
    75     TProfileToneSettings* mToneSettings;
   133     //TProfileToneSettings *mToneSettings;
    76     const MProfileFeedbackSettings* mFeedbackSettings;
   134     //const MProfileFeedbackSettings *mFeedbackSettings;
    77     MProfileSetFeedbackSettings* mSetFeedbackSettings;
   135     //MProfileSetFeedbackSettings *mSetFeedbackSettings;
    78     CRepository* mVibraCenRep;
   136     //CRepository *mVibraCenRep;
       
   137     int mEditingProfileId;
    79     bool mInitErrFlag;
   138     bool mInitErrFlag;
       
   139     CRepository *mOffLineCenRep;
       
   140     CpProfileModel *q_ptr;
    80 #endif // Q_OS_SYMBIAN
   141 #endif // Q_OS_SYMBIAN
    81     };
   142 };
    82 
   143 
    83 #endif
   144 #endif