summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdecore/tdehardwaredevices.cpp11
-rw-r--r--tdecore/tdehardwaredevices.h10
2 files changed, 21 insertions, 0 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index 8f33e1480..e95030983 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -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) {
diff --git a/tdecore/tdehardwaredevices.h b/tdecore/tdehardwaredevices.h
index 96ce7a995..bf474da3e 100644
--- a/tdecore/tdehardwaredevices.h
+++ b/tdecore/tdehardwaredevices.h
@@ -368,6 +368,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
* @return a TQPixmap containing the icon for the specified type