diff options
Diffstat (limited to 'utils/themeeditor/models')
-rw-r--r-- | utils/themeeditor/models/targetdata.cpp | 9 | ||||
-rw-r--r-- | utils/themeeditor/models/targetdata.h | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/utils/themeeditor/models/targetdata.cpp b/utils/themeeditor/models/targetdata.cpp index a20a4cf18f..70d231988b 100644 --- a/utils/themeeditor/models/targetdata.cpp +++ b/utils/themeeditor/models/targetdata.cpp | |||
@@ -49,6 +49,7 @@ TargetData::TargetData(QString file) | |||
49 | QRect rSize(0, 0, 0, 0); | 49 | QRect rSize(0, 0, 0, 0); |
50 | ScreenDepth rDepth = None; | 50 | ScreenDepth rDepth = None; |
51 | bool fm = false; | 51 | bool fm = false; |
52 | bool record = false; | ||
52 | 53 | ||
53 | if(id == "") | 54 | if(id == "") |
54 | break; | 55 | break; |
@@ -119,13 +120,19 @@ TargetData::TargetData(QString file) | |||
119 | if(s.toLower() == "yes") | 120 | if(s.toLower() == "yes") |
120 | fm = true; | 121 | fm = true; |
121 | } | 122 | } |
123 | else if(key.toLower() == "record") | ||
124 | { | ||
125 | QString s = scanString(data, cursor); | ||
126 | if(s.toLower() == "yes") | ||
127 | record = true; | ||
128 | } | ||
122 | } | 129 | } |
123 | } | 130 | } |
124 | 131 | ||
125 | /* Checking for the closing '}' and adding the entry */ | 132 | /* Checking for the closing '}' and adding the entry */ |
126 | if(require('}', data, cursor)) | 133 | if(require('}', data, cursor)) |
127 | { | 134 | { |
128 | entries.append(Entry(name, size, depth, rSize, rDepth, fm)); | 135 | entries.append(Entry(name, size, depth, rSize, rDepth, fm, record)); |
129 | indices.insert(id, index); | 136 | indices.insert(id, index); |
130 | index++; | 137 | index++; |
131 | } | 138 | } |
diff --git a/utils/themeeditor/models/targetdata.h b/utils/themeeditor/models/targetdata.h index ef7ac5c8a9..09276c5966 100644 --- a/utils/themeeditor/models/targetdata.h +++ b/utils/themeeditor/models/targetdata.h | |||
@@ -52,14 +52,15 @@ public: | |||
52 | ScreenDepth screenDepth(int index){ return entries[index].depth; } | 52 | ScreenDepth screenDepth(int index){ return entries[index].depth; } |
53 | ScreenDepth remoteDepth(int index){ return entries[index].rDepth; } | 53 | ScreenDepth remoteDepth(int index){ return entries[index].rDepth; } |
54 | bool fm(int index){ return entries[index].fm; } | 54 | bool fm(int index){ return entries[index].fm; } |
55 | bool canRecord(int index){ return entries[index].record; } | ||
55 | 56 | ||
56 | private: | 57 | private: |
57 | struct Entry | 58 | struct Entry |
58 | { | 59 | { |
59 | Entry(QString name, QRect size, ScreenDepth depth, QRect rSize, | 60 | Entry(QString name, QRect size, ScreenDepth depth, QRect rSize, |
60 | ScreenDepth rDepth, bool fm) | 61 | ScreenDepth rDepth, bool fm, bool record) |
61 | : name(name), size(size), depth(depth), rSize(rSize), | 62 | : name(name), size(size), depth(depth), rSize(rSize), |
62 | rDepth(rDepth), fm(fm){ } | 63 | rDepth(rDepth), fm(fm), record(record){ } |
63 | 64 | ||
64 | QString name; | 65 | QString name; |
65 | QRect size; | 66 | QRect size; |
@@ -67,6 +68,7 @@ private: | |||
67 | QRect rSize; | 68 | QRect rSize; |
68 | ScreenDepth rDepth; | 69 | ScreenDepth rDepth; |
69 | bool fm; | 70 | bool fm; |
71 | bool record; | ||
70 | }; | 72 | }; |
71 | 73 | ||
72 | static const QString reserved; | 74 | static const QString reserved; |