31
|
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 |
#include "cpprofilemodel.h"
|
|
19 |
#include "cpprofilemodel_p.h"
|
|
20 |
|
|
21 |
CpProfileModel::CpProfileModel()
|
|
22 |
{
|
|
23 |
dptr = new CpProfileModelPrivate();
|
|
24 |
}
|
|
25 |
|
|
26 |
CpProfileModel::~CpProfileModel()
|
|
27 |
{
|
|
28 |
delete dptr;
|
|
29 |
}
|
|
30 |
|
|
31 |
/*
|
|
32 |
* Get the result of the initiation
|
|
33 |
*/
|
|
34 |
int CpProfileModel::initiationFlag()
|
|
35 |
{
|
|
36 |
return dptr->initiationFlag();
|
|
37 |
}
|
|
38 |
|
|
39 |
/*
|
|
40 |
* Get path and file name of ring tone file
|
|
41 |
*/
|
|
42 |
QString CpProfileModel::ringTone()
|
|
43 |
{
|
|
44 |
return dptr->ringTone();
|
|
45 |
}
|
|
46 |
|
|
47 |
/*
|
|
48 |
* Set path and file to ring tone
|
|
49 |
*/
|
|
50 |
void CpProfileModel::setRingTone(const QString& filePath)
|
|
51 |
{
|
|
52 |
dptr->setRingTone(filePath);
|
|
53 |
}
|
|
54 |
|
|
55 |
/*
|
|
56 |
* Get path and file name of message tone file
|
|
57 |
*/
|
|
58 |
QString CpProfileModel::messageTone()
|
|
59 |
{
|
|
60 |
return dptr->messageTone();
|
|
61 |
}
|
|
62 |
|
|
63 |
/*
|
|
64 |
* Set path and file to message tone
|
|
65 |
*/
|
|
66 |
void CpProfileModel::setMessageTone(const QString& filePath)
|
|
67 |
{
|
|
68 |
dptr->setMessageTone(filePath);
|
|
69 |
}
|
|
70 |
|
|
71 |
/*
|
|
72 |
* Get path and file name of email tone file
|
|
73 |
*/
|
|
74 |
QString CpProfileModel::emailTone()
|
|
75 |
{
|
|
76 |
return dptr->emailTone();
|
|
77 |
}
|
|
78 |
|
|
79 |
/*
|
|
80 |
* Set path and file to email tone
|
|
81 |
*/
|
|
82 |
void CpProfileModel::setEmailTone(const QString& filePath)
|
|
83 |
{
|
|
84 |
dptr->setEmailTone(filePath);
|
|
85 |
}
|
|
86 |
|
|
87 |
/*
|
|
88 |
* Get path and file name of calendar event tone file
|
|
89 |
*/
|
|
90 |
QString CpProfileModel::calendarTone()
|
|
91 |
{
|
|
92 |
return dptr->calendarTone();
|
|
93 |
}
|
|
94 |
|
|
95 |
/*
|
|
96 |
* Set path and file to calendar event tone
|
|
97 |
*/
|
|
98 |
void CpProfileModel::setCalendarTone(const QString& filePath)
|
|
99 |
{
|
|
100 |
dptr->setCalendarTone(filePath);
|
|
101 |
}
|
|
102 |
|
|
103 |
/*
|
|
104 |
* Get path and file name of clock alarm tone file
|
|
105 |
*/
|
|
106 |
QString CpProfileModel::alarmTone()
|
|
107 |
{
|
|
108 |
return dptr->alarmTone();
|
|
109 |
}
|
|
110 |
|
|
111 |
/*
|
|
112 |
* Set path and file to clock alarm tone
|
|
113 |
*/
|
|
114 |
void CpProfileModel::setAlarmTone(const QString& filePath)
|
|
115 |
{
|
|
116 |
dptr->setAlarmTone(filePath);
|
|
117 |
}
|
|
118 |
|
|
119 |
/*
|
|
120 |
* Get the value of master volume
|
|
121 |
*/
|
|
122 |
int CpProfileModel::ringVolume()
|
|
123 |
{
|
|
124 |
return dptr->ringVolume();
|
|
125 |
}
|
|
126 |
|
|
127 |
/*
|
|
128 |
* Set master volume, the value should be between 1-10
|
|
129 |
*/
|
|
130 |
void CpProfileModel::setRingVolume(int volume)
|
|
131 |
{
|
|
132 |
dptr->setRingVolume(volume);
|
|
133 |
}
|
|
134 |
|
|
135 |
/*
|
|
136 |
* Activate master volume to beep
|
|
137 |
*/
|
|
138 |
void CpProfileModel::activateBeep()
|
|
139 |
{
|
|
140 |
dptr->activateBeep();
|
|
141 |
}
|
|
142 |
|
|
143 |
/*
|
|
144 |
* Get beep status in master volume
|
|
145 |
*/
|
|
146 |
bool CpProfileModel::isBeep()
|
|
147 |
{
|
|
148 |
return dptr->isBeep();
|
|
149 |
}
|
|
150 |
|
|
151 |
/*
|
|
152 |
* Activate master volume to silent
|
|
153 |
*/
|
|
154 |
void CpProfileModel::activateSilent()
|
|
155 |
{
|
|
156 |
dptr->activateSilent();
|
|
157 |
}
|
|
158 |
|
|
159 |
/*
|
|
160 |
* Get silent status in master volume
|
|
161 |
*/
|
|
162 |
bool CpProfileModel::isSilent()
|
|
163 |
{
|
|
164 |
return dptr->isSilent();
|
|
165 |
}
|
|
166 |
|
|
167 |
/*
|
|
168 |
* Get master vibra's status
|
|
169 |
*/
|
|
170 |
bool CpProfileModel::vibraStatus()
|
|
171 |
{
|
|
172 |
return dptr->vibraStatus();
|
|
173 |
}
|
|
174 |
|
|
175 |
/*
|
|
176 |
* Set master vibra's status
|
|
177 |
*/
|
|
178 |
void CpProfileModel::setVibraStatus(bool status)
|
|
179 |
{
|
|
180 |
dptr->setVibraStatus(status);
|
|
181 |
}
|
|
182 |
|
|
183 |
/*
|
|
184 |
* Get keypad' volume
|
|
185 |
*/
|
|
186 |
int CpProfileModel::keyVolume()
|
|
187 |
{
|
|
188 |
return dptr->keyVolume();
|
|
189 |
}
|
|
190 |
|
|
191 |
/*
|
|
192 |
* Set keypad's volume,
|
|
193 |
* the value of the volume should be between 0-3
|
|
194 |
*/
|
|
195 |
void CpProfileModel::setKeyVolume(int volume)
|
|
196 |
{
|
|
197 |
dptr->setKeyVolume(volume);
|
|
198 |
}
|
|
199 |
|
|
200 |
/*
|
|
201 |
* Get screen tone's volume
|
|
202 |
*/
|
|
203 |
int CpProfileModel::screenVolume()
|
|
204 |
{
|
|
205 |
return dptr->screenVolume();
|
|
206 |
}
|
|
207 |
|
|
208 |
/*
|
|
209 |
* Set screen tone's volume,
|
|
210 |
* the value of the volume should be between 0-3
|
|
211 |
*/
|
|
212 |
void CpProfileModel::setScreenVolume(int volume)
|
|
213 |
{
|
|
214 |
dptr->setScreenVolume(volume);
|
|
215 |
}
|
|
216 |
|
|
217 |
/*
|
|
218 |
* Get screen vibra's level
|
|
219 |
*/
|
|
220 |
int CpProfileModel::screenVibra()
|
|
221 |
{
|
|
222 |
return dptr->screenVibra();
|
|
223 |
}
|
|
224 |
|
|
225 |
/*
|
|
226 |
* Set screen vibra's level,
|
|
227 |
* the value of the level should be between 0-3
|
|
228 |
*/
|
|
229 |
void CpProfileModel::setScreenVibra(int volume)
|
|
230 |
{
|
|
231 |
dptr->setScreenVibra(volume);
|
|
232 |
}
|
|
233 |
|
|
234 |
// End of file
|
|
235 |
|