QGIS API Documentation  3.23.0-Master (dd0cd13a00)
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 
25 #include "qgscolorramplegendnode.h"
26 #include <QDialog>
27 
28 class QDialogButtonBox;
29 
41 class GUI_EXPORT QgsColorRampLegendNodeWidget: public QgsPanelWidget, private Ui::QgsColorRampLegendNodeWidgetBase
42 {
43  Q_OBJECT
44 
45  public:
46 
50  QgsColorRampLegendNodeWidget( QWidget *parent = nullptr );
51 
57  QgsColorRampLegendNodeSettings settings() const;
58 
64  void setSettings( const QgsColorRampLegendNodeSettings &settings );
65 
73  void setUseContinuousRampCheckBoxVisibility( bool visible );
74 
75  private slots:
76 
77  void onChanged();
78  void changeNumberFormat();
79  void onOrientationChanged();
80 
81  private:
82 
83  bool mBlockSignals = false;
85 
86 };
87 
93 class GUI_EXPORT QgsColorRampLegendNodeDialog : public QDialog
94 {
95  Q_OBJECT
96 
97  public:
98 
102  QgsColorRampLegendNodeDialog( const QgsColorRampLegendNodeSettings &settings, QWidget *parent SIP_TRANSFERTHIS = nullptr );
103 
107  QgsColorRampLegendNodeSettings settings() const;
108 
112  QDialogButtonBox *buttonBox() const;
113 
121  void setUseContinuousRampCheckBoxVisibility( bool visible );
122 
123  private:
124 
125  QgsColorRampLegendNodeWidget *mWidget = nullptr;
126  QDialogButtonBox *mButtonBox = nullptr;
127 
128 };
129 
130 
131 #endif //QGSCOLORRAMPLEGENDNODEWIDGET_H
132 
A dialog for configuring a QgsColorRampLegendNode (QgsColorRampLegendNodeSettings).
Settings for a color ramp legend node.
A widget for properties relating to a QgsColorRampLegendNode (QgsColorRampLegendNodeSettings).
Base class for any widget that can be shown as a inline panel.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53