summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
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();