comparison data/fileio/QueryConfigReader.h @ 15:11e298cdb9e7

add - EasaierSessionManager - Easaier menus - Interval model
author lbajardsilogic
date Mon, 14 May 2007 13:10:49 +0000
parents
children 59d84a8bb76c
comparison
equal deleted inserted replaced
14:819ad579459f 15:11e298cdb9e7
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /* Sound Access
4 EASAIER client application.
5 Silogic 2007. Laure Bajard.
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version. See the file
11 COPYING included with this distribution for more information.
12 */
13
14 #ifndef _QUERY_CONFIG_READER_H_
15 #define _QUERY_CONFIG_READER_H_
16
17 #include <QXmlDefaultHandler>
18
19 class QueryModel;
20
21 class QueryConfigReader
22 {
23 public:
24 QueryConfigReader(QueryModel * queryModel);
25 virtual ~QueryConfigReader(){}
26
27 bool parse(const QString & filename);
28
29 private:
30
31 QueryModel *m_queryModel;
32 };
33
34 class QueryConfigHandler : public QXmlDefaultHandler
35 {
36 public:
37 QueryConfigHandler(QueryModel * queryModel);
38
39 bool startElement(const QString &namespaceURI, const QString &localName,
40 const QString &qName, const QXmlAttributes &attributes);
41 bool endElement(const QString &namespaceURI, const QString &localName,
42 const QString &qName);
43 bool characters(const QString &str);
44 bool error(const QXmlParseException &exception);
45 bool fatalError(const QXmlParseException &exception);
46
47
48 private:
49
50 bool m_inTheme;
51 bool m_inFieldGroup;
52
53 QueryModel *m_queryModel;
54 };
55
56 #endif