QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsslider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsslider.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 QGSSLIDER_H
19#define QGSSLIDER_H
20
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23
24#include <QSlider>
25#include <QVariant>
26
27class QPaintEvent;
28
34class GUI_EXPORT QgsSlider : public QSlider
35{
36 Q_OBJECT
37 public:
39 QgsSlider( QWidget *parent SIP_TRANSFERTHIS = nullptr );
40
42 QgsSlider( Qt::Orientation orientation, QWidget *parent SIP_TRANSFERTHIS = nullptr );
43
44 void setMinimum( const QVariant &min );
45 void setMaximum( const QVariant &max );
46 void setSingleStep( const QVariant &step );
47 void setValue( const QVariant &value );
48 QVariant variantValue() const;
49
50 signals:
51 void valueChanged( const QVariant & );
52
53 private slots:
54 void onValueChanged( int );
55
56 protected:
57 void paintEvent( QPaintEvent *event ) override;
58
59 private:
60 void update();
61
62 QVariant mMin, mMax, mStep, mValue;
63};
64
65#endif // QGSSLIDER_H
void valueChanged(const QVariant &)
void setSingleStep(const QVariant &step)
Definition qgsslider.cpp:65
void setMinimum(const QVariant &min)
Definition qgsslider.cpp:53
QgsSlider(QWidget *parent=nullptr)
Constructor for QgsSlider.
Definition qgsslider.cpp:31
void setValue(const QVariant &value)
Definition qgsslider.cpp:71
void setMaximum(const QVariant &max)
Definition qgsslider.cpp:59
void paintEvent(QPaintEvent *event) override
Definition qgsslider.cpp:43
QVariant variantValue() const
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53