From 489b56b68bb29e81337e115c490eea4403001b71 Mon Sep 17 00:00:00 2001 From: Dimosthenis Krallis Date: Fri, 18 Aug 2023 07:07:48 +0000 Subject: 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. --- src/settings/interface/previewssettingspage.h | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/settings/interface/previewssettingspage.h (limited to 'src/settings/interface/previewssettingspage.h') diff --git a/src/settings/interface/previewssettingspage.h b/src/settings/interface/previewssettingspage.h new file mode 100644 index 000000000..2c3e4dfef --- /dev/null +++ b/src/settings/interface/previewssettingspage.h @@ -0,0 +1,59 @@ +/* + * SPDX-FileCopyrightText: 2006 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef PREVIEWSSETTINGSPAGE_H +#define PREVIEWSSETTINGSPAGE_H + +#include + +#include "settings/settingspagebase.h" + +class QSpinBox; +class QListView; +class QModelIndex; + +/** + * @brief Allows the configuration of file previews. + */ +class PreviewsSettingsPage : public SettingsPageBase +{ + Q_OBJECT + +public: + explicit PreviewsSettingsPage(QWidget *parent); + ~PreviewsSettingsPage() override; + + /** + * Applies the general settings for the view modes + * The settings are persisted automatically when + * closing Dolphin. + */ + void applySettings() override; + + /** Restores the settings to default values. */ + void restoreDefaults() override; + +protected: + void showEvent(QShowEvent *event) override; + +private Q_SLOTS: +#if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87) + void configureService(const QModelIndex &index); +#endif + +private: + void loadPreviewPlugins(); + void loadSettings(); + +private: + bool m_initialized; + QListView *m_listView; + QStringList m_enabledPreviewPlugins; + QSpinBox *m_localFileSizeBox; + QSpinBox *m_remoteFileSizeBox; +}; + +#endif -- cgit v1.3