|
ssu
|
Public Member Functions | |
| SsuDeviceInfo (const QString &model=QString()) | |
| QStringList | adaptationRepos () |
| QString | adaptationVariables (const QString &adaptationName, QHash< QString, QString > *storageHash) |
| bool | contains (const QString &model=QString()) |
| Q_INVOKABLE QString | deviceFamily () |
| Q_INVOKABLE QString | deviceVariant (bool fallback=false) |
| Q_INVOKABLE QString | deviceModel () |
| Q_INVOKABLE QString | deviceUid () |
| QStringList | disabledRepos () |
| Q_INVOKABLE QString | displayName (int type) |
| QStringList | repos (bool rnd=false, int filter=Ssu::NoFilter) |
| Q_INVOKABLE void | setDeviceModel (const QString &model=QString()) |
| QVariant | variable (const QString §ion, const QString &key) |
| void | variableSection (const QString §ion, QHash< QString, QString > *storageHash) |
| QVariant | value (const QString &key, const QVariant &value=QVariant()) |
Definition at line 17 of file ssudeviceinfo.h.
| SsuDeviceInfo::SsuDeviceInfo | ( | const QString & | model = QString() | ) |
Initialize with device to override autodetection
Definition at line 26 of file ssudeviceinfo.cpp.
|
virtual |
Definition at line 34 of file ssudeviceinfo.cpp.
| QStringList SsuDeviceInfo::adaptationRepos | ( | ) |
Return the list of adaptations used for the set model
Definition at line 39 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::adaptationVariables | ( | const QString & | adaptationName, |
| QHash< QString, QString > * | storageHash ) |
Resolve adaptation-specific variables for adaptationName, and store them in storageHash Returns "adaptation" if a valid adaptation was found, adaptationName otherwise
Definition at line 51 of file ssudeviceinfo.cpp.
| bool SsuDeviceInfo::contains | ( | const QString & | model = QString() | ) |
Check if a given model is available in the deviceinfo database, either directly, or as variant. If no model is provided as argument the autodetected or previously set model is used.
Definition at line 128 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::deviceFamily | ( | ) |
Try to find the device family for the system this is running on.
Definition at line 150 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::deviceModel | ( | ) |
Try to find out ond what kind of system this is running
Definition at line 185 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::deviceUid | ( | ) |
Calculate the device ID used in ssu requests
Definition at line 320 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::deviceVariant | ( | bool | fallback = false | ) |
Try to find the device variant for the system this is running on. If the device is not a variant it will return an empty string. If fallback is set to true it return the device model in this case.
Definition at line 170 of file ssudeviceinfo.cpp.
| QStringList SsuDeviceInfo::disabledRepos | ( | ) |
Return the list of repositories explicitely disabled for this device This does not include repositories only disabled in the user configuration.
Definition at line 354 of file ssudeviceinfo.cpp.
| QString SsuDeviceInfo::displayName | ( | int | type | ) |
Return a string suitable for display in dialogs, ...
See Ssu::DeviceTypes for supported types.
If not configured the model name used by ssu will be returned instead for product and type. If no manufacturer is found UNKNOWN is returned. For an invalid type an empty string is returned.
Definition at line 366 of file ssudeviceinfo.cpp.
| QStringList SsuDeviceInfo::repos | ( | bool | rnd = false, |
| int | filter = Ssu::NoFilter ) |
Return the complete list of repositories configured for a device. Depending on the filter options, all repostories (user and board), only board-specific, or only user-specific are returned. Disabled repositories are excluded depending on filter settings.
Definition at line 411 of file ssudeviceinfo.cpp.
| void SsuDeviceInfo::setDeviceModel | ( | const QString & | model = QString() | ) |
Override device model autodetection
Definition at line 479 of file ssudeviceinfo.cpp.
| QVariant SsuDeviceInfo::value | ( | const QString & | key, |
| const QVariant & | value = QVariant() ) |
Return a value from an adaptation section. Returns an empty string or a given default value if key does not exist.
If a device is marked as variant, and the requested key exists in a dedicated device section the key from the device section will get returned, otherwise the one from the variant.
Definition at line 490 of file ssudeviceinfo.cpp.
| QVariant SsuDeviceInfo::variable | ( | const QString & | section, |
| const QString & | key ) |
Return a variable from the given variable section. 'var'- is automatically prepended to the section name if not specified already. Recursive search through several variable sections (specified in the section) is supported, returned will be the first occurence of the variable.
Definition at line 459 of file ssudeviceinfo.cpp.
| void SsuDeviceInfo::variableSection | ( | const QString & | section, |
| QHash< QString, QString > * | storageHash ) |
Return the requested variable section. 'var-' is automatically prepended to the section name if not specified already.
Definition at line 470 of file ssudeviceinfo.cpp.