--- a/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.h Fri Jun 25 17:12:20 2010 +0800
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.h Wed Sep 29 10:09:58 2010 +0800
@@ -19,7 +19,7 @@
#define CPPROFILEMODEL_P_H
#include <qglobal.h>
-#include <QMap>
+#include <QList>
class CpProfileModel;
class CpProfileSettings;
class MProfileEngineExtended2;
@@ -28,8 +28,8 @@
class MProfileSetFeedbackSettings;
class CRepository;
class QStringList;
-struct TProfileToneSettings;
-
+class MProfilesNamesArray;
+struct TProfileToneSettings;
class CpProfileModelPrivate
{
Q_DECLARE_PUBLIC(CpProfileModel)
@@ -38,17 +38,14 @@
~CpProfileModelPrivate();
void initialize(CpProfileModel *parent);
public:
- int initiationFlag();
- QString profileName(int profileId)const;
+ QString profileName(int profileId) const;
QStringList profileNames() const;
+ void setProfileName(int profileId, const QString &name);
int activateProfile(int profileId);
int activeProfileId() const;
void profileSettings(int profileId, CpProfileSettings& profileSettings);
- int setProfileSettings(int profileId, CpProfileSettings& profileSettings);
+ void setProfileSettings(int profileId, CpProfileSettings& profileSettings);
- /*!
- * set ring tone in personalization group in control panel's homeview
- */
QString ringTone() const;
void setRingTone(const QString& filePath);
@@ -61,9 +58,6 @@
bool silenceMode() const;
void setSilenceMode(bool isSlience);
- bool offLineMode() const;
- void setOffLineMode(bool isOffLine);
-
QString ringTone(int profileId)const;
void setRingTone(int profileId, const QString& filePath);
QString messageTone(int profileId) const;
@@ -79,66 +73,21 @@
int keyTouchScreenTone(int profileId) const;
void setKeyTouchScreenTone(int profileId, int level);
- bool ringAlertVibra(int profileId) const;
- void setRingAlertVibra(int profileId, bool isActive);
-
- bool messageVibra(int profileId) const;
- void setMessageVibra(int profileId, bool isActive);
-
- bool emailVibra(int profileId) const;
- void setEmailVibra(int profileId, bool isActive);
-
- bool reminderVibra(int profileId) const;
- void setReminderVibra(int profileId, bool isActive) ;
-
- bool notificationVibra(int profileId) const;
- void setNotificationVibra(int profileId, bool isActive);
-
int keyTouchScreenVibra(int profileId)const;
void setKeyTouchScreenVibra(int profileId, int level);
- /* int setEditingProfile(int profileId);
- QString ringTone();
- int setRingTone(const QString& filePath);
- QString messageTone();
- int setMessageTone(const QString& filePath);
- QString emailTone();
- int setEmailTone(const QString& filePath);
- QString calendarTone();
- void setCalendarTone(const QString& filePath);
- QString alarmTone();
- void setAlarmTone(const QString& filePath);
- int ringVolume();
- void setRingVolume(int volume);
- void activateBeep();
- bool isBeep();
- void activateSilent();
- bool isSilent();
- bool vibraStatus();
- void setVibraStatus(bool status);
- int keyVolume();
- void setKeyVolume(int volume);
- int screenVolume();
- void setScreenVolume(int volume);
- int screenVibra();
- void setScreenVibra(int volume);
- */
-#ifdef Q_OS_SYMBIAN
-private:
- //void UpdateProfileSettingsL(int profileId);
- //int commitChange();
private:
+ bool isValidProfile(int profileId) const;
+
+private:
+#ifdef Q_OS_SYMBIAN
MProfileEngineExtended2 *mEngine;
- QMap<int, MProfileExtended2*> mProfileList;
- //MProfileExtended2 *mProfileExt;
- //TProfileToneSettings *mToneSettings;
- //const MProfileFeedbackSettings *mFeedbackSettings;
- //MProfileSetFeedbackSettings *mSetFeedbackSettings;
- //CRepository *mVibraCenRep;
- int mInitErrFlag;
- CRepository *mOffLineCenRep;
+ // Valid profile id list
+ QList<int> mProfileList;
+ MProfilesNamesArray *mProfileNames;
+
+#endif // Q_OS_SYMBIAN
CpProfileModel *q_ptr;
-#endif // Q_OS_SYMBIAN
};
#endif