QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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#ifndef QGSDIAL_H
19#define QGSDIAL_H
20
21#include <QDial>
22#include <QVariant>
23#include "qgis_gui.h"
24#include "qgis_sip.h"
25
26class QPaintEvent;
27
32class GUI_EXPORT QgsDial : public QDial
33{
34 Q_OBJECT
35 public:
40 QgsDial( QWidget *parent SIP_TRANSFERTHIS = nullptr );
41
42 void setMinimum( const QVariant &min );
43 void setMaximum( const QVariant &max );
44 void setSingleStep( const QVariant &step );
45 void setValue( const QVariant &value );
46 QVariant variantValue() const;
47
48 signals:
49 void valueChanged( const QVariant & );
50
51 private slots:
52 void onValueChanged( int );
53
54 protected:
55 void paintEvent( QPaintEvent *event ) override;
56
57 private:
58 void update();
59
60 QVariant mMin, mMax, mStep, mValue;
61};
62
63#endif // QGSDIAL_H
void valueChanged(const QVariant &)
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53