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:
parent
c9bbff571b
commit
966052b328
2 changed files with 28 additions and 12 deletions
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue