blob: 8f15097997656d89e1c8b0f8ebdebef778c42484 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef _NATIONAL_CFG_H
#define _NATIONAL_CFG_H
#include <qxml.h>
#include <qstringlist.h>
#include <qmap.h>
#include <qdatetime.h>
typedef QMap<QDate,QStringList> tholidaylist;
class NHcfg:public QXmlDefaultHandler
{
public:
NHcfg();
virtual ~NHcfg();
bool load(const QString&);
const tholidaylist&days()const;
virtual bool warning(const QXmlParseException& e);
virtual bool error(const QXmlParseException& e);
virtual bool fatalError(const QXmlParseException& e);
virtual bool startElement(const QString&, const QString&,const QString& name, const QXmlAttributes& attr);
virtual bool endElement(const QString&, const QString&,const QString& name);
virtual const QString&errorString()const;
protected:
tholidaylist _content;
QString _contentname;
QString err;
QString _path;
bool setName(const QXmlAttributes&);
bool parsevalue(const QString&,const QXmlAttributes&);
int stage;
// int pos;
};
#endif
|