Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 3a3220d4 authored by Luca Sartorelli's avatar Luca Sartorelli Committed by Harald Sitter

Provide option to hide menu bar for Ksysguard

Summary: BUG: 395349

CHANGELOG: System Monitor now has the ability to hide its menu bar

Reviewers: ngraham, #plasma, #frameworks

Reviewed By: ngraham, sitter

Subscribers: broulik, sitter, acrouthamel, ngraham, plasma-devel

Tags: #plasma

Differential Revision:
parent b2dc9876
......@@ -49,6 +49,7 @@
#include <QDBusConnection>
#include <QIcon>
#include <QLabel>
#include <QMenuBar>
#include <QSplitter>
#include <QStatusBar>
......@@ -143,10 +144,25 @@ TopLevel::TopLevel()
mConfigureSheetAction = actionCollection()->addAction( QStringLiteral("configure_sheet") );
mConfigureSheetAction->setIcon( QIcon::fromTheme(QStringLiteral("configure")) );
connect(mConfigureSheetAction, &QAction::triggered, this, &TopLevel::configureCurrentSheet);
// set up 'Settings' menu
mShowMenuBarAction = KStandardAction::showMenubar(this, &TopLevel::toggleShowMenuBar, actionCollection());
void TopLevel::toggleShowMenuBar()
if (mShowMenuBarAction->isChecked()) {
} else {
const QString accel = mShowMenuBarAction->shortcut().toString();
KMessageBox::information(this, i18n("This will hide the menu bar completely."
" You can show it again by typing %1.", accel),
i18n("Hide menu bar"), QLatin1String("HideMenuBarWarning"));
void TopLevel::setLocalProcessController(ProcessController * localProcessController)
......@@ -76,6 +76,7 @@ class TopLevel : public KXmlGuiWindow, public KSGRD::SensorClient
void currentTabChanged(int index);
void updateProcessCount();
void configureCurrentSheet();
void toggleShowMenuBar();
void setSwapInfo( qlonglong, qlonglong, const QString& );
......@@ -101,6 +102,7 @@ class TopLevel : public KXmlGuiWindow, public KSGRD::SensorClient
QAction *mConfigureSheetAction;
QAction *mHotNewWorksheetUploadAction;
QAction *mRefreshTabAction;
QAction *mShowMenuBarAction;
QLabel *sbProcessCount;
QLabel *sbCpuStat;
QLabel *sbMemTotal;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment