author | alwin <alwin> | 2005-03-17 22:39:08 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-17 22:39:08 (UTC) |
commit | 8d0d50514ea163dd6f465d37831979f0e0f73039 (patch) (unidiff) | |
tree | f19f0acc02e6605674cb301a3b7892f9f0dcce87 /core/pim/datebook/holiday/national/nationalcfg.h | |
parent | 65b5d22571cdc6ef3967005ed831376466bdf5bd (diff) | |
download | opie-8d0d50514ea163dd6f465d37831979f0e0f73039.zip opie-8d0d50514ea163dd6f465d37831979f0e0f73039.tar.gz opie-8d0d50514ea163dd6f465d37831979f0e0f73039.tar.bz2 |
added datebook plugins for xml-configurable national holidays.
may someone is needing it ;)
Diffstat (limited to 'core/pim/datebook/holiday/national/nationalcfg.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/holiday/national/nationalcfg.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/core/pim/datebook/holiday/national/nationalcfg.h b/core/pim/datebook/holiday/national/nationalcfg.h new file mode 100644 index 0000000..8f15097 --- a/dev/null +++ b/core/pim/datebook/holiday/national/nationalcfg.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef _NATIONAL_CFG_H | ||
2 | #define _NATIONAL_CFG_H | ||
3 | |||
4 | #include <qxml.h> | ||
5 | #include <qstringlist.h> | ||
6 | #include <qmap.h> | ||
7 | #include <qdatetime.h> | ||
8 | |||
9 | typedef QMap<QDate,QStringList> tholidaylist; | ||
10 | |||
11 | class NHcfg:public QXmlDefaultHandler | ||
12 | { | ||
13 | public: | ||
14 | NHcfg(); | ||
15 | virtual ~NHcfg(); | ||
16 | |||
17 | bool load(const QString&); | ||
18 | const tholidaylist&days()const; | ||
19 | |||
20 | virtual bool warning(const QXmlParseException& e); | ||
21 | virtual bool error(const QXmlParseException& e); | ||
22 | virtual bool fatalError(const QXmlParseException& e); | ||
23 | virtual bool startElement(const QString&, const QString&,const QString& name, const QXmlAttributes& attr); | ||
24 | virtual bool endElement(const QString&, const QString&,const QString& name); | ||
25 | virtual const QString&errorString()const; | ||
26 | |||
27 | protected: | ||
28 | tholidaylist _content; | ||
29 | QString _contentname; | ||
30 | QString err; | ||
31 | QString _path; | ||
32 | |||
33 | bool setName(const QXmlAttributes&); | ||
34 | bool parsevalue(const QString&,const QXmlAttributes&); | ||
35 | int stage; | ||
36 | // int pos; | ||
37 | }; | ||
38 | |||
39 | #endif | ||