QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsdial.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdial.h
3  -------------------
4  begin : July 2013
5  copyright : (C) 2013 by Daniel Vaz
6  email : danielvaz at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include <QDial>
19 #include <QVariant>
20 
21 class QPaintEvent;
22 
26 class GUI_EXPORT QgsDial : public QDial
27 {
28  Q_OBJECT
29  public:
30  QgsDial( QWidget *parent = nullptr );
31 
32  void setMinimum( const QVariant &min );
33  void setMaximum( const QVariant &max );
34  void setSingleStep( const QVariant &step );
35  void setValue( const QVariant &value );
36  QVariant variantValue() const;
37 
38  signals:
39  void valueChanged( const QVariant& );
40 
41  protected slots:
42  void valueChanged( int );
43 
44  protected:
45  virtual void paintEvent( QPaintEvent * event ) override;
46 
47  private:
48  void update();
49 
50  QVariant mMin, mMax, mStep, mValue;
51 };
void update()
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
void setMinimum(int)
void setValue(int)
void setSingleStep(int)
virtual void paintEvent(QPaintEvent *pe)
void valueChanged(int value)
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
void setMaximum(int)