summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-16 20:47:23 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-16 20:47:23 +0000
commit025147effbee00db8bae931b3ef3df25052e0d96 (patch)
treedb2df79d33b48f115fa35ffd9ae24f97c2bdc28b /utils/themeeditor/gui
parent1c1d10b9fdfc2b78c5aeba4c352cd7dbc0717edc (diff)
downloadrockbox-025147effbee00db8bae931b3ef3df25052e0d96.tar.gz
rockbox-025147effbee00db8bae931b3ef3df25052e0d96.zip
Theme Editor: Added target database, now populates combo box in new project dialog but otherwise not used yet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27450 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui')
-rw-r--r--utils/themeeditor/gui/editorwindow.h1
-rw-r--r--utils/themeeditor/gui/newprojectdialog.cpp11
-rw-r--r--utils/themeeditor/gui/newprojectdialog.h3
-rw-r--r--utils/themeeditor/gui/newprojectdialog.ui10
4 files changed, 17 insertions, 8 deletions
diff --git a/utils/themeeditor/gui/editorwindow.h b/utils/themeeditor/gui/editorwindow.h
index 5bfa795714..55e18732d0 100644
--- a/utils/themeeditor/gui/editorwindow.h
+++ b/utils/themeeditor/gui/editorwindow.h
@@ -35,6 +35,7 @@
35#include "skinviewer.h" 35#include "skinviewer.h"
36#include "devicestate.h" 36#include "devicestate.h"
37#include "skintimer.h" 37#include "skintimer.h"
38#include "targetdata.h"
38 39
39class ProjectModel; 40class ProjectModel;
40class TabContent; 41class TabContent;
diff --git a/utils/themeeditor/gui/newprojectdialog.cpp b/utils/themeeditor/gui/newprojectdialog.cpp
index 50a8bc4631..0df3250c5b 100644
--- a/utils/themeeditor/gui/newprojectdialog.cpp
+++ b/utils/themeeditor/gui/newprojectdialog.cpp
@@ -21,6 +21,7 @@
21 21
22#include "newprojectdialog.h" 22#include "newprojectdialog.h"
23#include "ui_newprojectdialog.h" 23#include "ui_newprojectdialog.h"
24#include "targetdata.h"
24 25
25#include <QSettings> 26#include <QSettings>
26#include <QFileDialog> 27#include <QFileDialog>
@@ -42,6 +43,13 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) :
42 43
43 settings.endGroup(); 44 settings.endGroup();
44 45
46 /* Populating the target box */
47 TargetData targets;
48 for(int i = 0; i < targets.count(); i++)
49 {
50 ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i));
51 }
52
45 /* Connecting the browse button */ 53 /* Connecting the browse button */
46 QObject::connect(ui->browseButton, SIGNAL(clicked()), 54 QObject::connect(ui->browseButton, SIGNAL(clicked()),
47 this, SLOT(browse())); 55 this, SLOT(browse()));
@@ -56,6 +64,8 @@ void NewProjectDialog::accept()
56{ 64{
57 status.name = ui->nameBox->text(); 65 status.name = ui->nameBox->text();
58 status.path = ui->locationBox->text(); 66 status.path = ui->locationBox->text();
67 status.target = ui->targetBox->itemData(ui->targetBox->currentIndex())
68 .toString();
59 status.sbs = ui->sbsBox->isChecked(); 69 status.sbs = ui->sbsBox->isChecked();
60 status.wps = ui->wpsBox->isChecked(); 70 status.wps = ui->wpsBox->isChecked();
61 status.fms = ui->fmsBox->isChecked(); 71 status.fms = ui->fmsBox->isChecked();
@@ -77,6 +87,7 @@ void NewProjectDialog::reject()
77{ 87{
78 ui->nameBox->setText(status.name); 88 ui->nameBox->setText(status.name);
79 ui->locationBox->setText(status.path); 89 ui->locationBox->setText(status.path);
90 ui->targetBox->setCurrentIndex(0);
80 ui->sbsBox->setChecked(status.sbs); 91 ui->sbsBox->setChecked(status.sbs);
81 ui->wpsBox->setChecked(status.wps); 92 ui->wpsBox->setChecked(status.wps);
82 ui->fmsBox->setChecked(status.fms); 93 ui->fmsBox->setChecked(status.fms);
diff --git a/utils/themeeditor/gui/newprojectdialog.h b/utils/themeeditor/gui/newprojectdialog.h
index c59607c53f..6a54a133bc 100644
--- a/utils/themeeditor/gui/newprojectdialog.h
+++ b/utils/themeeditor/gui/newprojectdialog.h
@@ -35,6 +35,7 @@ public:
35 { 35 {
36 QString name; 36 QString name;
37 QString path; 37 QString path;
38 QString target;
38 bool sbs; 39 bool sbs;
39 bool wps; 40 bool wps;
40 bool fms; 41 bool fms;
@@ -46,6 +47,7 @@ public:
46 { 47 {
47 name = ""; 48 name = "";
48 path = ""; 49 path = "";
50 target = "";
49 sbs = true; 51 sbs = true;
50 wps = true; 52 wps = true;
51 fms = false; 53 fms = false;
@@ -63,6 +65,7 @@ public:
63 { 65 {
64 name = other.name; 66 name = other.name;
65 path = other.path; 67 path = other.path;
68 target = other.target;
66 sbs = other.sbs; 69 sbs = other.sbs;
67 wps = other.wps; 70 wps = other.wps;
68 fms = other.fms; 71 fms = other.fms;
diff --git a/utils/themeeditor/gui/newprojectdialog.ui b/utils/themeeditor/gui/newprojectdialog.ui
index f6e2dcc139..86292119c7 100644
--- a/utils/themeeditor/gui/newprojectdialog.ui
+++ b/utils/themeeditor/gui/newprojectdialog.ui
@@ -63,18 +63,12 @@
63 <string>Target:</string> 63 <string>Target:</string>
64 </property> 64 </property>
65 <property name="buddy"> 65 <property name="buddy">
66 <cstring>comboBox</cstring> 66 <cstring>targetBox</cstring>
67 </property> 67 </property>
68 </widget> 68 </widget>
69 </item> 69 </item>
70 <item row="2" column="1"> 70 <item row="2" column="1">
71 <widget class="QComboBox" name="comboBox"> 71 <widget class="QComboBox" name="targetBox"/>
72 <item>
73 <property name="text">
74 <string>Not Yet Available</string>
75 </property>
76 </item>
77 </widget>
78 </item> 72 </item>
79 <item row="4" column="0" colspan="2"> 73 <item row="4" column="0" colspan="2">
80 <widget class="QGroupBox" name="groupBox"> 74 <widget class="QGroupBox" name="groupBox">