settingsDialog.h 2.09 KB
Newer Older
1 2
/***********************************************************************
* Copyright 2003-2004  Max Howell <max.howell@methylblue.com>
3
* Copyright 2008-2009  Martin Sandsmark <martin.sandsmark@kde.org>
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
*
* 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) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* 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, see <http://www.gnu.org/licenses/>.
***********************************************************************/
21

22 23
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
24

25
#include "ui_dialog.h" //generated by uic
26

27
#include "Config.h" // Dirty
28

29 30 31
#include <QTimer>
#include <QCloseEvent>
#include <QDialog>
32

33
class QButtonGroup;
34

35
class SettingsDialog : public QDialog, public Ui::Dialog
36
{
37
    Q_OBJECT
38 39

public:
40
    explicit SettingsDialog(QWidget* = nullptr);
41 42

protected:
43 44
    void closeEvent(QCloseEvent *) override;
    void reject() override;
45

46
public Q_SLOTS:
47 48
    void addFolder();
    void removeFolder();
49 50 51 52 53 54 55
    void toggleScanAcrossMounts(bool);
    void toggleDontScanRemoteMounts(bool);
    void reset();
    void startTimer();
    void toggleUseAntialiasing(bool = true);
    void toggleVaryLabelFontSizes(bool);
    void changeContrast(int);
Laurent Montel's avatar
Laurent Montel committed
56
    void changeScheme(QAbstractButton *button);
57 58
    void changeMinFontPitch(int);
    void toggleShowSmallFiles(bool);
59

60
Q_SIGNALS:
61
    void mapIsInvalid();
62
    void canvasIsDirty(const Dirty filth);
63 64

private:
65
    QTimer m_timer;
66

67
    static const uint TIMEOUT=1000;
68 69

    QButtonGroup *m_schemaGroup;
70 71 72
};

#endif