diff options
| author | Gregor Mi <[email protected]> | 2015-01-12 16:18:50 +0100 |
|---|---|---|
| committer | Gregor Mi <[email protected]> | 2015-01-12 16:18:50 +0100 |
| commit | 088b5160576c8ed317619855a4c9dc19a69d025b (patch) | |
| tree | 888579e40929cf868f5252ce08590494085cbab7 /src/statusbar/statusbarspaceinfo.cpp | |
| parent | 39b77e9861c1318bff1a26627dde3fd1c9c71861 (diff) | |
Add disk usage statistics menu to SpaceInfo widget in the status bar:
the menu has the following entries:
1. Filelight location
2. Filelight device
3. Filelight
4. KDiskFree
KService is used to find the applications and display proper
translations.
KRun is used to run the applications.
REVIEW: 121478
CHANGELOG: Add a menu on left-click on the SpaceInfo widget in the status bar to show Disk Usage statistics.
Diffstat (limited to 'src/statusbar/statusbarspaceinfo.cpp')
| -rw-r--r-- | src/statusbar/statusbarspaceinfo.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/statusbar/statusbarspaceinfo.cpp b/src/statusbar/statusbarspaceinfo.cpp index 046cbbb23..127641e60 100644 --- a/src/statusbar/statusbarspaceinfo.cpp +++ b/src/statusbar/statusbarspaceinfo.cpp @@ -21,6 +21,9 @@ #include "statusbarspaceinfo.h" #include "spaceinfoobserver.h" +#include "spaceinfotoolsmenu.h" + +#include <QMouseEvent> #include <KLocalizedString> #include <KIO/Job> @@ -65,6 +68,14 @@ void StatusBarSpaceInfo::hideEvent(QHideEvent* event) KCapacityBar::hideEvent(event); } +void StatusBarSpaceInfo::mousePressEvent(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) { + SpaceInfoToolsMenu spaceInfoToolsMenu(this, m_url); + spaceInfoToolsMenu.exec(QCursor::pos()); + } +} + void StatusBarSpaceInfo::slotValuesChanged() { Q_ASSERT(m_observer); |
