Add a couple of convenience functions to the TDE hw lib

pull/16/head
Timothy Pearson 13 years ago
parent 5659193977
commit 63c292c62f

@ -199,6 +199,17 @@ void TDEGenericDevice::setBlacklistedForUpdate(bool bl) {
m_blacklistedForUpdate = bl;
}
TQString TDEGenericDevice::friendlyDeviceType() {
return KGlobal::hardwareDevices()->getFriendlyDeviceTypeStringFromType(type());
}
TQString TDEGenericDevice::busID() {
TQString busid = m_systemPath;
busid = busid.remove(0, busid.findRev("/")+1);
busid = busid.remove(0, busid.find(":")+1);
return busid;
}
TQString TDEGenericDevice::friendlyName() {
if (m_friendlyName.isNull()) {
if (type() == TDEGenericDeviceType::Root) {

@ -367,6 +367,16 @@ class TDECORE_EXPORT TDEGenericDevice
*/
TDEGenericDevice* parentDevice();
/**
* @return a TQString containing the friendly type name
*/
TQString friendlyDeviceType();
/**
* @return a TQString containing the device bus ID, if any
*/
TQString busID();
/**
* Get an icon for this device
* @param size a KIcon::StdSizes structure specifying the desired icon size

Loading…
Cancel
Save