93
|
1 |
#ifndef HSWIDGETCOMPONENTPARSER_H
|
|
2 |
#define HSWIDGETCOMPONENTPARSER_H
|
|
3 |
|
|
4 |
#include <QObject>
|
|
5 |
#include <QXmlStreamReader>
|
|
6 |
#include "hswidgetcomponentdescriptor.h"
|
|
7 |
|
|
8 |
class HsWidgetComponentParser : public QObject
|
|
9 |
{
|
|
10 |
Q_OBJECT
|
|
11 |
|
|
12 |
public:
|
|
13 |
HsWidgetComponentParser(const QString &aComponentManifest, QObject *parent=0);
|
|
14 |
~HsWidgetComponentParser();
|
|
15 |
HsWidgetComponentDescriptor widgetComponentDescriptor();
|
|
16 |
bool error();
|
|
17 |
private:
|
|
18 |
void parseFile(const QString &aComponentManifest);
|
|
19 |
void parseWidgetManifestTag();
|
|
20 |
void parseWidgetProviderTag();
|
|
21 |
|
|
22 |
void parseVersion1_0();
|
|
23 |
|
|
24 |
void parseUri();
|
|
25 |
void parseIcon();
|
|
26 |
void parseTitle();
|
|
27 |
void parseDescription();
|
|
28 |
void parseHidden();
|
|
29 |
void parseServiceXml();
|
|
30 |
|
|
31 |
|
|
32 |
bool isWidgetTagValid();
|
|
33 |
private:
|
|
34 |
QXmlStreamReader mParser;
|
|
35 |
HsWidgetComponentDescriptor mComponentDescriptor;
|
|
36 |
bool mError;
|
|
37 |
};
|
|
38 |
|
|
39 |
#endif // HSWIDGETCOMPONENTPARSER_H
|