QGIS API Documentation 4.3.0-Master (52aa6503bed)
Loading...
Searching...
No Matches
qgsvectorfieldsettingswidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorfieldsettingswidget.h
3 -------------------------------------
4 begin : June 2018
5 copyright : (C) 2018 by Peter Petrik
6 email : zilolv 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 QGSVECTORFIELDSETTINGSWIDGET_H
17#define QGSVECTORFIELDSETTINGSWIDGET_H
18
19#include "ui_qgsvectorfieldsettingswidgetbase.h"
20
22
23#include <QWidget>
24
26
28
42class QgsVectorFieldSettingsWidget : public QWidget, private Ui::QgsVectorFieldSettingsWidgetBase
43{
44 Q_OBJECT
45
46 public:
51 QgsVectorFieldSettingsWidget( QWidget *parent = nullptr );
52
55
58
63 void setMagnitudeRange( double minimum, double maximum );
64
73 void setSupportsInterpolation( bool supported );
74
84 void setHasMagnitude( bool hasMagnitude );
85
86 signals:
89
90 private slots:
91 void onSymbologyChanged();
92 void onStreamLineSeedingMethodChanged( int currentIndex );
93 void onWindBarbUnitsChanged( int currentIndex );
94 void onColoringMethodChanged();
95 void onColorRampMinMaxChanged();
96 void loadColorRampShader();
97
98 private:
103 double filterValue( const QgsDoubleSpinBox *spinBox, double err_val ) const;
104
106 void applyMagnitudeSupport();
107
109 void populateSymbologies();
110
112 Qgis::VectorFieldSymbology currentSymbology() const;
113
114 bool mSupportsInterpolation = true;
115 bool mHasMagnitude = true;
116 bool mHasMagnitudeRange = false;
117 double mMagnitudeMinimum = 0;
118 double mMagnitudeMaximum = 0;
119};
120
121#endif // QGSVECTORFIELDSETTINGSWIDGET_H
VectorFieldSymbology
Defines the symbology of vector field rendering.
Definition qgis.h:7234
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
QgsVectorFieldSettings settings() const
Returns vector settings.
QgsVectorFieldSettingsWidget(QWidget *parent=nullptr)
A widget to hold the vector field symbology settings.
void setSupportsInterpolation(bool supported)
Sets whether the vector field behind the widget can be sampled between its data points.
void widgetChanged()
Vector field symbology settings changed.
void setSettings(const QgsVectorFieldSettings &settings)
Synchronizes the widgets state with settings.
void setHasMagnitude(bool hasMagnitude)
Sets whether the data behind the widget carries a magnitude.
void setMagnitudeRange(double minimum, double maximum)
Sets the minimum and maximum magnitude of the data, which the color ramp shader is classified against...
Represents a renderer settings for vector datasets.
#define SIP_NO_FILE