summaryrefslogtreecommitdiff
path: root/utils/themeeditor/parsetreemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/parsetreemodel.h')
-rw-r--r--utils/themeeditor/parsetreemodel.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/utils/themeeditor/parsetreemodel.h b/utils/themeeditor/parsetreemodel.h
new file mode 100644
index 0000000000..78484eb5f4
--- /dev/null
+++ b/utils/themeeditor/parsetreemodel.h
@@ -0,0 +1,59 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22extern "C"
23{
24#include "skin_parser.h"
25#include "skin_debug.h"
26}
27
28#ifndef PARSETREEMODEL_H
29#define PARSETREEMODEL_H
30
31#include <QAbstractItemModel>
32#include <QList>
33
34#include "parsetreenode.h"
35
36class ParseTreeModel : public QAbstractItemModel
37{
38
39 Q_OBJECT
40
41public:
42 /* Initializes a tree with a WPS document in a string */
43 ParseTreeModel(char* wps, QObject* parent = 0);
44 virtual ~ParseTreeModel();
45
46 QModelIndex index(int row, int column, const QModelIndex& parent) const;
47 QModelIndex parent(const QModelIndex &child) const;
48 int rowCount(const QModelIndex &parent) const;
49 int columnCount(const QModelIndex &parent) const;
50 QVariant data(const QModelIndex &index, int role) const;
51
52private:
53 ParseTreeNode* root;
54 struct skin_element* wps;
55};
56
57
58
59#endif // PARSETREEMODEL_H