QGIS API Documentation 3.29.0-Master (da8bb1db43)
qgsvectorlayerproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdlgvectorlayerproperties.h
3 Unified property dialog for vector layers
4 -------------------
5 begin : 2004-01-28
6 copyright : (C) 2004 by Gary E.Sherman
7 email : sherman at mrcc.com
8***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef QGSVECTORLAYERPROPERTIES
20#define QGSVECTORLAYERPROPERTIES
21
22#include <QStandardItemModel>
23
25#include "ui_qgsvectorlayerpropertiesbase.h"
26#include "qgsguiutils.h"
30#include "qgsmaplayerstyle.h"
31
32class QgsMapLayer;
33
35class QgsVectorLayer;
43class QgsMessageBar;
45class QgsPanelWidget;
46class QgsVectorLayer3DRendererWidget;
49class QgsMaskingWidget;
52
57class GUI_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private Ui::QgsVectorLayerPropertiesBase, private QgsExpressionContextGenerator
58{
59 Q_OBJECT
60
61 public:
62#ifndef SIP_RUN
64 {
69 };
70 Q_ENUM( StyleType )
71#endif
72
73 QgsVectorLayerProperties( QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
74
76 void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory );
77
78 protected slots:
79 void optionsStackedWidget_CurrentChanged( int index ) final;
80
81 private slots:
82
83 void insertFieldOrExpression();
84
86 void syncToLayer();
87
89 QString htmlMetadata();
90
92 void apply();
93
95 void onCancel();
96
97 //
98 //methods reimplemented from qt designer base class
99 //
100
101 void pbnQueryBuilder_clicked();
102 void pbnIndex_clicked();
103 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
104 void loadDefaultStyle_clicked();
105 void saveDefaultStyle_clicked();
106 void loadMetadata();
107 void saveMetadataAs();
108 void saveDefaultMetadata();
109 void loadDefaultMetadata();
110 void pbnUpdateExtents_clicked();
111
112 void mButtonAddJoin_clicked();
113 void mButtonEditJoin_clicked();
114 void mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
115 void mButtonRemoveJoin_clicked();
116
117 // Server properties
118 void addMetadataUrl();
119 void removeSelectedMetadataUrl();
120 void mButtonAddWmsDimension_clicked();
121 void mButtonEditWmsDimension_clicked();
122 void mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
123 void mButtonRemoveWmsDimension_clicked();
124
125 void mSimplifyDrawingGroupBox_toggled( bool checked );
126
127 signals:
128
130
132
133 private slots:
135 void toggleEditing();
136
138 void saveStyleAs();
139
141 void saveMultipleStylesAs();
142
144 void loadStyle();
145
146 void aboutToShowStyleMenu();
147
151 void updateVariableEditor();
152
153 void onAuxiliaryLayerNew();
154
155 void onAuxiliaryLayerClear();
156
157 void onAuxiliaryLayerDelete();
158
159 void onAuxiliaryLayerDeleteField();
160
161 void onAuxiliaryLayerAddField();
162
163 void urlClicked( const QUrl &url );
164
165 private:
166
167 enum PropertyType
168 {
169 Style = 0,
170 Metadata,
171 };
172
173 void updateSymbologyPage();
174
175 void setPbnQueryBuilderEnabled();
176
177 QgsMapCanvas *mCanvas = nullptr;
178 QgsMessageBar *mMessageBar = nullptr;
179 QgsVectorLayer *mLayer = nullptr;
180
181 bool mMetadataFilled = false;
182
183 QString mOriginalSubsetSQL;
184
185 QPushButton *mBtnStyle = nullptr;
186 QPushButton *mBtnMetadata = nullptr;
187 QAction *mActionLoadMetadata = nullptr;
188 QAction *mActionSaveMetadataAs = nullptr;
189
190 QAction *mActionLoadStyle = nullptr;
191 QAction *mActionSaveStyle = nullptr;
192 QAction *mActionSaveMultipleStyles = nullptr;
193
195 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
197 QgsLabelingWidget *labelingDialog = nullptr;
199 QgsMaskingWidget *mMaskingWidget = nullptr;
201 QgsAttributeActionDialog *mActionDialog = nullptr;
203 QgsDiagramProperties *diagramPropertiesDialog = nullptr;
205 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
207 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
208
210 QList< QgsVectorLayerJoinInfo > mOldJoins;
211
213 QList<QgsMapLayerConfigWidget *> mLayerPropertiesPages;
214
219 QgsMapLayerStyle mOldStyle;
220
221 void initDiagramTab();
222
224 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
225
227 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
228 QStandardItemModel *mMetadataUrlModel = nullptr;
229
230 void updateAuxiliaryStoragePage();
231 void deleteAuxiliaryField( int index );
232
233 QgsExpressionContext mContext;
234
236
237 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
238
239 void showHelp();
240
241 QgsMetadataWidget *mMetadataWidget = nullptr;
242
243 QAction *mAuxiliaryLayerActionNew = nullptr;
244 QAction *mAuxiliaryLayerActionClear = nullptr;
245 QAction *mAuxiliaryLayerActionDelete = nullptr;
246 QAction *mAuxiliaryLayerActionExport = nullptr;
247 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
248 QAction *mAuxiliaryLayerActionAddField = nullptr;
249
250 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
251
252 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
253
254 QgsProviderSourceWidget *mSourceWidget = nullptr;
255
257
258 private slots:
259 void openPanel( QgsPanelWidget *panel );
260
261 friend class QgsAppScreenShots;
262};
263
264#endif
Class allowing to manage the auxiliary storage for a vector layer.
This class represents a coordinate reference system (CRS).
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Master widget for configuration of labeling of a vector layer.
QgsLayerTreeFilterProxyModel is a sort filter proxy model to easily reproduce the legend/layer tree i...
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:90
The QgsMapLayerComboBox class is a combo box which displays the list of layers.
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
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 any widget that can be shown as a inline panel.
Base class for widgets which allow customization of a provider's source URI.
Defines left outer join from our vector layer to some other vector layer.
void toggleEditing(QgsMapLayer *)
void exportAuxiliaryLayer(QgsAuxiliaryLayer *layer)
A widget for configuring the temporal properties for a vector layer.
Represents a vector layer which manages a vector based data sets.
#define SIP_SKIP
Definition: qgis_sip.h:126
const QgsCoordinateReferenceSystem & crs
Setting to define QGIS Server WMS Dimension.