diff options
Diffstat (limited to 'utils/themeeditor/projectsettings.cpp')
-rw-r--r-- | utils/themeeditor/projectsettings.cpp | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/utils/themeeditor/projectsettings.cpp b/utils/themeeditor/projectsettings.cpp deleted file mode 100644 index a477f2bdfc..0000000000 --- a/utils/themeeditor/projectsettings.cpp +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
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 | |||
22 | #include "projectsettings.h" | ||
23 | |||
24 | ProjectSettings::ProjectSettings(QHash<QString, QString>& settings, | ||
25 | ProjectModel* model, ProjectNode* parent) | ||
26 | : parentLink(parent) | ||
27 | { | ||
28 | QHash<QString, QString>::iterator i; | ||
29 | for(i = settings.begin(); i != settings.end(); i++) | ||
30 | { | ||
31 | QPair<QString, QString> value(i.key(), i.value()); | ||
32 | children.append(new ProjectSetting(value, model, this)); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | ProjectSettings::~ProjectSettings() | ||
37 | { | ||
38 | for(int i = 0; i < children.count(); i++) | ||
39 | delete children[i]; | ||
40 | } | ||
41 | |||
42 | ProjectNode* ProjectSettings::parent() const | ||
43 | { | ||
44 | return parentLink; | ||
45 | } | ||
46 | |||
47 | ProjectNode* ProjectSettings::child(int row) const | ||
48 | { | ||
49 | if(row >= 0 && row < children.count()) | ||
50 | return children[row]; | ||
51 | |||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | int ProjectSettings::numChildren() const | ||
56 | { | ||
57 | return children.count(); | ||
58 | } | ||
59 | |||
60 | int ProjectSettings::row() const | ||
61 | { | ||
62 | return parentLink->indexOf(const_cast<ProjectSettings*>(this)); | ||
63 | } | ||
64 | |||
65 | QVariant ProjectSettings::data(int column) const | ||
66 | { | ||
67 | if(column == 0) | ||
68 | return QObject::tr("Project Settings"); | ||
69 | else | ||
70 | return QVariant(); | ||
71 | } | ||
72 | |||
73 | Qt::ItemFlags ProjectSettings::flags(int column) const | ||
74 | { | ||
75 | if(column == 0) | ||
76 | return Qt::ItemIsEnabled | Qt::ItemIsSelectable; | ||
77 | else | ||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | void ProjectSettings::activated() | ||
82 | { | ||
83 | |||
84 | } | ||
85 | |||
86 | /* Project File functions */ | ||
87 | ProjectSetting::ProjectSetting(QPair<QString, QString> setting, | ||
88 | ProjectModel* model, ProjectNode* parent) | ||
89 | :parentLink(parent), setting(setting) | ||
90 | { | ||
91 | this->model = model; | ||
92 | } | ||
93 | |||
94 | ProjectSetting::~ProjectSetting() | ||
95 | { | ||
96 | |||
97 | } | ||
98 | |||
99 | QVariant ProjectSetting::data(int column) const | ||
100 | { | ||
101 | if(column == 0) | ||
102 | return setting.first; | ||
103 | else if(column == 1) | ||
104 | return setting.second; | ||
105 | else | ||
106 | return QVariant(); | ||
107 | } | ||
108 | |||
109 | Qt::ItemFlags ProjectSetting::flags(int column) const | ||
110 | { | ||
111 | if(column == 0 || column == 1) | ||
112 | return Qt::ItemIsEnabled | Qt::ItemIsSelectable; | ||
113 | else | ||
114 | return 0; | ||
115 | } | ||
116 | |||
117 | void ProjectSetting::activated() | ||
118 | { | ||
119 | } | ||
120 | |||