diff options
-rw-r--r-- | tdecore/tdehw/tdegenericdevice.cpp | 4 | ||||
-rw-r--r-- | tdecore/tdehw/tdegenericdevice.h | 8 | ||||
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.cpp | 4 | ||||
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.h | 7 |
4 files changed, 23 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdegenericdevice.cpp b/tdecore/tdehw/tdegenericdevice.cpp index 4e67ed6d6..8662e5e8e 100644 --- a/tdecore/tdehw/tdegenericdevice.cpp +++ b/tdecore/tdehw/tdegenericdevice.cpp @@ -334,4 +334,8 @@ TQString TDEGenericDevice::friendlyName() { return m_friendlyName; } +TQString TDEGenericDevice::detailedFriendlyName() { + return friendlyName(); +} + #include "tdegenericdevice.moc" diff --git a/tdecore/tdehw/tdegenericdevice.h b/tdecore/tdehw/tdegenericdevice.h index f2abd5582..7536b44a7 100644 --- a/tdecore/tdehw/tdegenericdevice.h +++ b/tdecore/tdehw/tdegenericdevice.h @@ -78,6 +78,14 @@ class TDECORE_EXPORT TDEGenericDevice : public TQObject virtual TQString friendlyName(); /** + * @return a TQString with a detailed friendly name + * + * In most cases this will return exactly the same string as friendlyName(), however + * for certain devices (e.g. disks) this method will provide additional information + */ + virtual TQString detailedFriendlyName(); + + /** * @return a TQString with the device bus name, if any */ TQString deviceBus(); diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index 36712cb1e..b22996b88 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -538,6 +538,10 @@ TQString TDEStorageDevice::friendlyName() { return friendlyDeviceType(); } +TQString TDEStorageDevice::detailedFriendlyName() { + return TQString("%1 [%2]").arg(friendlyName()).arg(deviceNode()); +} + TQString TDEStorageDevice::friendlyDeviceType() { TQString ret = i18n("Hard Disk Drive"); diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h index 1199510a4..b3a70763b 100644 --- a/tdecore/tdehw/tdestoragedevice.h +++ b/tdecore/tdehw/tdestoragedevice.h @@ -252,6 +252,13 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice TQString friendlyName(); /** + * @return a TQString with a detailed friendly name + * + * This method overrides TDEGenericDevice::detailedFriendlyName() + */ + TQString detailedFriendlyName(); + + /** * @return a TQString containing the friendly type name * * This method overrides TDEGenericDevice::friendlyDeviceType() |