QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgsvectortilelayerproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectortilelayerproperties.h
3 --------------------------------------
4 Date : May 2020
5 Copyright : (C) 2020 by Martin Dobias
6 Email : wonder dot sk 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 QGSVECTORTILELAYERPROPERTIES_H
17#define QGSVECTORTILELAYERPROPERTIES_H
18
20#include "ui_qgsvectortilelayerpropertiesbase.h"
21#include "qgsmaplayerstyle.h"
22
23class QgsMapLayer;
24class QgsMapCanvas;
25class QgsMessageBar;
26class QgsVectorTileBasicLabelingWidget;
27class QgsVectorTileBasicRendererWidget;
31
32
39class GUI_EXPORT QgsVectorTileLayerProperties : public QgsOptionsDialogBase, private Ui::QgsVectorTileLayerPropertiesBase
40{
41 Q_OBJECT
42 public:
44 QgsVectorTileLayerProperties( QgsVectorTileLayer *lyr, QgsMapCanvas *canvas, QgsMessageBar *messageBar, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags );
45
51 void loadDefaultStyle();
52
58 void saveDefaultStyle();
59
65 void loadStyle();
66
72 void saveStyleAs();
73
74 private slots:
75 void apply();
76 void onCancel();
77
78 void aboutToShowStyleMenu();
79 void loadMetadata();
80 void saveMetadataAs();
81 void showHelp();
82 void urlClicked( const QUrl &url );
83 void crsChanged( const QgsCoordinateReferenceSystem &crs );
84
85 protected slots:
86 void optionsStackedWidget_CurrentChanged( int index ) override SIP_SKIP ;
87
88 private:
89 void syncToLayer();
90
91 private:
92 QgsVectorTileLayer *mLayer = nullptr;
93
94 QgsVectorTileBasicRendererWidget *mRendererWidget = nullptr;
95 QgsVectorTileBasicLabelingWidget *mLabelingWidget = nullptr;
96
97 QPushButton *mBtnStyle = nullptr;
98 QPushButton *mBtnMetadata = nullptr;
99 QAction *mActionLoadMetadata = nullptr;
100 QAction *mActionSaveMetadataAs = nullptr;
101
102 QgsMapCanvas *mMapCanvas = nullptr;
103 QgsMetadataWidget *mMetadataWidget = nullptr;
104
105 QgsProviderSourceWidget *mSourceWidget = nullptr;
106
111 QgsMapLayerStyle mOldStyle;
112};
113
114#endif // QGSVECTORTILELAYERPROPERTIES_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
Stores style information (renderer, opacity, labeling, diagrams etc.) applicable to a map layer.
Base class for all map layer types.
Definition: qgsmaplayer.h:73
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:61
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.
Base class for widgets which allow customization of a provider's source URI.
Vectortile layer properties dialog.
Implements a map layer that is dedicated to rendering of vector tiles.
#define SIP_SKIP
Definition: qgis_sip.h:126
const QgsCoordinateReferenceSystem & crs