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: |
|
15 * |
|
16 */ |
|
17 #ifndef CXUISETTINGXMLREADER_H |
|
18 #define CXUISETTINGXMLREADER_H |
|
19 |
|
20 |
|
21 #include <QMap> |
|
22 #include <QString> |
|
23 #include <QStringList> |
|
24 |
|
25 #include "cxuisettingsinfo.h" |
|
26 |
|
27 class QDomElement; |
|
28 class QDomNode; |
|
29 class CxuiSettingRadioButtonList; |
|
30 class CxeEngine; |
|
31 |
|
32 |
|
33 /*! |
|
34 * Class that handles reading of settings data from xml parsing it |
|
35 */ |
|
36 class CxuiSettingXmlReader |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 CxuiSettingXmlReader(); |
|
42 ~CxuiSettingXmlReader(); |
|
43 |
|
44 CxUiSettings::RadioButtonListParams getListSettingInfo(const QString &setting, bool &found); |
|
45 CxUiSettings::SliderParams getSliderSettingInfo(const QString &setting, bool &found); |
|
46 |
|
47 public slots: |
|
48 |
|
49 void setXmlSource(const QString& uri); |
|
50 |
|
51 private: |
|
52 |
|
53 void clear(); |
|
54 void parse(); |
|
55 void parseSettings(const QDomElement &e); |
|
56 CxUiSettings::RadioButtonListParams *parseSettingList(const QDomElement &e); |
|
57 CxUiSettings::SliderParams *parseSettingSlider(const QDomElement &e); |
|
58 QDomElement findChildElement(const QDomNode &parent, const QString &name); |
|
59 |
|
60 private: |
|
61 QString mXmlUri; |
|
62 bool mParsed; |
|
63 QMap<QString, CxUiSettings::RadioButtonListParams*> mListParams; |
|
64 QMap<QString, CxUiSettings::SliderParams*> mSliderParams; |
|
65 }; |
|
66 |
|
67 #endif // CXUISETTINGXMLREADER_H |
|