1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
3 * Copyright (C) 2018 by Elvis Angelaccio <elvis.angelaccio@kde.org> *
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. *
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. *
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 ***************************************************************************/
21 #ifndef VIEWPROPERTIESDIALOG_H
22 #define VIEWPROPERTIESDIALOG_H
24 #include "dolphin_export.h"
30 class QListWidgetItem
;
38 * @brief Dialog for changing the current view properties of a directory.
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.
44 class DOLPHIN_EXPORT ViewPropertiesDialog
: public QDialog
49 explicit ViewPropertiesDialog(DolphinView
* dolphinView
);
50 ~ViewPropertiesDialog() override
;
53 void accept() override
;
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
);
68 void isDirtyChanged(bool isDirty
);
71 void applyViewProperties();
76 DolphinView
* m_dolphinView
;
77 ViewProperties
* m_viewProps
;
79 QComboBox
* m_viewMode
;
80 QComboBox
* m_sortOrder
;
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
;