QGIS API Documentation  2.99.0-Master (314842d)
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 #include "qgis_gui.h"
21 
22 class QPaintEvent;
23 
27 class GUI_EXPORT QgsDial : public QDial
28 {
29  Q_OBJECT
30  public:
31  QgsDial( QWidget *parent = nullptr );
32 
33  void setMinimum( const QVariant &min );
34  void setMaximum( const QVariant &max );
35  void setSingleStep( const QVariant &step );
36  void setValue( const QVariant &value );
37  QVariant variantValue() const;
38 
39  signals:
40  void valueChanged( const QVariant & );
41 
42  protected slots:
43  void valueChanged( int );
44 
45  protected:
46  virtual void paintEvent( QPaintEvent *event ) override;
47 
48  private:
49  void update();
50 
51  QVariant mMin, mMax, mStep, mValue;
52 };
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
Definition: MathUtils.cc:452
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
Definition: MathUtils.cc:437