summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-24 19:16:48 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-24 19:16:48 +0000
commit966052b328b5efcf260580c91136368c003b59b6 (patch)
tree45c2fc8f3f91fd7f32dd0d06c2850276b6f85391
parentc9bbff571b726c30d19aff824872f6193d7ae5d2 (diff)
Theme Editor: Removed dependency on lingering file from devicestate.cpp, fixed formatting in device state panel, working on tag list for device panel
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27116 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/themeeditor/gui/devicestate.cpp11
-rw-r--r--utils/themeeditor/resources/deviceoptions29
2 files changed, 28 insertions, 12 deletions
diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp
index b17dcafa57..ef9d666eb2 100644
--- a/utils/themeeditor/gui/devicestate.cpp
+++ b/utils/themeeditor/gui/devicestate.cpp
@@ -20,13 +20,16 @@
****************************************************************************/
#include "devicestate.h"
-#include "ui_devicestate.h"
#include <QScrollArea>
#include <QFile>
#include <QCheckBox>
#include <QSpinBox>
#include <QComboBox>
+#include <QVBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+
DeviceState::DeviceState(QWidget *parent) :
QWidget(parent), tabs(this)
@@ -83,7 +86,8 @@ DeviceState::DeviceState(QWidget *parent) :
subLayout = new QHBoxLayout();
if(type != "check")
- subLayout->addWidget(new QLabel(elements[1].trimmed(), currentArea));
+ subLayout->addWidget(new QLabel(elements[1].trimmed(),
+ currentArea));
layout->addLayout(subLayout);
@@ -94,6 +98,9 @@ DeviceState::DeviceState(QWidget *parent) :
subLayout->addWidget(temp);
inputs.insert(tag, QPair<InputType, QWidget*>(Text, temp));
+ temp->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
+ QSizePolicy::Fixed));
+
QObject::connect(temp, SIGNAL(textChanged(QString)),
this, SLOT(input()));
}
diff --git a/utils/themeeditor/resources/deviceoptions b/utils/themeeditor/resources/deviceoptions
index cd306f50db..615f0c6500 100644
--- a/utils/themeeditor/resources/deviceoptions
+++ b/utils/themeeditor/resources/deviceoptions
@@ -8,7 +8,7 @@
# Tag Label is a human-readable label to attach to the input
#
# [input] is the type of widget that should be used for the tag, and its range
-# if applicable. The valid forms are
+# if applicable. The valid forms are:
# check - Inserts a true/false checkbox
# text - Inserts a line edit box
# slider(min, max) - Inserts a horizontal slider with range specified
@@ -27,13 +27,22 @@
# performing much of any error checking on it: screwing up the syntax may very
# well segfault the application on startup
-[Test Section 1]
-a ; Text Input ; text ; Some text
-b ; Checkbox ; check ; false
-c ; Slider 1 - 5 ; slider(1, 5) ; 4
+[Screen Sizes]
+screenwidth ; Screen Width ; spin(0,800) ; 300
+screenheight ; Screen Height ; spin(0,800) ; 200
+remotewidth ; Remote Width ; spin(0,800) ; 100
+remoteheight ; Remote Height ; spin(0,800); 50
-[Test Section 2]
-d ; Spinbox 6 - 10 ; spin(6, 10) ; 8
-e ; Float Spinbox 2.5 - 6.3; fspin(2.5, 6.3) ; 3.9
-# A combo box ends up returning an integer from 0 to n - 1, with n choices
-f ; Combo Box; combo(An option, Another Option, A Third option) ; Another Option
+[ID3 Info]
+ia ; Artist ; text ; Current Artist
+ic ; Composer ; text ; Current Composer
+iA ; Album Artist ; text ; Current Album Artist
+id ; Album Name ; text ; Current Album Name
+iG ; Grouping ; text ; Current Grouping
+ig ; Genre Name ; text ; Current Genre
+in ; Track number ; spin(1,100) ; 3
+it ; Track Title ; text ; Current Title
+iC ; Comment ; text ; Current Comment
+iv ; ID3 Version ; fspin(1,2.4); 2.0
+iy ; Year ; spin(1000,2020) ; 2008
+ik ; Disk Number ; spin(1,100) ; 1