34
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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: Stub for FM Radio home screen widget unit testing.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef XQSETTINGSMANAGER_H
|
|
19 |
#define XQSETTINGSMANAGER_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <QObject>
|
|
23 |
#include <QVariant>
|
|
24 |
|
|
25 |
// Forward declarations
|
|
26 |
class XQSettingsKey;
|
|
27 |
|
|
28 |
class XQSettingsManager : public QObject
|
|
29 |
{
|
|
30 |
Q_OBJECT
|
|
31 |
|
|
32 |
public:
|
|
33 |
|
|
34 |
enum Type
|
|
35 |
{
|
|
36 |
TypeVariant = 0,
|
|
37 |
TypeInt,
|
|
38 |
TypeDouble,
|
|
39 |
TypeString,
|
|
40 |
TypeByteArray
|
|
41 |
};
|
|
42 |
|
|
43 |
enum Error
|
|
44 |
{
|
|
45 |
NoError = 0,
|
|
46 |
OutOfMemoryError,
|
|
47 |
NotFoundError,
|
|
48 |
AlreadyExistsError,
|
|
49 |
PermissionDeniedError,
|
|
50 |
BadTypeError,
|
|
51 |
NotSupportedError,
|
|
52 |
UnknownError = -1
|
|
53 |
};
|
|
54 |
|
|
55 |
XQSettingsManager(QObject* parent = 0);
|
|
56 |
~XQSettingsManager();
|
|
57 |
|
|
58 |
QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
|
|
59 |
bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
|
|
60 |
bool stopMonitoring(const XQSettingsKey& key);
|
|
61 |
|
|
62 |
signals:
|
|
63 |
void valueChanged(const XQSettingsKey& key, const QVariant& value);
|
|
64 |
void itemDeleted(const XQSettingsKey& key);
|
|
65 |
|
|
66 |
};
|
|
67 |
|
|
68 |
#endif // XQSETTINGSMANAGER_H
|