]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/viewpropertiesdialog.h
[Details mode] Allow to fill the column size of directories with actual size
[dolphin.git] / src / settings / viewpropertiesdialog.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
3 * Copyright (C) 2018 by Elvis Angelaccio <elvis.angelaccio@kde.org> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #ifndef VIEWPROPERTIESDIALOG_H
22 #define VIEWPROPERTIESDIALOG_H
23
24 #include "dolphin_export.h"
25
26 #include <QDialog>
27
28 class QCheckBox;
29 class QListWidget;
30 class QListWidgetItem;
31 class QComboBox;
32 class QPushButton;
33 class QRadioButton;
34 class ViewProperties;
35 class DolphinView;
36
37 /**
38 * @brief Dialog for changing the current view properties of a directory.
39 *
40 * It is possible to specify the view mode, the sorting order, whether hidden files
41 * and previews should be shown. The properties can be assigned to the current folder,
42 * or recursively to all sub folders.
43 */
44 class DOLPHIN_EXPORT ViewPropertiesDialog : public QDialog
45 {
46 Q_OBJECT
47
48 public:
49 explicit ViewPropertiesDialog(DolphinView* dolphinView);
50 ~ViewPropertiesDialog() override;
51
52 public slots:
53 void accept() override;
54
55 private slots:
56 void slotApply();
57 void slotViewModeChanged(int index);
58 void slotSortingChanged(int index);
59 void slotSortOrderChanged(int index);
60 void slotGroupedSortingChanged();
61 void slotSortFoldersFirstChanged();
62 void slotShowPreviewChanged();
63 void slotShowHiddenFilesChanged();
64 void slotItemChanged(QListWidgetItem *item);
65 void markAsDirty(bool isDirty);
66
67 signals:
68 void isDirtyChanged(bool isDirty);
69
70 private:
71 void applyViewProperties();
72 void loadSettings();
73
74 private:
75 bool m_isDirty;
76 DolphinView* m_dolphinView;
77 ViewProperties* m_viewProps;
78
79 QComboBox* m_viewMode;
80 QComboBox* m_sortOrder;
81 QComboBox* m_sorting;
82 QCheckBox* m_sortFoldersFirst;
83 QCheckBox* m_previewsShown;
84 QCheckBox* m_showInGroups;
85 QCheckBox* m_showHiddenFiles;
86 QRadioButton* m_applyToCurrentFolder;
87 QRadioButton* m_applyToSubFolders;
88 QRadioButton* m_applyToAllFolders;
89 QCheckBox* m_useAsDefault;
90 QListWidget* m_listWidget;
91 };
92
93 #endif