QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmeshrenderervectorsettingswidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshrenderervectorsettingswidget.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 QGSMESHRENDERERVECTORSETTINGSWIDGET_H
17 #define QGSMESHRENDERERVECTORSETTINGSWIDGET_H
18 
19 #include "ui_qgsmeshrenderervectorsettingswidgetbase.h"
20 #include "qgis_gui.h"
22 #include "qgsmeshdataprovider.h"
24 
25 #include <memory>
26 #include <QWidget>
27 
29 
30 class QgsMeshLayer;
31 
40 class QgsMeshRendererVectorSettingsWidget : public QWidget, private Ui::QgsMeshRendererVectorSettingsWidgetBase
41 {
42  Q_OBJECT
43 
44  public:
45 
50  QgsMeshRendererVectorSettingsWidget( QWidget *parent = nullptr );
51 
53  void setLayer( QgsMeshLayer *layer );
54 
56  void setActiveDatasetGroup( int groupIndex ) { mActiveDatasetGroup = groupIndex; }
57 
60 
62  void syncToLayer();
63 
64  signals:
66  void widgetChanged();
67 
68  private slots:
69  void onSymbologyChanged( int currentIndex );
70  void onStreamLineSeedingMethodChanged( int currentIndex );
71  void onColoringMethodChanged();
72  void onColorRampMinMaxChanged();
73  void loadColorRampShader();
74 
75  private:
76 
81  double filterValue( const QgsDoubleSpinBox *spinBox, double err_val ) const;
82 
83  QgsMeshLayer *mMeshLayer = nullptr; //not owned
84  int mActiveDatasetGroup = -1;
85 };
86 
87 #endif // QGSMESHRENDERERVECTORSETTINGSWIDGET_H
QgsMeshRendererVectorSettingsWidget::setLayer
void setLayer(QgsMeshLayer *layer)
Associates mesh layer with the widget.
Definition: qgsmeshrenderervectorsettingswidget.cpp:118
QgsMeshRendererVectorSettings
Represents a renderer settings for vector datasets.
Definition: qgsmeshrenderersettings.h:410
QgsMeshRendererVectorSettingsWidget::widgetChanged
void widgetChanged()
Mesh rendering settings changed.
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:98
QgsMeshRendererVectorSettingsWidget::syncToLayer
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
Definition: qgsmeshrenderervectorsettingswidget.cpp:196
SIP_NO_FILE
#define SIP_NO_FILE
Definition: fromencodedcomponenthelper.h:18
qgsmeshrenderersettings.h
QgsMeshRendererVectorSettingsWidget::setActiveDatasetGroup
void setActiveDatasetGroup(int groupIndex)
Associates a dataset group with the widget (should be set before syncToLayer())
Definition: qgsmeshrenderervectorsettingswidget.h:56
QgsMeshRendererVectorSettingsWidget::QgsMeshRendererVectorSettingsWidget
QgsMeshRendererVectorSettingsWidget(QWidget *parent=nullptr)
A widget to hold the renderer Vector settings for a mesh layer.
Definition: qgsmeshrenderervectorsettingswidget.cpp:22
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
qgsmeshdataprovider.h
QgsMeshRendererVectorSettingsWidget
A widget for setup of the vector dataset renderer settings of a mesh layer. The layer must be connect...
Definition: qgsmeshrenderervectorsettingswidget.h:40
QgsMeshRendererVectorSettingsWidget::settings
QgsMeshRendererVectorSettings settings() const
Returns vector settings.
Definition: qgsmeshrenderervectorsettingswidget.cpp:123
qgsmeshdatasetgrouptreeview.h