QGIS API Documentation 3.43.0-Master (b60ef06885e)
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
24#include "ui_qgsvectorlayerpropertiesbase.h"
25#include "qgsguiutils.h"
30
31class QgsMapLayer;
32
34class QgsVectorLayer;
42class QgsMessageBar;
44class QgsPanelWidget;
45class QgsVectorLayer3DRendererWidget;
48class QgsMaskingWidget;
51class QgsWebView;
52
58class GUI_EXPORT QgsVectorLayerProperties : public QgsLayerPropertiesDialog, private Ui::QgsVectorLayerPropertiesBase, private QgsExpressionContextGenerator
59{
60 Q_OBJECT
61
62 public:
63 QgsVectorLayerProperties( QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
64
65 bool eventFilter( QObject *obj, QEvent *ev ) override;
66
67 protected slots:
68 void optionsStackedWidget_CurrentChanged( int index ) final;
69 void syncToLayer() FINAL;
70 void apply() FINAL;
71 void rollback() FINAL;
72
73 private slots:
74
75 void insertField();
76 void insertOrEditExpression();
77
79 QString htmlMetadata();
80
81 //
82 //methods reimplemented from qt designer base class
83 //
84
85 void pbnQueryBuilder_clicked();
86 void pbnIndex_clicked();
87 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
88 void pbnUpdateExtents_clicked();
89
90 void mButtonAddJoin_clicked();
91 void mButtonEditJoin_clicked();
92 void mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
93 void mButtonRemoveJoin_clicked();
94
95 // Server properties
96 void mButtonAddWmsDimension_clicked();
97 void mButtonEditWmsDimension_clicked();
98 void mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
99 void mButtonRemoveWmsDimension_clicked();
100
101 void mSimplifyDrawingGroupBox_toggled( bool checked );
102
103 signals:
104
106
108
109 private slots:
111 void toggleEditing();
112
114 void saveMultipleStylesAs();
115
116 void aboutToShowStyleMenu();
117
121 void updateVariableEditor();
122
123 void onAuxiliaryLayerNew();
124
125 void onAuxiliaryLayerClear();
126
127 void onAuxiliaryLayerDelete();
128
129 void onAuxiliaryLayerDeleteField();
130
131 void onAuxiliaryLayerAddField();
132
133 // Update the preview of the map tip
134 void updateMapTipPreview();
135 // Resize the map tip preview
136 void resizeMapTip();
137
138 private:
139 enum PropertyType
140 {
141 Style = 0,
142 Metadata,
143 };
144
145 void updateSymbologyPage();
146
147 void setPbnQueryBuilderEnabled();
148
149 QgsMessageBar *mMessageBar = nullptr;
150 QgsVectorLayer *mLayer = nullptr;
151
152 bool mMetadataFilled = false;
153
154 QString mOriginalSubsetSQL;
155
156 QAction *mActionLoadMetadata = nullptr;
157 QAction *mActionSaveMetadataAs = nullptr;
158
159 QAction *mActionLoadStyle = nullptr;
160 QAction *mActionSaveStyle = nullptr;
161 QAction *mActionSaveMultipleStyles = nullptr;
162
164 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
166 QgsLabelingWidget *labelingDialog = nullptr;
168 QgsMaskingWidget *mMaskingWidget = nullptr;
170 QgsAttributeActionDialog *mActionDialog = nullptr;
172 QgsDiagramWidget *diagramPropertiesDialog = nullptr;
174 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
176 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
177
179 QList<QgsVectorLayerJoinInfo> mOldJoins;
180
182 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
183
185 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
186
187 void updateAuxiliaryStoragePage();
188 void deleteAuxiliaryField( int index );
189
190 QgsExpressionContext mContext;
191
193
194 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
195
196 void showHelp();
197
198 QgsMetadataWidget *mMetadataWidget = nullptr;
199
200 QAction *mAuxiliaryLayerActionNew = nullptr;
201 QAction *mAuxiliaryLayerActionClear = nullptr;
202 QAction *mAuxiliaryLayerActionDelete = nullptr;
203 QAction *mAuxiliaryLayerActionExport = nullptr;
204 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
205 QAction *mAuxiliaryLayerActionAddField = nullptr;
206
207 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
208
209 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
210
211 QgsProviderSourceWidget *mSourceWidget = nullptr;
212
214
215 std::unique_ptr<QgsProjectDirtyBlocker> mProjectDirtyBlocker;
216
217 void initMapTipPreview();
218
219 QgsWebView *mMapTipPreview = nullptr;
220
221 private slots:
222 void openPanel( QgsPanelWidget *panel );
223
224 friend class QgsAppScreenShots;
225 friend class TestQgsLayerPropertiesDialogs;
226};
227
228#endif
A dialog for configuring vector layer actions.
A widget for configuring attribute forms.
Allows managing the auxiliary storage for a vector layer.
Represents a coordinate reference system (CRS).
A widget for configuring layer diagrams.
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.
Base class for "layer properties" dialogs, containing common utilities for handling functionality in ...
virtual void rollback()
Rolls back changes made to the layer.
void optionsStackedWidget_CurrentChanged(int index) override
virtual void apply()=0
Applies the dialog settings to the layer.
virtual void syncToLayer()=0
Resets the dialog to the current layer state.
A sort filter proxy model to easily reproduce the legend/layer tree in a tree view.
Map canvas is a class for displaying all GIS data types on a canvas.
A combobox which displays a list of layers.
Factory class for creating custom map layer property pages.
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition qgsmaplayer.h:77
A bar for displaying non-blocking messages to the user.
A wizard to edit metadata on a map layer.
Base class for any widget that can be shown as an inline panel.
Base class for widgets which allow customization of a provider's source URI.
A dialog for configuring vector layer renderers.
A widget which displays information about vector layer fields, and allows some configuration of them.
Defines left outer join from our vector layer to some other vector layer.
Layer properties dialog for vector layers.
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 dataset.
A collection of stubs to mimic the API of QWebView on systems where the real library is not available...
Definition qgswebview.h:66
#define SIP_SKIP
Definition qgis_sip.h:126
#define FINAL
Definition qgis_sip.h:242
const QgsCoordinateReferenceSystem & crs
Setting to define QGIS Server WMS Dimension.