QGIS API Documentation
3.41.0-Master (57ec4277f5e)
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
:
50
enum class
Capability
:
int
SIP_ENUM_BASETYPE
( IntFlag )
51
{
52
Prefix = 1 << 0,
53
Suffix = 1 << 1,
54
NumberFormat = 1 << 2,
55
DefaultMinimum = 1 << 3,
56
DefaultMaximum = 1 << 4,
57
AllCapabilities = Prefix | Suffix | NumberFormat | DefaultMinimum | DefaultMaximum,
58
};
59
Q_ENUM( Capability )
60
61
66
Q_DECLARE_FLAGS(
Capabilities
,
Capability
)
67
Q_FLAG(
Capabilities
)
68
74
QgsColorRampLegendNodeWidget
( QWidget *parent =
nullptr
,
QgsColorRampLegendNodeWidget
::
Capabilities
capabilities =
QgsColorRampLegendNodeWidget
::
Capability
::AllCapabilities );
75
81
QgsColorRampLegendNodeSettings
settings() const;
82
88
void
setSettings( const
QgsColorRampLegendNodeSettings
&settings );
89
97
void
setUseContinuousRampCheckBoxVisibility(
bool
visible );
98
99
private slots:
100
101
void
onChanged();
102
void
changeNumberFormat();
103
void
onOrientationChanged();
104
105
private:
106
bool
mBlockSignals = false;
107
QgsColorRampLegendNodeSettings
mSettings;
108
};
109
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QgsColorRampLegendNodeWidget
::
Capabilities
)
110
116
class GUI_EXPORT
QgsColorRampLegendNodeDialog
: public QDialog
117
{
118
Q_OBJECT
119
120
public
:
126
QgsColorRampLegendNodeDialog
(
const
QgsColorRampLegendNodeSettings
&settings, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
QgsColorRampLegendNodeWidget::Capabilities
capabilities =
QgsColorRampLegendNodeWidget::Capability::AllCapabilities
);
127
131
QgsColorRampLegendNodeSettings
settings()
const
;
132
136
QDialogButtonBox *buttonBox()
const
;
137
145
void
setUseContinuousRampCheckBoxVisibility(
bool
visible );
146
147
private
:
148
QgsColorRampLegendNodeWidget
*mWidget =
nullptr
;
149
QDialogButtonBox *mButtonBox =
nullptr
;
150
};
151
152
153
#endif
//QGSCOLORRAMPLEGENDNODEWIDGET_H
QgsColorRampLegendNodeDialog
A dialog for configuring a QgsColorRampLegendNode (QgsColorRampLegendNodeSettings).
Definition
qgscolorramplegendnodewidget.h:117
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:66
QgsColorRampLegendNodeWidget::Capability
Capability
Capabilities to expose in the widget.
Definition
qgscolorramplegendnodewidget.h:51
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 Sun Dec 29 2024 04:59:01 for QGIS API Documentation by
1.9.8