QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
mesh
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"
22
#include "
qgsmeshlayerrenderer.h
"
23
#include "
qgspanelwidget.h
"
24
25
SIP_NO_FILE
26
33
class
QgsMeshVariableStrokeWidthButton
:
public
QPushButton
34
{
35
Q_OBJECT
36
public
:
38
QgsMeshVariableStrokeWidthButton
( QWidget *parent =
nullptr
);
39
41
QgsInterpolatedLineWidth
variableStrokeWidth
()
const
;
42
44
void
setVariableStrokeWidth
(
const
QgsInterpolatedLineWidth
&
variableStrokeWidth
);
45
47
void
setDefaultMinMaxValue
(
double
minimum,
double
maximum );
48
49
signals:
50
void
widgetChanged
();
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
69
class
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
77
void
setVariableStrokeWidth
(
const
QgsInterpolatedLineWidth
&
variableStrokeWidth
);
78
80
QgsInterpolatedLineWidth
variableStrokeWidth
()
const
;
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
QgsDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Definition
qgsdoublespinbox.h:46
QgsInterpolatedLineWidth
Represents a width that can vary depending on values.
Definition
qgsinterpolatedlinerenderer.h:126
QgsMeshVariableStrokeWidthButton::setDefaultMinMaxValue
void setDefaultMinMaxValue(double minimum, double maximum)
Sets the default min/max values that will be reload if needed.
Definition
qgsmeshvariablestrokewidthwidget.cpp:65
QgsMeshVariableStrokeWidthButton::QgsMeshVariableStrokeWidthButton
QgsMeshVariableStrokeWidthButton(QWidget *parent=nullptr)
Constructor.
Definition
qgsmeshvariablestrokewidthwidget.cpp:90
QgsMeshVariableStrokeWidthButton::widgetChanged
void widgetChanged()
QgsMeshVariableStrokeWidthButton::setVariableStrokeWidth
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
Definition
qgsmeshvariablestrokewidthwidget.cpp:102
QgsMeshVariableStrokeWidthButton::variableStrokeWidth
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
Definition
qgsmeshvariablestrokewidthwidget.cpp:97
QgsMeshVariableStrokeWidthWidget::QgsMeshVariableStrokeWidthWidget
QgsMeshVariableStrokeWidthWidget(const QgsInterpolatedLineWidth &variableStrokeWidth, double defaultMinimumvalue, double defaultMaximumValue, QWidget *parent=nullptr)
Constructor.
Definition
qgsmeshvariablestrokewidthwidget.cpp:29
QgsMeshVariableStrokeWidthWidget::variableStrokeWidth
QgsInterpolatedLineWidth variableStrokeWidth() const
Returns the variable stroke width.
Definition
qgsmeshvariablestrokewidthwidget.cpp:71
QgsMeshVariableStrokeWidthWidget::setVariableStrokeWidth
void setVariableStrokeWidth(const QgsInterpolatedLineWidth &variableStrokeWidth)
Sets the variable stroke width.
Definition
qgsmeshvariablestrokewidthwidget.cpp:55
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
SIP_NO_FILE
#define SIP_NO_FILE
Definition
fromencodedcomponenthelper.h:23
qgsmeshlayerrenderer.h
qgspanelwidget.h
Generated on
for QGIS API Documentation by
1.17.0