Add detailedFriendlyName methods to the TDE hardware manager

This breaks the ABI and relates to Bug 1666
pull/16/head
Timothy Pearson 11 years ago
parent 206f7c6eab
commit 142e058e79

@ -334,4 +334,8 @@ TQString TDEGenericDevice::friendlyName() {
return m_friendlyName;
}
TQString TDEGenericDevice::detailedFriendlyName() {
return friendlyName();
}
#include "tdegenericdevice.moc"

@ -77,6 +77,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
*/

@ -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");

@ -251,6 +251,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
*

Loading…
Cancel
Save