21 #include <QPaintEvent> 66 void QgsDial::update()
74 if ( mMin.
type() == QVariant::Int &&
75 mMax.
type() == QVariant::Int &&
76 mStep.
type() == QVariant::Int &&
77 mValue.
type() == QVariant::Int )
85 if ( mMin.
type() == QVariant::Double &&
86 mMax.
type() == QVariant::Double &&
87 mStep.
type() == QVariant::Double &&
88 mValue.
type() == QVariant::Double )
117 else if ( mMin.
type() == QVariant::Int &&
118 mMax.
type() == QVariant::Int &&
119 mStep.
type() == QVariant::Int &&
120 mValue.
type() == QVariant::Int )
124 else if ( mMin.
type() == QVariant::Double &&
125 mMax.
type() == QVariant::Double &&
126 mStep.
type() == QVariant::Double &&
127 mValue.
type() == QVariant::Double )
void setMaximum(const QVariant &max)
QgsDial(QWidget *parent=nullptr)
virtual void paintEvent(QPaintEvent *event) override
void setMinimum(const QVariant &min)
void setSingleStep(const QVariant &step)
void valueChanged(const QVariant &)
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
int toInt(bool *ok) const
void setPen(const QColor &color)
void drawText(const QPointF &position, const QString &text)
virtual bool event(QEvent *e)
void setValue(const QVariant &value)
virtual void paintEvent(QPaintEvent *pe)
double toDouble(bool *ok) const
QVariant variantValue() const
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)