]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/viewmodes/iconsviewsettingspage.h
Update e-mail address from peter.penz@gmx.at to peter.penz19@gmail.com
[dolphin.git] / src / settings / viewmodes / iconsviewsettingspage.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz19@gmail.com> *
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 ICONSVIEWSETTINGSPAGE_H
21 #define ICONSVIEWSETTINGSPAGE_H
22
23 #include <views/dolphiniconsview.h>
24 #include "viewsettingspagebase.h"
25
26 class DolphinFontRequester;
27 class IconSizeGroupBox;
28 class KComboBox;
29 class KIntSpinBox;
30
31 /**
32 * @brief Tab page for the 'Icons Mode' settings
33 * of the Dolphin settings dialog.
34 *
35 * Allows to set:
36 * - icon size
37 * - preview size
38 * - text width
39 * - grid spacing
40 * - font
41 * - number of text lines
42 * - arrangement
43 *
44 * @see DolphinIconsViewSettings
45 */
46 class IconsViewSettingsPage : public ViewSettingsPageBase
47 {
48 Q_OBJECT
49
50 public:
51 IconsViewSettingsPage(QWidget* parent);
52 virtual ~IconsViewSettingsPage();
53
54 /**
55 * Applies the settings for the icons view.
56 * The settings are persisted automatically when
57 * closing Dolphin.
58 */
59 virtual void applySettings();
60
61 /** Restores the settings to default values. */
62 virtual void restoreDefaults();
63
64 private:
65 void loadSettings();
66
67 private:
68 enum
69 {
70 GridSpacingBase = 8,
71 GridSpacingInc = 12,
72 LeftToRightBase = 128,
73 LeftToRightInc = 64,
74 TopToBottomBase = 32,
75 TopToBottomInc = 32
76 };
77
78 IconSizeGroupBox* m_iconSizeGroupBox;
79 KComboBox* m_textWidthBox;
80 DolphinFontRequester* m_fontRequester;
81 KIntSpinBox* m_textlinesCountBox;
82
83 KComboBox* m_arrangementBox;
84 KComboBox* m_gridSpacingBox;
85 };
86
87 #endif