1
/* This file is part of the KDE project
2
Copyright (C) 2012 Oleg Kukharchuk <oleg.kuh@gmail.com>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (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 GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this program; see the file COPYING. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
23
#include "kexi_export.h"
34
* @brief KexiSlider widget provides slider with spinbox and labels for tickmarks
37
class KEXIEXTWIDGETS_EXPORT KexiSlider : public QWidget
40
Q_PROPERTY(int value READ value WRITE setValue)
41
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
42
Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
43
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
44
Q_PROPERTY(int tickInterval READ tickInterval WRITE setTickInterval)
45
Q_PROPERTY(QSlider::TickPosition tickPosition READ tickPosition WRITE setTickPosition)
46
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
47
Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
48
Q_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor)
51
explicit KexiSlider(QWidget *parent = 0);
52
explicit KexiSlider(Qt::Orientation orientation, QWidget *parent = 0);
55
void setTickInterval(int ti);
56
void setTickPosition(QSlider::TickPosition pos);
57
void setMinimum(int min);
58
void setMaximum(int max);
59
void setSingleStep(int step);
60
void setPageStep(int step);
61
void setShowEditor(bool show);
66
Qt::Orientation orientation() const;
67
int singleStep() const;
69
QSlider::TickPosition tickPosition() const;
70
int tickInterval() const;
71
bool showEditor() const;
74
void valueChanged(int);
76
void sliderReleased();
78
void setValue(int value);
79
void setOrientation(Qt::Orientation o);
82
void init(Qt::Orientation);
88
#endif // KEXISLIDER_H