dolphinsettingsdialog.h 2.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/***************************************************************************
 *   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.,                                       *
18
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
19 20 21 22 23
 ***************************************************************************/

#ifndef DOLPHINSETTINGSDIALOG_H
#define DOLPHINSETTINGSDIALOG_H

24
#include <KPageDialog>
25

Lukáš Tinkl's avatar
Lukáš Tinkl committed
26
class QUrl;
27
class SettingsPageBase;
28 29 30 31

/**
 * @brief Settings dialog for Dolphin.
 *
32
 * Contains the pages for Startup, View Modes, Navigation, Services, General, and Trash.
33
 */
34 35
class DolphinSettingsDialog : public KPageDialog
{
36 37 38
    Q_OBJECT

public:
Kevin Funk's avatar
Kevin Funk committed
39
    explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr);
40
    ~DolphinSettingsDialog() override;
41

42 43 44
signals:
    void settingsChanged();

45 46 47
private slots:
    /** Enables the Apply button. */
    void enableApply();
48
    void applySettings();
49
    void restoreDefaults();
50

51 52 53
protected:
    void closeEvent(QCloseEvent* event) override;

54
private:
55 56
    static SettingsPageBase *createTrashSettingsPage(QWidget *parent);

57
    QList<SettingsPageBase*> m_pages;
58
    bool m_unsavedChanges;
59 60 61
};

#endif