QGIS API Documentation  3.27.0-Master (e113457133)
qgsmeshlayerproperties.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshlayerproperties.h
3  ------------------------
4  begin : Jun 2018
5  copyright : (C) 2018 by Peter Petrik
6  email : zilolv at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSMESHLAYERPROPERTIES_H
18 #define QGSMESHLAYERPROPERTIES_H
19 
20 #include "ui_qgsmeshlayerpropertiesbase.h"
21 
23 #include "qgsoptionsdialogbase.h"
24 #include "qgsguiutils.h"
25 #include "qgis_gui.h"
26 
27 class QgsMapLayer;
28 class QgsMapCanvas;
29 class QgsMeshLayer;
32 class QgsMeshLayer3DRendererWidget;
35 class QgsMetadataWidget;
36 
46 class GUI_EXPORT QgsMeshLayerProperties : public QgsOptionsDialogBase, private Ui::QgsMeshLayerPropertiesBase
47 {
48  Q_OBJECT
49 
50  public:
51 
59  QgsMeshLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *canvas, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags );
60 
66  void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory );
67 
68  protected slots:
69  void optionsStackedWidget_CurrentChanged( int index ) override SIP_SKIP ;
70 
71  private slots:
73  void syncToLayer();
74 
76  void apply();
78  void syncAndRepaint();
80  void changeCrs( const QgsCoordinateReferenceSystem &crs );
82  void loadDefaultStyle();
84  void saveDefaultStyle();
86  void loadStyle();
88  void saveStyleAs();
90  void aboutToShowStyleMenu();
92  void reloadTemporalProperties();
94  void onCancel();
95 
96  void onTimeReferenceChange();
97 
98  void urlClicked( const QUrl &url );
99  void loadMetadata();
100  void saveMetadataAs();
101 
102  private:
104  QgsRendererMeshPropertiesWidget *mRendererMeshPropertiesWidget = nullptr;
105 
106  QList<QgsMapLayerConfigWidget *> mConfigWidgets;
107 
109  QgsMeshLayer *mMeshLayer = nullptr;
110 
112  QgsMeshLayer3DRendererWidget *mMesh3DWidget = nullptr;
113 
118  QgsMapLayerStyle mOldStyle;
119 
120  QPushButton *mBtnStyle = nullptr;
121  QPushButton *mBtnMetadata = nullptr;
122  QAction *mActionLoadMetadata = nullptr;
123  QAction *mActionSaveMetadataAs = nullptr;
124 
125  QgsMapCanvas *mCanvas = nullptr;
126  QgsMetadataWidget *mMetadataWidget = nullptr;
127 
128  bool mIsMapSettingsTemporal = false;
129 
130  friend class TestQgsMeshLayerPropertiesDialog;
131 
132  void showHelp();
133 
134  QgsCoordinateReferenceSystem mBackupCrs;
135 };
136 
137 
138 #endif // QGSMESHLAYERPROPERTIES_H
This class represents a coordinate reference system (CRS).
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:90
Factory class for creating custom map layer property pages.
A panel widget that can be shown in the map style dock.
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer.
Base class for all map layer types.
Definition: qgsmaplayer.h:73
Property sheet for a mesh map layer.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:99
A widget for setup of the static dataset of a mesh layer.
A wizard to edit metadata on a map layer.
A base dialog for options and properties dialogs that offers vertical tabs.
virtual void optionsStackedWidget_CurrentChanged(int index)
Select relevant tab on current page change.
Widget for renderer properties of the mesh, contours (scalars) and vectors data associated with the m...
#define SIP_SKIP
Definition: qgis_sip.h:126
const QgsCoordinateReferenceSystem & crs