1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Robert Bieber
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
43 virtual ~TargetData();
45 int count(){ return indices
.count(); }
46 int index(QString id
){ return indices
.value(id
, -1); }
48 QString
id(int index
){ return indices
.key(index
, ""); }
49 QString
name(int index
){ return entries
[index
].name
; }
50 QRect
screenSize(int index
){ return entries
[index
].size
; }
51 QRect
remoteSize(int index
){ return entries
[index
].rSize
; }
52 ScreenDepth
screenDepth(int index
){ return entries
[index
].depth
; }
53 ScreenDepth
remoteDepth(int index
){ return entries
[index
].rDepth
; }
54 bool fm(int index
){ return entries
[index
].fm
; }
55 bool canRecord(int index
){ return entries
[index
].record
; }
60 Entry(QString id
, QString name
, QRect size
, ScreenDepth depth
,
61 QRect rSize
, ScreenDepth rDepth
, bool fm
, bool record
)
62 : id(id
), name(name
), size(size
), depth(depth
), rSize(rSize
),
63 rDepth(rDepth
), fm(fm
), record(record
){ }
75 static const QString reserved
;
77 QString
scanString(QString data
, int& index
);
78 int scanInt(QString data
, int& index
);
79 ScreenDepth
scanDepth(QString data
, int& index
);
80 void skipComment(QString data
, int& index
);
81 bool require(QChar required
, QString data
, int& index
);
83 QHash
<QString
, int> indices
;
88 #endif // TARGETDATA_H