┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/viewmodes/viewsettingstab.h
blob: 4a4dc5694db8e166caa8fe7078fa042e92cea8a7 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * SPDX-FileCopyrightText: 2008-2011 Peter Penz <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef VIEWSETTINGSTAB_H
#define VIEWSETTINGSTAB_H

#include <QWidget>

class DolphinFontRequester;
class QComboBox;
class QCheckBox;
class QSlider;
class QSpinBox;
class QRadioButton;

/**
 * @brief Represents one tab of the view-settings page.
 */
class ViewSettingsTab : public QWidget
{
    Q_OBJECT

public:
    enum Mode
    {
        IconsMode,
        CompactMode,
        DetailsMode
    };

    explicit ViewSettingsTab(Mode mode, QWidget* parent = nullptr);
    ~ViewSettingsTab() override;

    void applySettings();
    void restoreDefaultSettings();

Q_SIGNALS:
    void changed();

private Q_SLOTS:

    void slotDefaultSliderMoved(int value);
    void slotPreviewSliderMoved(int value);
private:
    void loadSettings();
    void showToolTip(QSlider* slider, int value);

private:
    Mode m_mode;
    QSlider* m_defaultSizeSlider;
    QSlider* m_previewSizeSlider;

    DolphinFontRequester* m_fontRequester;
    QComboBox* m_widthBox;
    QComboBox* m_maxLinesBox;
    QRadioButton* m_entireRow;
    QRadioButton* m_iconAndNameOnly;
    QCheckBox* m_expandableFolders;
    QRadioButton* m_numberOfItems;
    QRadioButton* m_sizeOfContents;
    QSpinBox* m_recursiveDirectorySizeLimit;
    QRadioButton* m_useRelatetiveDates;
    QRadioButton* m_useShortDates;
};

#endif