sAlarm 0.5
salarm/xmlhandler.h
00001 /*
00002  * sAlarm - Scheduler
00003  * http://salarm.seberm.com
00004  *
00005  * Copyright (C) 2009-2010 Otto Sabart <seberm[at]gmail[dot]com>
00006  * 
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * version 3 as published by the Free Software Foundation.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 
00022 #ifndef XMLHANDLER_H
00023 #define XMLHANDLER_H
00024 
00025 #include <QDateTime>
00026 #include <QXmlDefaultHandler>
00027 
00028 class Scheduler;
00029 
00030 class XmlHandler : public QXmlDefaultHandler {
00031         
00032         
00033         
00034 public:
00035         
00037 
00040         XmlHandler(Scheduler *scheduler);
00041         
00043 
00052         bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts);
00053         
00055 
00064         bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName);
00065         
00067 
00072         bool characters(const QString &characters);
00073         
00075 
00079         bool fatalError(const QXmlParseException &exception);
00080         
00081         
00082 private:
00083         
00085         Scheduler *m_scheduler;
00086         
00088         QString m_currentText;
00089         
00091         QString m_scheduleCategoryName;
00092         
00094         bool m_scheduleTimeouted;
00095         
00097         QString m_scheduleTitle;
00098         
00100         QString m_scheduleText;
00101         
00103         QDateTime m_scheduleExpiration;
00104         
00105 };
00106 
00107 
00108 #endif // XMLHANDLER_H
 All Classes Functions Enumerations