]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/viewpropertiesdialog.h
Merge remote-tracking branch 'upstream/master' into work/zakharafoniam/useful-groups
[dolphin.git] / src / settings / viewpropertiesdialog.h
1 /*
2 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at>
3 * SPDX-FileCopyrightText: 2018 Elvis Angelaccio <elvis.angelaccio@kde.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8 #ifndef VIEWPROPERTIESDIALOG_H
9 #define VIEWPROPERTIESDIALOG_H
10
11 #include "dolphin_export.h"
12
13 #include <QDialog>
14
15 class QCheckBox;
16 class QListWidget;
17 class QListWidgetItem;
18 class QComboBox;
19 class QPushButton;
20 class QRadioButton;
21 class ViewProperties;
22 class DolphinView;
23
24 /**
25 * @brief Dialog for changing the current view properties of a directory.
26 *
27 * It is possible to specify the view mode, the sorting order, whether hidden files
28 * and previews should be shown. The properties can be assigned to the current folder,
29 * or recursively to all sub folders.
30 */
31 class DOLPHIN_EXPORT ViewPropertiesDialog : public QDialog
32 {
33 Q_OBJECT
34
35 public:
36 explicit ViewPropertiesDialog(DolphinView *dolphinView);
37 ~ViewPropertiesDialog() override;
38
39 public Q_SLOTS:
40 void accept() override;
41
42 private Q_SLOTS:
43 void slotApply();
44 void slotViewModeChanged(int index);
45 void slotSortingChanged(int index);
46 void slotSortOrderChanged(int index);
47 void slotGroupingChanged(int index);
48 void slotGroupOrderChanged(int index);
49 void slotGroupedSortingChanged();
50 void slotSortFoldersFirstChanged();
51 void slotSortHiddenLastChanged();
52 void slotShowPreviewChanged();
53 void slotShowHiddenFilesChanged();
54 void slotItemChanged(QListWidgetItem *item);
55 void markAsDirty(bool isDirty);
56
57 Q_SIGNALS:
58 void isDirtyChanged(bool isDirty);
59
60 private:
61 void applyViewProperties();
62 void loadSettings();
63
64 private:
65 bool m_isDirty;
66 DolphinView *m_dolphinView;
67 ViewProperties *m_viewProps;
68
69 QComboBox *m_viewMode;
70 QComboBox *m_sortOrder;
71 QComboBox *m_sorting;
72 QComboBox *m_groupOrder;
73 QComboBox *m_grouping;
74 QCheckBox *m_sortFoldersFirst;
75 QCheckBox *m_sortHiddenLast;
76 QCheckBox *m_previewsShown;
77 QCheckBox *m_showInGroups;
78 QCheckBox *m_showHiddenFiles;
79 QRadioButton *m_applyToCurrentFolder;
80 QRadioButton *m_applyToSubFolders;
81 QRadioButton *m_applyToAllFolders;
82 QCheckBox *m_useAsDefault;
83 QListWidget *m_listWidget;
84 };
85
86 #endif