┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/dolphinsettingsdialog.h
blob: f9a5652eaa430d2de6c090c2f0d0e9e501c5fbb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * SPDX-FileCopyrightText: 2006 Peter Penz <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef DOLPHINSETTINGSDIALOG_H
#define DOLPHINSETTINGSDIALOG_H

#include <KPageDialog>
#include <KActionCollection>

class QUrl;
class SettingsPageBase;

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

public:
    explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr, KActionCollection* actions = {});
    ~DolphinSettingsDialog() override;

    KPageWidgetItem* trashSettings;

Q_SIGNALS:
    void settingsChanged();

private Q_SLOTS:
    /** Enables the Apply button. */
    void enableApply();
    void applySettings();
    void restoreDefaults();

protected:
    void closeEvent(QCloseEvent* event) override;

private:
    static SettingsPageBase *createTrashSettingsPage(QWidget *parent);

    QList<SettingsPageBase*> m_pages;
    bool m_unsavedChanges;
};

#endif