QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmeshrenderer3daveragingwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshrenderer3daveragingwidget.h
3  ----------------------------------
4  begin : November 2019
5  copyright : (C) 2019 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 QGSMESHRENDERER3DAVERAGINGWIDGET_H
17 #define QGSMESHRENDERER3DAVERAGINGWIDGET_H
18 
19 #include "ui_qgsmeshrenderer3daveragingwidgetbase.h"
20 #include "qgis_gui.h"
22 #include "qgsmeshdataprovider.h"
23 
24 #include <memory>
25 #include <QWidget>
26 
28 
29 class QgsMeshLayer;
31 
39 class QgsMeshRenderer3dAveragingWidget : public QWidget, private Ui::QgsMeshRenderer3dAveragingWidgetBase
40 {
41  Q_OBJECT
42 
43  public:
44 
49  QgsMeshRenderer3dAveragingWidget( QWidget *parent = nullptr );
50 
52  void setLayer( QgsMeshLayer *layer );
53 
59  std::unique_ptr<QgsMesh3dAveragingMethod> averagingMethod() const;
60 
62  void syncToLayer();
63 
64  signals:
66  void widgetChanged();
67 
68  private slots:
69  void onAveragingMethodChanged( int methodIndex );
70 
71  private:
72  QgsMeshLayer *mMeshLayer = nullptr; //not owned
73 };
74 
75 #endif // QGSMESHRENDERER3DAVERAGINGWIDGET_H
QgsMeshRenderer3dAveragingWidget
A widget for setup of the averaging method from 3d to 2d datasets on 3d stacked mesh....
Definition: qgsmeshrenderer3daveragingwidget.h:39
QgsMeshRenderer3dAveragingWidget::averagingMethod
std::unique_ptr< QgsMesh3dAveragingMethod > averagingMethod() const
Returns selected averaging method.
Definition: qgsmeshrenderer3daveragingwidget.cpp:138
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:98
SIP_NO_FILE
#define SIP_NO_FILE
Definition: fromencodedcomponenthelper.h:18
QgsMesh3dAveragingMethod
Abstract class to interpolate 3d stacked mesh data to 2d data.
Definition: qgsmesh3daveraging.h:39
qgsmeshrenderersettings.h
QgsMeshRenderer3dAveragingWidget::QgsMeshRenderer3dAveragingWidget
QgsMeshRenderer3dAveragingWidget(QWidget *parent=nullptr)
A widget to hold the renderer Vector settings for a mesh layer.
Definition: qgsmeshrenderer3daveragingwidget.cpp:55
QgsMeshRenderer3dAveragingWidget::widgetChanged
void widgetChanged()
Mesh rendering settings changed.
QgsMeshRenderer3dAveragingWidget::syncToLayer
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
Definition: qgsmeshrenderer3daveragingwidget.cpp:202
QgsMeshRenderer3dAveragingWidget::setLayer
void setLayer(QgsMeshLayer *layer)
Associates mesh layer with the widget.
Definition: qgsmeshrenderer3daveragingwidget.cpp:133
qgsmeshdataprovider.h