QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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 "ui_qgsmeshvariablestrokewidthwidgetbase.h"
20
21#include "qgis_gui.h"
23#include "qgspanelwidget.h"
24
26
33class QgsMeshVariableStrokeWidthButton : public QPushButton
34{
35 Q_OBJECT
36 public:
38 QgsMeshVariableStrokeWidthButton( QWidget *parent = nullptr );
39
42
45
47 void setDefaultMinMaxValue( double minimum, double maximum );
48
49 signals:
51
52 private slots:
53 void openWidget();
54
55 private:
56 void updateText();
57
58 QgsInterpolatedLineWidth mVariableStrokeWidth;
59 double mMinimumDefaultValue;
60 double mMaximumDefaultValue;
61};
62
69class QgsMeshVariableStrokeWidthWidget : public QgsPanelWidget, public Ui::QgsMeshVariableStrokeWidthWidget
70{
71 Q_OBJECT
72 public:
74 QgsMeshVariableStrokeWidthWidget( const QgsInterpolatedLineWidth &variableStrokeWidth, double defaultMinimumvalue, double defaultMaximumValue, QWidget *parent = nullptr );
75
78
81
82 private slots:
83 void defaultMinMax();
84
85 private:
86 double mDefaultMinimumValue = 0;
87 double mDefaultMaximumValue = 0;
88
89 double lineEditValue( const QgsDoubleSpinBox *lineEdit ) const;
90};
91
92#endif // QGSMESHVARIABLESTROKEWIDTHWIDGET_H
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Represents a width that can vary depending on values.
void setDefaultMinMaxValue(double minimum, double maximum)
Sets the default min/max values that will be reload if needed.
QgsMeshVariableStrokeWidthButton(QWidget *parent=nullptr)
Constructor.
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
QgsMeshVariableStrokeWidthWidget(const QgsInterpolatedLineWidth &variableStrokeWidth, double defaultMinimumvalue, double defaultMaximumValue, QWidget *parent=nullptr)
Constructor.
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
#define SIP_NO_FILE