Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSliderCombo.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2007 C. Boemann <cbo@boemann.dk>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KOSLIDERCOMBO_H_
8#define KOSLIDERCOMBO_H_
9
10#include <QComboBox>
11
12#include "kritawidgets_export.h"
13
28class KRITAWIDGETS_EXPORT KoSliderCombo : public QComboBox
29{
30
31 Q_OBJECT
32
33public:
34
40 explicit KoSliderCombo(QWidget *parent=0);
41
45 ~KoSliderCombo() override;
46
51 qreal decimals() const;
52
57 qreal minimum() const;
58
63 qreal maximum() const;
64
70 void setDecimals(int number);
71
76 void setMinimum(qreal min);
77
82 void setMaximum(qreal max);
83
87 qreal value() const;
88
89 QSize minimumSizeHint() const override;
90 QSize sizeHint() const override;
91
92public Q_SLOTS:
93
99 void setValue(qreal value);
100
101Q_SIGNALS:
102
109 void valueChanged(qreal value, bool final);
110
111protected:
112 void paintEvent(QPaintEvent *) override;
113 void hideEvent(QHideEvent *) override;
114 void changeEvent(QEvent *e) override;
115 void mousePressEvent(QMouseEvent *e) override;
116 void keyPressEvent(QKeyEvent *e) override;
117 void wheelEvent(QWheelEvent *e) override;
118
119private:
120 Q_PRIVATE_SLOT(d, void sliderValueChanged(int value))
121 Q_PRIVATE_SLOT(d, void sliderReleased())
122 Q_PRIVATE_SLOT(d, void lineEditFinished())
123
124 class KoSliderComboPrivate;
125 KoSliderComboPrivate * const d;
126};
127
128#endif
float value(const T *src, size_t ch)
A widget for qreal values with a popup slider.
qreal decimals() const
qreal minimum() const
void valueChanged(qreal value, bool final)
qreal maximum() const