Fix configure/make reconf
[kugel-rb.git] / utils / themeeditor / projectfiles.h
blob6fec62882c1173768cf8b2bda5da59f3b187528e
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 #ifndef PROJECTFILES_H
23 #define PROJECTFILES_H
25 #include "projectmodel.h"
26 #include <QHash>
28 class ProjectFiles : public ProjectNode
30 public:
31 ProjectFiles(QHash<QString, QString>& settings, ProjectModel* model,
32 ProjectNode* parent);
33 virtual ~ProjectFiles();
35 virtual ProjectNode* parent() const;
36 virtual ProjectNode* child(int row) const;
37 virtual int numChildren() const;
38 virtual int row() const;
39 virtual QVariant data(int column) const;
40 virtual Qt::ItemFlags flags(int column) const;
41 virtual void activated();
43 QString getBase(){ return base; }
45 private:
46 ProjectNode* parentLink;
47 QString base;
51 /* A class to enumerate a single file */
52 class ProjectFile: public ProjectNode
54 public:
55 ProjectFile(QString file, ProjectModel* model, ProjectNode* parent);
56 virtual ~ProjectFile();
58 virtual ProjectNode* parent() const{ return parentLink; }
59 virtual ProjectNode* child(int row) const{ return 0; }
60 virtual int numChildren() const{ return 0; }
61 virtual int row() const{
62 return parentLink->indexOf(const_cast<ProjectFile*>(this));
64 virtual QVariant data(int column) const;
65 virtual Qt::ItemFlags flags(int column) const;
66 virtual void activated();
68 private:
69 ProjectNode* parentLink;
70 QString file;
73 #endif // PROJECTFILES_H