|
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 "cxefakesettings.h" |
|
19 |
|
20 CxeFakeSettings::CxeFakeSettings() |
|
21 { |
|
22 } |
|
23 |
|
24 CxeFakeSettings::~CxeFakeSettings() |
|
25 { |
|
26 } |
|
27 |
|
28 CxeError::Id CxeFakeSettings::get(const QString& key, int& value) const |
|
29 { |
|
30 value = mSettingKeyHash[key].toInt(); |
|
31 return CxeError::None; |
|
32 } |
|
33 |
|
34 CxeError::Id CxeFakeSettings::get(const QString& key, QString &stringValue) const |
|
35 { |
|
36 stringValue = mSettingKeyHash[key].toString(); |
|
37 return CxeError::None; |
|
38 } |
|
39 |
|
40 |
|
41 |
|
42 CxeError::Id CxeFakeSettings::get(const QString &key, qreal &value) const |
|
43 { |
|
44 value = mSettingKeyHash[key].toReal(); |
|
45 return CxeError::None; |
|
46 } |
|
47 |
|
48 |
|
49 void CxeFakeSettings::get(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) const |
|
50 { |
|
51 Q_UNUSED(uid); |
|
52 Q_UNUSED(key); |
|
53 Q_UNUSED(type); |
|
54 Q_UNUSED(value); |
|
55 } |
|
56 |
|
57 |
|
58 CxeError::Id CxeFakeSettings::set(const QString& key, int newValue) |
|
59 { |
|
60 mSettingKeyHash[key] = QVariant(newValue); |
|
61 return CxeError::None; |
|
62 } |
|
63 |
|
64 CxeError::Id CxeFakeSettings::set(const QString &key, const QString &newValue) |
|
65 { |
|
66 mSettingKeyHash[key] = QVariant(newValue); |
|
67 return CxeError::None; |
|
68 } |
|
69 |
|
70 |
|
71 |
|
72 CxeError::Id CxeFakeSettings::set(const QString &key, qreal newValue) |
|
73 { |
|
74 mSettingKeyHash[key] = QVariant(newValue); |
|
75 return CxeError::None; |
|
76 } |
|
77 |
|
78 |
|
79 void CxeFakeSettings::reset() |
|
80 { |
|
81 } |
|
82 |