QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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 
28 class QgsMeshLayer;
29 
38 class QgsMeshRendererScalarSettingsWidget : public QWidget, private Ui::QgsMeshRendererScalarSettingsWidgetBase
39 {
40  Q_OBJECT
41 
42  public:
43 
48  QgsMeshRendererScalarSettingsWidget( QWidget *parent = nullptr );
49 
51  void setLayer( QgsMeshLayer *layer );
52 
54  void setActiveDatasetGroup( int groupIndex );
55 
58 
60  void syncToLayer();
61 
62  signals:
64  void widgetChanged();
65 
66  private slots:
67  void minMaxChanged();
68  void recalculateMinMaxButtonClicked();
69  void onEdgeStrokeWidthMethodChanged();
70 
71  private:
72  double spinBoxValue( const QgsDoubleSpinBox *spinBox ) const;
73  QgsMeshRendererScalarSettings::DataResamplingMethod dataIntepolationMethod() const;
74 
75  bool dataIsDefinedOnFaces() const;
76  bool dataIsDefinedOnEdges() const;
77 
78  QgsMeshLayer *mMeshLayer = nullptr; // not owned
79  int mActiveDatasetGroup = -1;
80 };
81 
82 #endif // QGSMESHRENDERERSCALARSETTINGSWIDGET_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.
Definition: qgsmeshlayer.h:97
A widget for setup of the scalar dataset renderer settings of a mesh layer.
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
void setLayer(QgsMeshLayer *layer)
Associates mesh layer with the widget.
void widgetChanged()
Mesh rendering settings changed.
QgsMeshRendererScalarSettings settings() const
Returns scalar settings.
QgsMeshRendererScalarSettingsWidget(QWidget *parent=nullptr)
A widget to hold the renderer scalar settings for a mesh layer.
void setActiveDatasetGroup(int groupIndex)
Associates a dataset group with the widget (should be set before syncToLayer())
Represents a mesh renderer settings for scalar datasets.
DataResamplingMethod
Resampling of value from dataset.
#define SIP_NO_FILE