1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Robert Bieber 2010-06-24 19:16:48 +00:00
parent c9bbff571b
commit 966052b328
2 changed files with 28 additions and 12 deletions

View file

@ -20,13 +20,16 @@
****************************************************************************/ ****************************************************************************/
#include "devicestate.h" #include "devicestate.h"
#include "ui_devicestate.h"
#include <QScrollArea> #include <QScrollArea>
#include <QFile> #include <QFile>
#include <QCheckBox> #include <QCheckBox>
#include <QSpinBox> #include <QSpinBox>
#include <QComboBox> #include <QComboBox>
#include <QVBoxLayout>
#include <QLabel>
#include <QLineEdit>
DeviceState::DeviceState(QWidget *parent) : DeviceState::DeviceState(QWidget *parent) :
QWidget(parent), tabs(this) QWidget(parent), tabs(this)
@ -83,7 +86,8 @@ DeviceState::DeviceState(QWidget *parent) :
subLayout = new QHBoxLayout(); subLayout = new QHBoxLayout();
if(type != "check") if(type != "check")
subLayout->addWidget(new QLabel(elements[1].trimmed(), currentArea)); subLayout->addWidget(new QLabel(elements[1].trimmed(),
currentArea));
layout->addLayout(subLayout); layout->addLayout(subLayout);
@ -94,6 +98,9 @@ DeviceState::DeviceState(QWidget *parent) :
subLayout->addWidget(temp); subLayout->addWidget(temp);
inputs.insert(tag, QPair<InputType, QWidget*>(Text, temp)); inputs.insert(tag, QPair<InputType, QWidget*>(Text, temp));
temp->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Fixed));
QObject::connect(temp, SIGNAL(textChanged(QString)), QObject::connect(temp, SIGNAL(textChanged(QString)),
this, SLOT(input())); this, SLOT(input()));
} }

View file

@ -8,7 +8,7 @@
# Tag Label is a human-readable label to attach to the input # 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 # [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 # check - Inserts a true/false checkbox
# text - Inserts a line edit box # text - Inserts a line edit box
# slider(min, max) - Inserts a horizontal slider with range specified # 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 # performing much of any error checking on it: screwing up the syntax may very
# well segfault the application on startup # well segfault the application on startup
[Test Section 1] [Screen Sizes]
a ; Text Input ; text ; Some text screenwidth ; Screen Width ; spin(0,800) ; 300
b ; Checkbox ; check ; false screenheight ; Screen Height ; spin(0,800) ; 200
c ; Slider 1 - 5 ; slider(1, 5) ; 4 remotewidth ; Remote Width ; spin(0,800) ; 100
remoteheight ; Remote Height ; spin(0,800); 50
[Test Section 2] [ID3 Info]
d ; Spinbox 6 - 10 ; spin(6, 10) ; 8 ia ; Artist ; text ; Current Artist
e ; Float Spinbox 2.5 - 6.3; fspin(2.5, 6.3) ; 3.9 ic ; Composer ; text ; Current Composer
# A combo box ends up returning an integer from 0 to n - 1, with n choices iA ; Album Artist ; text ; Current Album Artist
f ; Combo Box; combo(An option, Another Option, A Third option) ; Another Option 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