]>
cloud.milkyroute.net Git - dolphin.git/blob - src/iconsviewsettingspage.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz *
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 ICONSVIEWSETTINGSPAGE_H
22 #define ICONSVIEWSETTINGSPAGE_H
24 #include <dolphiniconsview.h>
27 class DolphinMainWindow
;
37 * @brief Tab page for the 'Icons Mode' and 'Previews Mode' settings
38 * of the Dolphin settings dialog.
47 * - number of text lines
50 * @see DolphinIconsViewSettings
52 class IconsViewSettingsPage
: public KVBox
57 IconsViewSettingsPage(DolphinMainWindow
* mainWindow
, QWidget
* parent
);
58 virtual ~IconsViewSettingsPage();
61 * Applies the settings for the icons view.
62 * The settings are persisted automatically when
68 void slotIconSizeChanged(int value
);
69 void slotPreviewSizeChanged(int value
);
72 DolphinMainWindow
* m_mainWindow
;
73 QSlider
* m_iconSizeSlider
;
74 PixmapViewer
* m_iconSizeViewer
;
75 QSlider
* m_previewSizeSlider
;
76 PixmapViewer
* m_previewSizeViewer
;
77 QComboBox
* m_textWidthBox
;
78 QFontComboBox
* m_fontFamilyBox
;
79 QSpinBox
* m_fontSizeBox
;
80 QSpinBox
* m_textlinesCountBox
;
81 QComboBox
* m_additionalInfo
;
83 QComboBox
* m_arrangementBox
;
84 QComboBox
* m_gridSpacingBox
;
86 /** Returns the icon size for the given slider value. */
87 int iconSize(int sliderValue
) const;
89 /** Returns the slider value for the given icon size. */
90 int sliderValue(int iconSize
) const;
93 * Adjusts the selection of the text width combo box dependant
94 * from the grid width and grid height settings.
96 void adjustTextWidthSelection();