summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-04-03 20:05:13 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-04-03 20:05:13 +0000
commit136388114846f55ffc3724e6bc482e746df0dfe5 (patch)
treed88e4e11d8ccd86f7fa183c759fbee8c2ee61c7a /rbutil/rbutilqt/rbsettings.cpp
parent8143f4987652525b35cc8fa592fda3c85960085e (diff)
downloadrockbox-136388114846f55ffc3724e6bc482e746df0dfe5.tar.gz
rockbox-136388114846f55ffc3724e6bc482e746df0dfe5.tar.bz2
rockbox-136388114846f55ffc3724e6bc482e746df0dfe5.zip
rbutil:let autodetection::detectUsb also use the rbsettings object.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16952 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 7f4864f515..8782e53a26 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -410,6 +410,55 @@ QString RbSettings::brand(QString plattform)
return brand;
}
+QMap<int, QString> RbSettings::usbIdMap()
+{
+ QMap<int, QString> map;
+ // get a list of ID -> target name
+ QStringList platforms;
+ devices->beginGroup("platforms");
+ platforms = devices->childKeys();
+ devices->endGroup();
+
+ for(int i = 0; i < platforms.size(); i++)
+ {
+ devices->beginGroup("platforms");
+ QString target = devices->value(platforms.at(i)).toString();
+ devices->endGroup();
+ devices->beginGroup(target);
+ if(!devices->value("usbid").toString().isEmpty())
+ map.insert(devices->value("usbid").toString().toInt(0, 16), target);
+ devices->endGroup();
+ }
+
+ return map;
+}
+
+QMap<int, QString> RbSettings::usbIdErrorMap()
+{
+
+ QMap<int, QString> map;
+ // get a list of ID -> target name
+ QStringList platforms;
+ devices->beginGroup("platforms");
+ platforms = devices->childKeys();
+ devices->endGroup();
+
+ for(int i = 0; i < platforms.size(); i++)
+ {
+ devices->beginGroup("platforms");
+ QString target = devices->value(platforms.at(i)).toString();
+ devices->endGroup();
+ devices->beginGroup(target);
+ if(!devices->value("usberror").toString().isEmpty())
+ map.insert(devices->value("usberror").toString().toInt(0, 16), target);
+ devices->endGroup();
+ }
+
+ return map;
+}
+
+
+
QString RbSettings::curResolution()
{
QString platform = userSettings->value("platform").toString();