QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmeshvariablestrokewidthwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshvariablestrokewidthtwidget.h
3  -------------------------------------
4  begin : April 2020
5  copyright : (C) 2020 by Vincent Cloarec
6  email : vcloarec at gmail dot com
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 QGSMESHVARIABLESTROKEWIDTHWIDGET_H
17 #define QGSMESHVARIABLESTROKEWIDTHWIDGET_H
18 
19 #include "qgis_gui.h"
20 #include "ui_qgsmeshvariablestrokewidthwidgetbase.h"
21 #include "qgspanelwidget.h"
22 #include "qgsmeshlayerrenderer.h"
23 
25 
32 class QgsMeshVariableStrokeWidthButton: public QPushButton
33 {
34  Q_OBJECT
35  public:
37  QgsMeshVariableStrokeWidthButton( QWidget *parent = nullptr );
38 
41 
44 
46  void setDefaultMinMaxValue( double minimum, double maximum );
47 
48  signals:
49  void widgetChanged();
50 
51  private slots:
52  void openWidget();
53 
54  private:
55  void updateText();
56 
57  QgsInterpolatedLineWidth mVariableStrokeWidth;
58  double mMinimumDefaultValue;
59  double mMaximumDefaultValue;
60 };
61 
68 class QgsMeshVariableStrokeWidthWidget: public QgsPanelWidget, public Ui::QgsMeshVariableStrokeWidthWidget
69 {
70  Q_OBJECT
71  public:
74  double defaultMinimumvalue,
75  double defaultMaximumValue,
76  QWidget *parent = nullptr );
77 
80 
83 
84  private slots:
85  void defaultMinMax();
86  private:
87  double mDefaultMinimumValue = 0;
88  double mDefaultMaximumValue = 0;
89 
90  double lineEditValue( const QgsDoubleSpinBox *lineEdit ) const;
91 };
92 
93 #endif // QGSMESHVARIABLESTROKEWIDTHWIDGET_H
QgsMeshVariableStrokeWidthButton::widgetChanged
void widgetChanged()
QgsMeshVariableStrokeWidthButton::variableStrokeWidth
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
Definition: qgsmeshvariablestrokewidthwidget.cpp:95
QgsMeshVariableStrokeWidthWidget::QgsMeshVariableStrokeWidthWidget
QgsMeshVariableStrokeWidthWidget(const QgsInterpolatedLineWidth &variableStrokeWidth, double defaultMinimumvalue, double defaultMaximumValue, QWidget *parent=nullptr)
Constructor.
Definition: qgsmeshvariablestrokewidthwidget.cpp:24
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition: qgspanelwidget.h:29
QgsMeshVariableStrokeWidthWidget::variableStrokeWidth
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
Definition: qgsmeshvariablestrokewidthwidget.cpp:70
QgsMeshVariableStrokeWidthWidget::setVariableStrokeWidth
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
Definition: qgsmeshvariablestrokewidthwidget.cpp:54
QgsInterpolatedLineWidth
Represents a width than can vary depending on values.
Definition: qgsinterpolatedlinerenderer.h:126
SIP_NO_FILE
#define SIP_NO_FILE
Definition: fromencodedcomponenthelper.h:18
QgsMeshVariableStrokeWidthButton::setVariableStrokeWidth
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
Definition: qgsmeshvariablestrokewidthwidget.cpp:100
qgsmeshlayerrenderer.h
QgsMeshVariableStrokeWidthButton::QgsMeshVariableStrokeWidthButton
QgsMeshVariableStrokeWidthButton(QWidget *parent=nullptr)
Constructor.
Definition: qgsmeshvariablestrokewidthwidget.cpp:89
QgsDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value....
Definition: qgsdoublespinbox.h:42
QgsMeshVariableStrokeWidthButton
A widget push button that store variable stroke width and call a widget to set parameters.
Definition: qgsmeshvariablestrokewidthwidget.h:32
QgsMeshVariableStrokeWidthButton::setDefaultMinMaxValue
void setDefaultMinMaxValue(double minimum, double maximum)
Sets the default min/max values that will be reload if needed.
Definition: qgsmeshvariablestrokewidthwidget.cpp:64
qgspanelwidget.h