QGIS API Documentation
3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
src
gui
qgspercentagewidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspercentagewidget.h
3
-----------------
4
Date : January 2024
5
Copyright : (C) 2024 Nyall Dawson
6
Email :
[email protected]
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSPERCENTAGEWIDGET_H
17
#define QGSPERCENTAGEWIDGET_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QWidget>
23
24
class
QgsDoubleSpinBox
;
25
class
QSlider;
26
33
class
GUI_EXPORT
QgsPercentageWidget
:
public
QWidget
34
{
35
Q_OBJECT
36
Q_PROPERTY(
double
value
READ
value
WRITE
setValue
NOTIFY
valueChanged
)
37
38
public
:
42
explicit
QgsPercentageWidget
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
43
49
double
value
()
const
;
50
51
public
slots:
52
59
void
setValue
(
double
value
);
60
61
signals:
62
69
void
valueChanged
(
double
value
);
70
71
private
slots:
72
73
void
spinChanged(
double
value
);
74
75
private
:
76
QgsDoubleSpinBox
*mSpinBox =
nullptr
;
77
QSlider *mSlider =
nullptr
;
78
};
79
80
#endif
// QGSPERCENTAGEWIDGET_H
QgsDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Definition
qgsdoublespinbox.h:46
QgsPercentageWidget::QgsPercentageWidget
QgsPercentageWidget(QWidget *parent=nullptr)
Constructor for QgsPercentageWidget.
Definition
qgspercentagewidget.cpp:26
QgsPercentageWidget::valueChanged
void valueChanged(double value)
Emitted when the value is changed in the widget, where value is a factor which ranges from 0....
QgsPercentageWidget::value
double value
Definition
qgspercentagewidget.h:36
QgsPercentageWidget::setValue
void setValue(double value)
Sets the current value to show in the widget, where value is a factor which ranges from 0....
Definition
qgspercentagewidget.cpp:65
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
Generated on
for QGIS API Documentation by
1.15.0