]>
cloud.milkyroute.net Git - dolphin.git/blob - src/iconsizedialog.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
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. *
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. *
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 ***************************************************************************/
20 #ifndef ICONSIZEDIALOG_H
21 #define ICONSIZEDIALOG_H
29 * @brief Allows to adjust the size for icons and previews.
33 * IconSizeDialog dialog(this);
34 * if (dialog.exec() == QDialog::Accepted) {
35 * const int iconSize = dialog.iconSize();
36 * const int previewSize = dialog.previewSize();
41 class IconSizeDialog
: public KDialog
46 explicit IconSizeDialog(QWidget
* parent
);
47 virtual ~IconSizeDialog();
53 int previewSize() const
59 virtual void slotButtonClicked(int button
);
62 void updateIconSize(int value
);
63 void updatePreviewSize(int value
);
66 /** Returns the icon size for the given slider value. */
67 int iconSize(int sliderValue
) const;
69 /** Returns the slider value for the given icon size. */
70 int sliderValue(int iconSize
) const;
76 QSlider
* m_iconSizeSlider
;
77 PixmapViewer
* m_iconSizeViewer
;
78 QSlider
* m_previewSizeSlider
;
79 PixmapViewer
* m_previewSizeViewer
;