QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
qgsopacitywidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsopacitywidget.h
3 -----------------
4 Date : May 2017
5 Copyright : (C) 2017 Nyall Dawson
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 <QWidget>
20#include "qgis_sip.h"
21#include "qgis_gui.h"
22
24class QSlider;
25
31class GUI_EXPORT QgsOpacityWidget : public QWidget
32{
33 Q_OBJECT
34 Q_PROPERTY( double opacity READ opacity WRITE setOpacity NOTIFY opacityChanged )
35
36 public:
40 explicit QgsOpacityWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
41
48 double opacity() const;
49
50 public slots:
51
58 void setOpacity( double opacity );
59
60 signals:
61
68 void opacityChanged( double opacity );
69
70 private slots:
71
72 void spinChanged( double value );
73
74 private:
75 QgsDoubleSpinBox *mSpinBox = nullptr;
76 QSlider *mSlider = nullptr;
77};
78
79#endif // QGSOPACITYWIDGET_H
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
A widget for setting an opacity value.
void opacityChanged(double opacity)
Emitted when the opacity is changed in the widget, where opacity ranges from 0.0 (transparent) to 1....
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53