[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/filelight/src/part
From: Martin Tobias Holmedahl Sandsmark <sandsmark () samfundet ! no>
Date: 2010-05-26 21:57:16
Message-ID: 20100526215716.6E1B4AC8C0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1130966 by sandsmark:
Show disk usage after mount point in summary view.
BUG: 145415
M +7 -4 summaryWidget.cpp
--- trunk/playground/utils/filelight/src/part/summaryWidget.cpp #1130965:1130966
@@ -50,9 +50,9 @@
QString mount;
QString icon;
- int size;
- int used;
- int free; //NOTE used+avail != size (clustersize!)
+ qint64 size;
+ qint64 used;
+ qint64 free; //NOTE used+avail != size (clustersize!)
};
@@ -114,6 +114,7 @@
const QByteArray used = i18nc("Used space on the disks/partitions", \
"Used").toUtf8();
KIconLoader loader;
+ QString text;
for (DiskList::ConstIterator it = disks.constBegin(), end = disks.constEnd(); it \
!= end; ++it) {
@@ -131,7 +132,9 @@
QHBoxLayout* horizontalLayout = new QHBoxLayout(info);
// Create the text and icon under the radialMap.
- QLabel *label = new QLabel(disk.mount, this);
+ text = "<b>" + disk.mount + i18nc("Percent used disk space on the \
partition", "</b> (%1% Used)"); +
+ QLabel *label = new QLabel(text.arg(disk.used*100/disk.size), this);
horizontalLayout->addWidget(label);
QLabel *icon = new QLabel(this);
icon->setPixmap(KIcon(disk.icon).pixmap(16,16));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic