QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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
qgsmaplayerstylemanager.h
QgsRendererMeshPropertiesWidget
Widget for renderer properties of the mesh, contours (scalars) and vectors data associated with the m...
Definition: qgsrenderermeshpropertieswidget.h:39
QgsOptionsDialogBase
A base dialog for options and properties dialogs that offers vertical tabs. It handles saving/restori...
Definition: qgsoptionsdialogbase.h:86
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:89
QgsMeshLayerProperties
Property sheet for a mesh map layer. Contains information, source and style tabs.
Definition: qgsmeshlayerproperties.h:46
QgsMapLayerConfigWidget
A panel widget that can be shown in the map style dock.
Definition: qgsmaplayerconfigwidget.h:115
qgsoptionsdialogbase.h
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition: qgsmeshlayer.h:98
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
QgsOptionsDialogBase::optionsStackedWidget_CurrentChanged
virtual void optionsStackedWidget_CurrentChanged(int index)
Select relevant tab on current page change.
Definition: qgsoptionsdialogbase.cpp:783
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition: qgsmaplayer.h:72
QgsMetadataWidget
A wizard to edit metadata on a map layer.
Definition: qgsmetadatawidget.h:41
QgsMeshStaticDatasetWidget
A widget for setup of the static dataset of a mesh layer.
Definition: qgsmeshstaticdatasetwidget.h:61
QgsMapLayerStyle
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer.
Definition: qgsmaplayerstyle.h:42
qgsguiutils.h
QgsMapLayerConfigWidgetFactory
Factory class for creating custom map layer property pages.
Definition: qgsmaplayerconfigwidgetfactory.h:34