QGIS API Documentation 4.3.0-Master (0d5b841b09e)
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
27class QgsMeshLayer;
29
40class QgsVectorFieldSettingsWidget : public QWidget, private Ui::QgsVectorFieldSettingsWidgetBase
41{
42 Q_OBJECT
43
44 public:
49 QgsVectorFieldSettingsWidget( QWidget *parent = nullptr );
50
52 void setLayer( QgsMeshLayer *layer );
53
55 void setActiveDatasetGroup( int groupIndex ) { mActiveDatasetGroup = groupIndex; }
56
59
61 void syncToLayer();
62
63 signals:
66
67 private slots:
68 void onSymbologyChanged( int currentIndex );
69 void onStreamLineSeedingMethodChanged( int currentIndex );
70 void onWindBarbUnitsChanged( int currentIndex );
71 void onColoringMethodChanged();
72 void onColorRampMinMaxChanged();
73 void loadColorRampShader();
74
75 private:
80 double filterValue( const QgsDoubleSpinBox *spinBox, double err_val ) const;
81
82 QgsMeshLayer *mMeshLayer = nullptr; //not owned
83 int mActiveDatasetGroup = -1;
84};
85
86#endif // QGSVECTORFIELDSETTINGSWIDGET_H
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
QgsVectorFieldSettings settings() const
Returns vector settings.
QgsVectorFieldSettingsWidget(QWidget *parent=nullptr)
A widget to hold the renderer Vector settings for a mesh layer.
void setActiveDatasetGroup(int groupIndex)
Associates a dataset group with the widget (should be set before syncToLayer()).
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
void widgetChanged()
Mesh rendering settings changed.
void setLayer(QgsMeshLayer *layer)
Associates mesh layer with the widget.
Represents a renderer settings for vector datasets.
#define SIP_NO_FILE