Theme Editor: Added extern C declarations to header files
[kugel-rb.git] / utils / themeeditor / parsetreemodel.h
blob2d19452546971f56b61814c3d098ff5a43ff87bc
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2010 Robert Bieber
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include "skin_parser.h"
23 #include "skin_debug.h"
25 #ifndef PARSETREEMODEL_H
26 #define PARSETREEMODEL_H
28 #include <QAbstractItemModel>
29 #include <QList>
31 #include "parsetreenode.h"
33 class ParseTreeModel : public QAbstractItemModel
36 Q_OBJECT
38 public:
39 /* Initializes a tree with a skin document in a string */
40 ParseTreeModel(char* document, QObject* parent = 0);
41 virtual ~ParseTreeModel();
43 QString genCode();
45 QModelIndex index(int row, int column, const QModelIndex& parent) const;
46 QModelIndex parent(const QModelIndex &child) const;
47 int rowCount(const QModelIndex &parent) const;
48 int columnCount(const QModelIndex &parent) const;
49 QVariant data(const QModelIndex &index, int role) const;
51 private:
52 ParseTreeNode* root;
53 struct skin_element* tree;
58 #endif // PARSETREEMODEL_H