QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsmeshrenderermeshsettingswidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshrenderermeshsettingswidget.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 QGSMESHRENDERERMESHSETTINGSWIDGET_H
17 #define QGSMESHRENDERERMESHSETTINGSWIDGET_H
18 
19 #include "ui_qgsmeshrenderermeshsettingswidgetbase.h"
21 #include "qgis_gui.h"
22 
23 #include <QWidget>
24 
26 
27 class QgsMeshLayer;
28 
37 class QgsMeshRendererMeshSettingsWidget : public QWidget, private Ui::QgsMeshRendererMeshSettingsWidgetBase
38 {
39  Q_OBJECT
40 
41  public:
42 
43  enum MeshType
44  {
48  };
49 
54  QgsMeshRendererMeshSettingsWidget( QWidget *parent = nullptr );
55 
61  void setLayer( QgsMeshLayer *layer, MeshType meshType );
62 
65 
67  void syncToLayer();
68 
69  signals:
71  void widgetChanged();
72 
73  private:
74  QgsMeshLayer *mMeshLayer = nullptr; // not owned
75  MeshType mMeshType = MeshType::Native;
76 };
77 
78 #endif // QGSMESHRENDERERMESHSETTINGSWIDGET_H
QgsMeshRendererMeshSettings
Represents a mesh renderer settings for mesh object.
Definition: qgsmeshrenderersettings.h:41
QgsMeshRendererMeshSettingsWidget::Triangular
@ Triangular
Definition: qgsmeshrenderermeshsettingswidget.h:46
QgsMeshRendererMeshSettingsWidget::syncToLayer
void syncToLayer()
Synchronizes widgets state with associated mesh layer.
Definition: qgsmeshrenderermeshsettingswidget.cpp:64
QgsMeshRendererMeshSettingsWidget::setLayer
void setLayer(QgsMeshLayer *layer, MeshType meshType)
Associates mesh layer with the widget.
Definition: qgsmeshrenderermeshsettingswidget.cpp:49
QgsMeshRendererMeshSettingsWidget::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
QgsMeshRendererMeshSettingsWidget::QgsMeshRendererMeshSettingsWidget
QgsMeshRendererMeshSettingsWidget(QWidget *parent=nullptr)
A widget to hold the renderer mesh settings for a mesh layer.
Definition: qgsmeshrenderermeshsettingswidget.cpp:29
SIP_NO_FILE
#define SIP_NO_FILE
Definition: fromencodedcomponenthelper.h:18
qgsmeshrenderersettings.h
QgsMeshRendererMeshSettingsWidget
A widget for setup of the mesh frame settings of the mesh layer. Can be used for native,...
Definition: qgsmeshrenderermeshsettingswidget.h:37
QgsMeshRendererMeshSettingsWidget::MeshType
MeshType
Definition: qgsmeshrenderermeshsettingswidget.h:43
QgsMeshRendererMeshSettingsWidget::Edge
@ Edge
Definition: qgsmeshrenderermeshsettingswidget.h:47
QgsMeshRendererMeshSettingsWidget::settings
QgsMeshRendererMeshSettings settings() const
Returns the mesh rendering settings (native or triangular or edge)
Definition: qgsmeshrenderermeshsettingswidget.cpp:55
QgsMeshRendererMeshSettingsWidget::Native
@ Native
Definition: qgsmeshrenderermeshsettingswidget.h:45