add method to print pretty device name
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1128591
This commit is contained in:
parent
8b912ffb88
commit
10fded0d7f
|
@ -22,6 +22,8 @@
|
||||||
#include "core/partitiontable.h"
|
#include "core/partitiontable.h"
|
||||||
#include "core/smartstatus.h"
|
#include "core/smartstatus.h"
|
||||||
|
|
||||||
|
#include "util/capacity.h"
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
|
|
||||||
|
@ -52,3 +54,8 @@ Device::~Device()
|
||||||
{
|
{
|
||||||
delete m_PartitionTable;
|
delete m_PartitionTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Device::prettyName() const
|
||||||
|
{
|
||||||
|
return QString("%2 (%1, %3)").arg(name()).arg(deviceNode()).arg(Capacity(*this).toString());
|
||||||
|
}
|
||||||
|
|
|
@ -72,6 +72,8 @@ class LIBPARTITIONMANAGERPRIVATE_EXPORT Device : public QObject
|
||||||
SmartStatus& smartStatus() { return *m_SmartStatus; }
|
SmartStatus& smartStatus() { return *m_SmartStatus; }
|
||||||
const SmartStatus& smartStatus() const { return *m_SmartStatus; }
|
const SmartStatus& smartStatus() const { return *m_SmartStatus; }
|
||||||
|
|
||||||
|
QString prettyName() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setPartitionTable(PartitionTable* ptable) { m_PartitionTable = ptable; }
|
void setPartitionTable(PartitionTable* ptable) { m_PartitionTable = ptable; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue