X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/307285e9635a4bf584d6e5d7478876b90ef870f0..dd07a327:/src/settings/dolphinsettingsdialog.h diff --git a/src/settings/dolphinsettingsdialog.h b/src/settings/dolphinsettingsdialog.h index fc17b3774..f0322c5f0 100644 --- a/src/settings/dolphinsettingsdialog.h +++ b/src/settings/dolphinsettingsdialog.h @@ -1,60 +1,50 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * peter.penz@gmx.at * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2006 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINSETTINGSDIALOG_H #define DOLPHINSETTINGSDIALOG_H -#include +#include +#include -class DolphinMainWindow; +class QUrl; class SettingsPageBase; /** * @brief Settings dialog for Dolphin. * - * Contains the pages for startup settings, general settings and view settings. - * - * @author Peter Penz + * Contains the pages for Startup, View Modes, Navigation, Services, General, and Trash. */ class DolphinSettingsDialog : public KPageDialog { Q_OBJECT public: - explicit DolphinSettingsDialog(DolphinMainWindow* mainWindow); - virtual ~DolphinSettingsDialog(); + explicit DolphinSettingsDialog(const QUrl &url, QWidget *parent = nullptr, KActionCollection *actions = {}); + ~DolphinSettingsDialog() override; + + KPageWidgetItem *trashSettings; -protected slots: - /** @see KDialog::slotButtonClicked() */ - virtual void slotButtonClicked(int button); +Q_SIGNALS: + void settingsChanged(); -private slots: +private Q_SLOTS: /** Enables the Apply button. */ void enableApply(); - -private: void applySettings(); void restoreDefaults(); +protected: + void closeEvent(QCloseEvent *event) override; + private: - QList m_pages; + static SettingsPageBase *createTrashSettingsPage(QWidget *parent); + + QList m_pages; + bool m_unsavedChanges; }; #endif