21 #include <QPaintEvent> 71 void QgsSlider::update()
79 if ( mMin.
type() == QVariant::Int &&
80 mMax.
type() == QVariant::Int &&
81 mStep.
type() == QVariant::Int &&
82 mValue.
type() == QVariant::Int )
90 if ( mMin.
type() == QVariant::Double &&
91 mMax.
type() == QVariant::Double &&
92 mStep.
type() == QVariant::Double &&
93 mValue.
type() == QVariant::Double )
122 else if ( mMin.
type() == QVariant::Int &&
123 mMax.
type() == QVariant::Int &&
124 mStep.
type() == QVariant::Int &&
125 mValue.
type() == QVariant::Int )
129 else if ( mMin.
type() == QVariant::Double &&
130 mMax.
type() == QVariant::Double &&
131 mStep.
type() == QVariant::Double &&
132 mValue.
type() == QVariant::Double )
void setValue(const QVariant &value)
virtual bool event(QEvent *event)
void setMaximum(const QVariant &max)
void setSingleStep(const QVariant &step)
void setMinimum(const QVariant &min)
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
QgsSlider(QWidget *parent=nullptr)
Qt::Orientation orientation() const
int toInt(bool *ok) const
void setPen(const QColor &color)
void drawText(const QPointF &position, const QString &text)
virtual void paintEvent(QPaintEvent *ev)
void valueChanged(const QVariant &)
double toDouble(bool *ok) const
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
virtual void paintEvent(QPaintEvent *event) override
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QVariant variantValue() const