QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsmeshrendererscalarsettingswidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshrendererscalarsettingswidget.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 QGSMESHRENDERERSCALARSETTINGSWIDGET_H
17#define QGSMESHRENDERERSCALARSETTINGSWIDGET_H
18
19#include "ui_qgsmeshrendererscalarsettingswidgetbase.h"
20#include "qgis_gui.h"
22#include "qgsmeshdataprovider.h"
23
24#include <QWidget>
25
27
28class QgsMeshLayer;
29
38class GUI_EXPORT QgsMeshRendererScalarSettingsWidget : public QWidget, private Ui::QgsMeshRendererScalarSettingsWidgetBase
39{
40 Q_OBJECT
41
42 public:
47 QgsMeshRendererScalarSettingsWidget( QWidget *parent = nullptr );
48
50 void setLayer( QgsMeshLayer *layer );
51
53 void setActiveDatasetGroup( int groupIndex );
54
56 QgsMeshRendererScalarSettings settings() const;
57
59 void syncToLayer();
60
62 void setCanvas( QgsMapCanvas *canvas );
63
64 signals:
67
68 private slots:
69 void minMaxChanged();
70 void recalculateMinMaxButtonClicked();
71 void onEdgeStrokeWidthMethodChanged();
72
73 private:
74 double spinBoxValue( const QgsDoubleSpinBox *spinBox ) const;
75 QgsMeshRendererScalarSettings::DataResamplingMethod dataIntepolationMethod() const;
76 void mUserDefinedRadioButton_toggled( bool toggled );
77 void mMinMaxRadioButton_toggled( bool toggled );
78
79 void recalculateMinMax();
80
81 bool dataIsDefinedOnFaces() const;
82 bool dataIsDefinedOnEdges() const;
83
84 QgsMeshLayer *mMeshLayer = nullptr; // not owned
85 int mActiveDatasetGroup = -1;
86 QgsMapCanvas *mCanvas = nullptr;
87};
88
89#endif // QGSMESHRENDERERSCALARSETTINGSWIDGET_H
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Map canvas is a class for displaying all GIS data types on a canvas.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
A widget for setup of the scalar dataset renderer settings of a mesh layer.
void widgetChanged()
Mesh rendering settings changed.
Represents a mesh renderer settings for scalar datasets.
DataResamplingMethod
Resampling of value from dataset.
#define SIP_NO_FILE