|
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: Calendar widget XML reader/parser |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef SAXHANDLER_H_ |
|
19 #define SAXHANDLER_H_ |
|
20 |
|
21 #include <qxml.h> |
|
22 #include <qobject.h> |
|
23 |
|
24 class HbDocumentLoader; |
|
25 |
|
26 /*! |
|
27 \class SaxHandler |
|
28 \brief Reads and parses XML-based configuration for the calendar widget. |
|
29 */ |
|
30 class SaxHandler: public QXmlDefaultHandler |
|
31 { |
|
32 public: |
|
33 /*! |
|
34 \fn SaxHandler::SaxHandler(QObject* caller, HbDocumentLoader &loader) |
|
35 |
|
36 Constructor of the SaxHandler class. |
|
37 @param caller The calling object |
|
38 @param loader Orbit document loader |
|
39 */ |
|
40 SaxHandler(QObject* caller, HbDocumentLoader &loader); |
|
41 /*! |
|
42 \fn SaxHandler::~SaxHandler() |
|
43 |
|
44 Destructor of the SaxHandler class. |
|
45 */ |
|
46 ~SaxHandler(); |
|
47 //From QXmlDefaultHandler |
|
48 /*! |
|
49 \fn bool SaxHandler::startElement(const QString &namespaceURI, const QString &localName, const QString &qName, |
|
50 const QXmlAttributes &attributes) |
|
51 |
|
52 @param namespaceURI |
|
53 @param localName |
|
54 @param qName |
|
55 @param attributes |
|
56 */ |
|
57 bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, |
|
58 const QXmlAttributes &attributes); |
|
59 /*! |
|
60 \fn bool SaxHandler::endElement(const QString &namespaceURI, const QString &localName, const QString &qName) |
|
61 |
|
62 @param namespaceURI |
|
63 @param localName |
|
64 @param qName |
|
65 */ |
|
66 bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); |
|
67 /*! |
|
68 \fn bool SaxHandler::characters(const QString &str) |
|
69 |
|
70 @param str |
|
71 */ |
|
72 bool characters(const QString &str); |
|
73 /*! |
|
74 \fn bool SaxHandler::fatalError(const QXmlParseException &exception) |
|
75 |
|
76 @param exception |
|
77 @return |
|
78 */ |
|
79 bool fatalError(const QXmlParseException &exception); |
|
80 |
|
81 private: |
|
82 /*! |
|
83 \fn void SaxHandler::connectObject(QObject* object) |
|
84 |
|
85 @param object |
|
86 @return |
|
87 */ |
|
88 void connectObject(QObject* object); |
|
89 /*! |
|
90 \fn QString SaxHandler::createGestureSignal() |
|
91 |
|
92 @return |
|
93 */ |
|
94 QString createGestureSignal(); |
|
95 /*! |
|
96 \fn QString SaxHandler::createGestureSlot() |
|
97 |
|
98 @return |
|
99 */ |
|
100 QString createGestureSlot(); |
|
101 |
|
102 private: |
|
103 QObject* mCaller; |
|
104 QString mGestureType; |
|
105 QString mLayout; |
|
106 QString mAction; |
|
107 QList<QString> mParameters; |
|
108 bool mArgumentValue; |
|
109 HbDocumentLoader& mLoader; |
|
110 }; |
|
111 |
|
112 |
|
113 #endif /* SAXHANDLER_H_ */ |