QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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"
27#include "qgshelp.h"
31#include "qgslayertree.h"
32#include "qgslayertreemodel.h"
34
35class QgsMapLayer;
36
38class QgsVectorLayer;
46class QgsMessageBar;
48class QgsPanelWidget;
49class QgsVectorLayer3DRendererWidget;
52class QgsMaskingWidget;
55
60class GUI_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private Ui::QgsVectorLayerPropertiesBase, private QgsExpressionContextGenerator
61{
62 Q_OBJECT
63
64 public:
65#ifndef SIP_RUN
67 {
72 };
73 Q_ENUM( StyleType )
74#endif
75
76 QgsVectorLayerProperties( QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
77
79 void addPropertiesPageFactory( const QgsMapLayerConfigWidgetFactory *factory );
80
81 protected slots:
82 void optionsStackedWidget_CurrentChanged( int index ) override SIP_SKIP;
83
84 private slots:
85
86 void insertFieldOrExpression();
87
89 void syncToLayer();
90
92 QString htmlMetadata();
93
95 void apply();
96
98 void onCancel();
99
100 //
101 //methods reimplemented from qt designer base class
102 //
103
104 void pbnQueryBuilder_clicked();
105 void pbnIndex_clicked();
106 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
107 void loadDefaultStyle_clicked();
108 void saveDefaultStyle_clicked();
109 void loadMetadata();
110 void saveMetadataAs();
111 void saveDefaultMetadata();
112 void loadDefaultMetadata();
113 void pbnUpdateExtents_clicked();
114
115 void mButtonAddJoin_clicked();
116 void mButtonEditJoin_clicked();
117 void mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
118 void mButtonRemoveJoin_clicked();
119
120 // Server properties
121 void addMetadataUrl();
122 void removeSelectedMetadataUrl();
123 void mButtonAddWmsDimension_clicked();
124 void mButtonEditWmsDimension_clicked();
125 void mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
126 void mButtonRemoveWmsDimension_clicked();
127
128 void mSimplifyDrawingGroupBox_toggled( bool checked );
129
130 signals:
131
133
135
136 private slots:
138 void toggleEditing();
139
141 void saveStyleAs();
142
144 void saveMultipleStylesAs();
145
147 void loadStyle();
148
149 void aboutToShowStyleMenu();
150
154 void updateVariableEditor();
155
156 void onAuxiliaryLayerNew();
157
158 void onAuxiliaryLayerClear();
159
160 void onAuxiliaryLayerDelete();
161
162 void onAuxiliaryLayerDeleteField();
163
164 void onAuxiliaryLayerAddField();
165
166 void urlClicked( const QUrl &url );
167
168 private:
169
170 enum PropertyType
171 {
172 Style = 0,
173 Metadata,
174 };
175
176 void updateSymbologyPage();
177
178 void setPbnQueryBuilderEnabled();
179
180 QgsMapCanvas *mCanvas = nullptr;
181 QgsMessageBar *mMessageBar = nullptr;
182 QgsVectorLayer *mLayer = nullptr;
183
184 bool mMetadataFilled = false;
185
186 QString mOriginalSubsetSQL;
187
188 QPushButton *mBtnStyle = nullptr;
189 QPushButton *mBtnMetadata = nullptr;
190 QAction *mActionLoadMetadata = nullptr;
191 QAction *mActionSaveMetadataAs = nullptr;
192
193 QAction *mActionLoadStyle = nullptr;
194 QAction *mActionSaveStyle = nullptr;
195 QAction *mActionSaveMultipleStyles = nullptr;
196
198 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
200 QgsLabelingWidget *labelingDialog = nullptr;
202 QgsMaskingWidget *mMaskingWidget = nullptr;
204 QgsAttributeActionDialog *mActionDialog = nullptr;
206 QgsDiagramProperties *diagramPropertiesDialog = nullptr;
208 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
210 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
211
213 QList< QgsVectorLayerJoinInfo > mOldJoins;
214
216 QList<QgsMapLayerConfigWidget *> mLayerPropertiesPages;
217
222 QgsMapLayerStyle mOldStyle;
223
224 void initDiagramTab();
225
227 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
228
230 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
231 QStandardItemModel *mMetadataUrlModel = nullptr;
232
233 void updateAuxiliaryStoragePage();
234 void deleteAuxiliaryField( int index );
235
236 QgsExpressionContext mContext;
237
239
240 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
241
242 void showHelp();
243
244 QgsMetadataWidget *mMetadataWidget = nullptr;
245
246 QAction *mAuxiliaryLayerActionNew = nullptr;
247 QAction *mAuxiliaryLayerActionClear = nullptr;
248 QAction *mAuxiliaryLayerActionDelete = nullptr;
249 QAction *mAuxiliaryLayerActionExport = nullptr;
250 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
251 QAction *mAuxiliaryLayerActionAddField = nullptr;
252
253 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
254
255 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
256
257 QgsProviderSourceWidget *mSourceWidget = nullptr;
258
260
261 private slots:
262 void openPanel( QgsPanelWidget *panel );
263
264 friend class QgsAppScreenShots;
265};
266
267#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.