summaryrefslogtreecommitdiff
path: root/core/pim/datebook/holiday/national/nationalcfg.h
authoralwin <alwin>2005-03-17 22:39:08 (UTC)
committer alwin <alwin>2005-03-17 22:39:08 (UTC)
commit8d0d50514ea163dd6f465d37831979f0e0f73039 (patch) (side-by-side diff)
treef19f0acc02e6605674cb301a3b7892f9f0dcce87 /core/pim/datebook/holiday/national/nationalcfg.h
parent65b5d22571cdc6ef3967005ed831376466bdf5bd (diff)
downloadopie-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.h39
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 @@
+#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