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.zip
rockbox-025147effbee00db8bae931b3ef3df25052e0d96.tar.gz
rockbox-025147effbee00db8bae931b3ef3df25052e0d96.tar.bz2
rockbox-025147effbee00db8bae931b3ef3df25052e0d96.tar.xz
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 5bfa795..55e1873 100644
--- a/utils/themeeditor/gui/editorwindow.h
+++ b/utils/themeeditor/gui/editorwindow.h
@@ -35,6 +35,7 @@
#include "skinviewer.h"
#include "devicestate.h"
#include "skintimer.h"
+#include "targetdata.h"
class ProjectModel;
class TabContent;
diff --git a/utils/themeeditor/gui/newprojectdialog.cpp b/utils/themeeditor/gui/newprojectdialog.cpp
index 50a8bc4..0df3250 100644
--- a/utils/themeeditor/gui/newprojectdialog.cpp
+++ b/utils/themeeditor/gui/newprojectdialog.cpp
@@ -21,6 +21,7 @@
#include "newprojectdialog.h"
#include "ui_newprojectdialog.h"
+#include "targetdata.h"
#include <QSettings>
#include <QFileDialog>
@@ -42,6 +43,13 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) :
settings.endGroup();
+ /* Populating the target box */
+ TargetData targets;
+ for(int i = 0; i < targets.count(); i++)
+ {
+ ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i));
+ }
+
/* Connecting the browse button */
QObject::connect(ui->browseButton, SIGNAL(clicked()),
this, SLOT(browse()));
@@ -56,6 +64,8 @@ void NewProjectDialog::accept()
{
status.name = ui->nameBox->text();
status.path = ui->locationBox->text();
+ status.target = ui->targetBox->itemData(ui->targetBox->currentIndex())
+ .toString();
status.sbs = ui->sbsBox->isChecked();
status.wps = ui->wpsBox->isChecked();
status.fms = ui->fmsBox->isChecked();
@@ -77,6 +87,7 @@ void NewProjectDialog::reject()
{
ui->nameBox->setText(status.name);
ui->locationBox->setText(status.path);
+ ui->targetBox->setCurrentIndex(0);
ui->sbsBox->setChecked(status.sbs);
ui->wpsBox->setChecked(status.wps);
ui->fmsBox->setChecked(status.fms);
diff --git a/utils/themeeditor/gui/newprojectdialog.h b/utils/themeeditor/gui/newprojectdialog.h
index c59607c..6a54a13 100644
--- a/utils/themeeditor/gui/newprojectdialog.h
+++ b/utils/themeeditor/gui/newprojectdialog.h
@@ -35,6 +35,7 @@ public:
{
QString name;
QString path;
+ QString target;
bool sbs;
bool wps;
bool fms;
@@ -46,6 +47,7 @@ public:
{
name = "";
path = "";
+ target = "";
sbs = true;
wps = true;
fms = false;
@@ -63,6 +65,7 @@ public:
{
name = other.name;
path = other.path;
+ target = other.target;
sbs = other.sbs;
wps = other.wps;
fms = other.fms;
diff --git a/utils/themeeditor/gui/newprojectdialog.ui b/utils/themeeditor/gui/newprojectdialog.ui
index f6e2dcc..8629211 100644
--- a/utils/themeeditor/gui/newprojectdialog.ui
+++ b/utils/themeeditor/gui/newprojectdialog.ui
@@ -63,18 +63,12 @@
<string>Target:</string>
</property>
<property name="buddy">
- <cstring>comboBox</cstring>
+ <cstring>targetBox</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
- <widget class="QComboBox" name="comboBox">
- <item>
- <property name="text">
- <string>Not Yet Available</string>
- </property>
- </item>
- </widget>
+ <widget class="QComboBox" name="targetBox"/>
</item>
<item row="4" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">