┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/general/statusbarsettingspage.cpp
diff options
context:
space:
mode:
authorDimosthenis Krallis <[email protected]>2023-08-18 07:07:48 +0000
committerMéven Car <[email protected]>2023-08-18 07:07:48 +0000
commit489b56b68bb29e81337e115c490eea4403001b71 (patch)
tree4d88f18b937387cb2b8b025f1bdf7efde12f7c4f /src/settings/general/statusbarsettingspage.cpp
parentf413e83a2266db274409dfc01bf157b74eea922a (diff)
Dolphin settings revamp
It includes a move of the settings in the Navigation and Startup sections to the Interface (formerly Behavior) section. It also includes a new tab in the View (formerly View Mode) section, called General where some settings regarding Display style, Browsing and Miscellaneous settings The Interface section has new tabs named Folders & Tabs and Status & Location bars respectively where most of the Startup and Navigation settings moved. The `dolphin/kcms/kcm_dolphinnavigation` kcm is removed.
Diffstat (limited to 'src/settings/general/statusbarsettingspage.cpp')
-rw-r--r--src/settings/general/statusbarsettingspage.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp
deleted file mode 100644
index 40e34e4f6..000000000
--- a/src/settings/general/statusbarsettingspage.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "statusbarsettingspage.h"
-
-#include "dolphin_generalsettings.h"
-
-#include <KLocalizedString>
-
-#include <QCheckBox>
-#include <QVBoxLayout>
-
-StatusBarSettingsPage::StatusBarSettingsPage(QWidget *parent)
- : SettingsPageBase(parent)
- , m_showStatusBar(nullptr)
- , m_showZoomSlider(nullptr)
- , m_showSpaceInfo(nullptr)
-{
- m_showStatusBar = new QCheckBox(i18nc("@option:check", "Show status bar"), this);
- m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), this);
- m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), this);
-
- QVBoxLayout *topLayout = new QVBoxLayout(this);
- topLayout->addWidget(m_showStatusBar);
- topLayout->addWidget(m_showZoomSlider);
- topLayout->addWidget(m_showSpaceInfo);
- topLayout->addStretch();
-
- loadSettings();
-
- connect(m_showStatusBar, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed);
- connect(m_showStatusBar, &QCheckBox::toggled, this, &StatusBarSettingsPage::onShowStatusBarToggled);
- connect(m_showZoomSlider, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed);
- connect(m_showSpaceInfo, &QCheckBox::toggled, this, &StatusBarSettingsPage::changed);
-}
-
-StatusBarSettingsPage::~StatusBarSettingsPage()
-{
-}
-
-void StatusBarSettingsPage::onShowStatusBarToggled()
-{
- const bool checked = m_showStatusBar->isChecked();
- m_showZoomSlider->setEnabled(checked);
- m_showSpaceInfo->setEnabled(checked);
-}
-
-void StatusBarSettingsPage::applySettings()
-{
- GeneralSettings *settings = GeneralSettings::self();
- settings->setShowStatusBar(m_showStatusBar->isChecked());
- settings->setShowZoomSlider(m_showZoomSlider->isChecked());
- settings->setShowSpaceInfo(m_showSpaceInfo->isChecked());
- settings->save();
-}
-
-void StatusBarSettingsPage::restoreDefaults()
-{
- GeneralSettings *settings = GeneralSettings::self();
- settings->useDefaults(true);
- loadSettings();
- settings->useDefaults(false);
-}
-
-void StatusBarSettingsPage::loadSettings()
-{
- m_showStatusBar->setChecked(GeneralSettings::showStatusBar());
- m_showZoomSlider->setChecked(GeneralSettings::showZoomSlider());
- m_showSpaceInfo->setChecked(GeneralSettings::showSpaceInfo());
-
- onShowStatusBarToggled();
-}
-
-#include "moc_statusbarsettingspage.cpp"