QGIS API Documentation
3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
src
gui
qgsopacitywidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsopacitywidget.h
3
-----------------
4
Date : May 2017
5
Copyright : (C) 2017 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 QGSOPACITYWIDGET_H
17
#define QGSOPACITYWIDGET_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QWidget>
23
24
class
QgsDoubleSpinBox
;
25
class
QSlider;
26
32
class
GUI_EXPORT
QgsOpacityWidget
:
public
QWidget
33
{
34
Q_OBJECT
35
Q_PROPERTY(
double
opacity
READ
opacity
WRITE
setOpacity
NOTIFY
opacityChanged
)
36
37
public
:
38
42
explicit
QgsOpacityWidget
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
43
50
double
opacity
()
const
;
51
52
public
slots:
53
60
void
setOpacity
(
double
opacity
);
61
62
signals:
63
70
void
opacityChanged
(
double
opacity
);
71
72
private
slots:
73
74
void
spinChanged(
double
value );
75
76
private
:
77
QgsDoubleSpinBox
*mSpinBox =
nullptr
;
78
QSlider *mSlider =
nullptr
;
79
};
80
81
#endif
// QGSOPACITYWIDGET_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
QgsOpacityWidget::opacityChanged
void opacityChanged(double opacity)
Emitted when the opacity is changed in the widget, where opacity ranges from 0.0 (transparent) to 1....
QgsOpacityWidget::QgsOpacityWidget
QgsOpacityWidget(QWidget *parent=nullptr)
Constructor for QgsOpacityWidget.
Definition
qgsopacitywidget.cpp:26
QgsOpacityWidget::setOpacity
void setOpacity(double opacity)
Sets the current opacity to show in the widget, where opacity ranges from 0.0 (transparent) to 1....
Definition
qgsopacitywidget.cpp:65
QgsOpacityWidget::opacity
double opacity
Definition
qgsopacitywidget.h:35
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
Generated on
for QGIS API Documentation by
1.15.0