controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.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 CPPROFILEMODEL_P_H
       
    19 #define CPPROFILEMODEL_P_H
       
    20 
       
    21 #include <qglobal.h>
       
    22 #include <QList>
       
    23 class CpProfileModel;
       
    24 class CpProfileSettings;
       
    25 class MProfileEngineExtended2;
       
    26 class MProfileExtended2;
       
    27 class MProfileFeedbackSettings;
       
    28 class MProfileSetFeedbackSettings;
       
    29 class CRepository;
       
    30 class QStringList;
       
    31 class MProfilesNamesArray;
       
    32 struct TProfileToneSettings; 
       
    33 class CpProfileModelPrivate
       
    34 {
       
    35     Q_DECLARE_PUBLIC(CpProfileModel)
       
    36 public:
       
    37     CpProfileModelPrivate();
       
    38     ~CpProfileModelPrivate();
       
    39     void initialize(CpProfileModel *parent);
       
    40 public:
       
    41     QString profileName(int profileId) const;
       
    42     QStringList profileNames() const;
       
    43     int activateProfile(int profileId);
       
    44     int activeProfileId() const;
       
    45     void profileSettings(int profileId, CpProfileSettings& profileSettings);
       
    46     void setProfileSettings(int profileId, CpProfileSettings& profileSettings);
       
    47 
       
    48     QString ringTone() const;
       
    49     void setRingTone(const QString& filePath);
       
    50 
       
    51     int masterVolume() const;
       
    52     void setMasterVolume(int volume);
       
    53 
       
    54     bool masterVibra() const;
       
    55     void setMasterVibra(bool isVibra);
       
    56 
       
    57     bool silenceMode() const;
       
    58     void setSilenceMode(bool isSlience);
       
    59 
       
    60     QString ringTone(int profileId)const;
       
    61     void setRingTone(int profileId, const QString& filePath);
       
    62     QString messageTone(int profileId) const;
       
    63     void setMessageTone(int profileId, const QString& filePath);
       
    64     QString emailTone(int profileId) const;
       
    65     void setEmailTone(int profileId, const QString& filePath);
       
    66     QString reminderTone(int profileId) const;
       
    67     void setReminderTone(int profileId, const QString& filePath);
       
    68     
       
    69     bool notificationTone(int profileId) const;
       
    70     void setNotificationTone(int profileId, bool isActive);
       
    71     
       
    72     int keyTouchScreenTone(int profileId) const;
       
    73     void setKeyTouchScreenTone(int profileId, int level);
       
    74     
       
    75     int keyTouchScreenVibra(int profileId)const;
       
    76     void setKeyTouchScreenVibra(int profileId, int level);
       
    77 
       
    78 private:
       
    79     bool isValidProfile(int profileId) const;
       
    80     
       
    81 private:
       
    82 #ifdef Q_OS_SYMBIAN
       
    83     MProfileEngineExtended2 *mEngine;
       
    84     // Valid profile id list
       
    85     QList<int> mProfileList;
       
    86     MProfilesNamesArray *mProfileNames;
       
    87 
       
    88 #endif // Q_OS_SYMBIAN
       
    89     CpProfileModel *q_ptr;
       
    90 };
       
    91 
       
    92 #endif