QGIS API Documentation
3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
src
gui
qgscolorramplegendnodewidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscolorramplegendnodewidget.h
3
-----------------------
4
begin : December 2020
5
copyright : (C) 2020 by Nyall Dawson
6
email : nyall dot dawson 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 QGSCOLORRAMPLEGENDNODEWIDGET_H
19
#define QGSCOLORRAMPLEGENDNODEWIDGET_H
20
21
22
#include "qgis_gui.h"
23
#include "ui_qgscolorramplegendnodewidgetbase.h"
24
#include "
qgscolorramplegendnodesettings.h
"
25
#include <QDialog>
26
27
class
QDialogButtonBox;
28
40
class
GUI_EXPORT
QgsColorRampLegendNodeWidget
:
public
QgsPanelWidget
,
private
Ui::QgsColorRampLegendNodeWidgetBase
41
{
42
Q_OBJECT
43
44
public
:
45
51
enum class
Capability
:
int
SIP_ENUM_BASETYPE
( IntFlag )
52
{
53
Prefix = 1 << 0,
54
Suffix = 1 << 1,
55
NumberFormat = 1 << 2,
56
DefaultMinimum = 1 << 3,
57
DefaultMaximum = 1 << 4,
58
AllCapabilities = Prefix | Suffix | NumberFormat | DefaultMinimum | DefaultMaximum,
59
};
60
Q_ENUM( Capability )
61
62
67
Q_DECLARE_FLAGS(
Capabilities
,
Capability
)
68
Q_FLAG(
Capabilities
)
69
75
QgsColorRampLegendNodeWidget
( QWidget *parent =
nullptr
,
QgsColorRampLegendNodeWidget
::
Capabilities
capabilities =
QgsColorRampLegendNodeWidget
::
Capability
::AllCapabilities );
76
82
QgsColorRampLegendNodeSettings
settings() const;
83
89
void
setSettings( const
QgsColorRampLegendNodeSettings
&settings );
90
98
void
setUseContinuousRampCheckBoxVisibility(
bool
visible );
99
100
private slots:
101
102
void
onChanged();
103
void
changeNumberFormat();
104
void
onOrientationChanged();
105
106
private:
107
108
bool
mBlockSignals = false;
109
QgsColorRampLegendNodeSettings
mSettings;
110
111
};
112
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QgsColorRampLegendNodeWidget
::
Capabilities
)
113
119
class GUI_EXPORT
QgsColorRampLegendNodeDialog
: public QDialog
120
{
121
Q_OBJECT
122
123
public
:
124
130
QgsColorRampLegendNodeDialog
(
const
QgsColorRampLegendNodeSettings
&settings, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
QgsColorRampLegendNodeWidget::Capabilities
capabilities =
QgsColorRampLegendNodeWidget::Capability::AllCapabilities
);
131
135
QgsColorRampLegendNodeSettings
settings()
const
;
136
140
QDialogButtonBox *buttonBox()
const
;
141
149
void
setUseContinuousRampCheckBoxVisibility(
bool
visible );
150
151
private
:
152
153
QgsColorRampLegendNodeWidget
*mWidget =
nullptr
;
154
QDialogButtonBox *mButtonBox =
nullptr
;
155
156
};
157
158
159
#endif
//QGSCOLORRAMPLEGENDNODEWIDGET_H
160
QgsColorRampLegendNodeDialog
A dialog for configuring a QgsColorRampLegendNode (QgsColorRampLegendNodeSettings).
Definition
qgscolorramplegendnodewidget.h:120
QgsColorRampLegendNodeSettings
Settings for a color ramp legend node.
Definition
qgscolorramplegendnodesettings.h:38
QgsColorRampLegendNodeWidget
A widget for properties relating to a QgsColorRampLegendNode (QgsColorRampLegendNodeSettings).
Definition
qgscolorramplegendnodewidget.h:41
QgsColorRampLegendNodeWidget::Capabilities
QFlags< Capability > Capabilities
Capabilities to expose in the widget.
Definition
qgscolorramplegendnodewidget.h:67
QgsColorRampLegendNodeWidget::Capability
Capability
Capabilities to expose in the widget.
Definition
qgscolorramplegendnodewidget.h:52
QgsColorRampLegendNodeWidget::Capability::AllCapabilities
@ AllCapabilities
All capabilities.
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition
qgspanelwidget.h:30
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
SIP_ENUM_BASETYPE
#define SIP_ENUM_BASETYPE(type)
Definition
qgis_sip.h:278
qgscolorramplegendnodesettings.h
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8