summaryrefslogtreecommitdiff
path: root/utils/themeeditor/models
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-18 00:39:40 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-18 00:39:40 +0000
commiteb52a45a0c1f42386dbc0e148e81972ae3878b71 (patch)
tree28e33cf907e90ab9e3868fe2c1528a65b5d80adb /utils/themeeditor/models
parentced4080bc3a4de9788da135add5b2a150a7f94d6 (diff)
downloadrockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.zip
rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.gz
rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.bz2
rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.xz
Theme Editor: If a pr project specifies a valid #target value, its settings are now loaded into the device configuration panel when the theme is loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27476 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r--utils/themeeditor/models/targetdata.cpp9
-rw-r--r--utils/themeeditor/models/targetdata.h6
2 files changed, 12 insertions, 3 deletions
diff --git a/utils/themeeditor/models/targetdata.cpp b/utils/themeeditor/models/targetdata.cpp
index a20a4cf..70d2319 100644
--- a/utils/themeeditor/models/targetdata.cpp
+++ b/utils/themeeditor/models/targetdata.cpp
@@ -49,6 +49,7 @@ TargetData::TargetData(QString file)
QRect rSize(0, 0, 0, 0);
ScreenDepth rDepth = None;
bool fm = false;
+ bool record = false;
if(id == "")
break;
@@ -119,13 +120,19 @@ TargetData::TargetData(QString file)
if(s.toLower() == "yes")
fm = true;
}
+ else if(key.toLower() == "record")
+ {
+ QString s = scanString(data, cursor);
+ if(s.toLower() == "yes")
+ record = true;
+ }
}
}
/* Checking for the closing '}' and adding the entry */
if(require('}', data, cursor))
{
- entries.append(Entry(name, size, depth, rSize, rDepth, fm));
+ entries.append(Entry(name, size, depth, rSize, rDepth, fm, record));
indices.insert(id, index);
index++;
}
diff --git a/utils/themeeditor/models/targetdata.h b/utils/themeeditor/models/targetdata.h
index ef7ac5c..09276c5 100644
--- a/utils/themeeditor/models/targetdata.h
+++ b/utils/themeeditor/models/targetdata.h
@@ -52,14 +52,15 @@ public:
ScreenDepth screenDepth(int index){ return entries[index].depth; }
ScreenDepth remoteDepth(int index){ return entries[index].rDepth; }
bool fm(int index){ return entries[index].fm; }
+ bool canRecord(int index){ return entries[index].record; }
private:
struct Entry
{
Entry(QString name, QRect size, ScreenDepth depth, QRect rSize,
- ScreenDepth rDepth, bool fm)
+ ScreenDepth rDepth, bool fm, bool record)
: name(name), size(size), depth(depth), rSize(rSize),
- rDepth(rDepth), fm(fm){ }
+ rDepth(rDepth), fm(fm), record(record){ }
QString name;
QRect size;
@@ -67,6 +68,7 @@ private:
QRect rSize;
ScreenDepth rDepth;
bool fm;
+ bool record;
};
static const QString reserved;