]> cloud.milkyroute.net Git - dolphin.git/blob - src/generalviewsettingspage.h
9046223487408e13d43df9e4e298dc0e1a896e6f
[dolphin.git] / src / generalviewsettingspage.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #ifndef GENERALVIEWSETTINGSPAGE_H
21 #define GENERALVIEWSETTINGSPAGE_H
22
23 #include <kurl.h>
24 #include <viewsettingspagebase.h>
25
26 class DolphinMainWindow;
27 class QCheckBox;
28 class QRadioButton;
29 class QSlider;
30 class QSpinBox;
31
32 /**
33 * @brief Represents the page from the Dolphin Settings which allows
34 * to modify general settings for the view modes.
35 */
36 class GeneralViewSettingsPage : public ViewSettingsPageBase
37 {
38 Q_OBJECT
39
40 public:
41 /**
42 * @param url URL of the currently shown directory, which is used
43 * to read the viewproperties.
44 * @param parent Parent widget of the settings page.
45 */
46 GeneralViewSettingsPage(const KUrl& url, QWidget* parent);
47 virtual ~GeneralViewSettingsPage();
48
49 /**
50 * Applies the general settings for the view modes
51 * The settings are persisted automatically when
52 * closing Dolphin.
53 */
54 virtual void applySettings();
55
56 /** Restores the settings to default values. */
57 virtual void restoreDefaults();
58
59 private:
60 void loadSettings();
61
62 private:
63 KUrl m_url;
64 QRadioButton* m_localProps;
65 QRadioButton* m_globalProps;
66 QSlider* m_maxPreviewSize;
67 QSpinBox* m_spinBox;
68 QCheckBox* m_useFileThumbnails;
69 QCheckBox* m_showSelectionToggle;
70 QCheckBox* m_showToolTips;
71 };
72
73 #endif