QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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
57class GUI_EXPORT QgsVectorLayerProperties : public QgsLayerPropertiesDialog, private Ui::QgsVectorLayerPropertiesBase, private QgsExpressionContextGenerator
58{
59 Q_OBJECT
60
61 public:
62 QgsVectorLayerProperties( QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
63
64 bool eventFilter( QObject *obj, QEvent *ev ) override;
65
66 protected slots:
67 void optionsStackedWidget_CurrentChanged( int index ) final;
68 void syncToLayer() FINAL;
69 void apply() FINAL;
70 void rollback() FINAL;
71
72 private slots:
73
74 void insertField();
75 void insertOrEditExpression();
76
78 QString htmlMetadata();
79
80 //
81 //methods reimplemented from qt designer base class
82 //
83
84 void pbnQueryBuilder_clicked();
85 void pbnIndex_clicked();
86 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
87 void pbnUpdateExtents_clicked();
88
89 void mButtonAddJoin_clicked();
90 void mButtonEditJoin_clicked();
91 void mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
92 void mButtonRemoveJoin_clicked();
93
94 // Server properties
95 void addMetadataUrl();
96 void removeSelectedMetadataUrl();
97 void mButtonAddWmsDimension_clicked();
98 void mButtonEditWmsDimension_clicked();
99 void mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
100 void mButtonRemoveWmsDimension_clicked();
101
102 void mSimplifyDrawingGroupBox_toggled( bool checked );
103
104 signals:
105
107
109
110 private slots:
112 void toggleEditing();
113
115 void saveMultipleStylesAs();
116
117 void aboutToShowStyleMenu();
118
122 void updateVariableEditor();
123
124 void onAuxiliaryLayerNew();
125
126 void onAuxiliaryLayerClear();
127
128 void onAuxiliaryLayerDelete();
129
130 void onAuxiliaryLayerDeleteField();
131
132 void onAuxiliaryLayerAddField();
133
134 // Update the preview of the map tip
135 void updateMapTipPreview();
136 // Resize the map tip preview
137 void resizeMapTip();
138
139 private:
140 enum PropertyType
141 {
142 Style = 0,
143 Metadata,
144 };
145
146 void updateSymbologyPage();
147
148 void setPbnQueryBuilderEnabled();
149
150 QgsMessageBar *mMessageBar = nullptr;
151 QgsVectorLayer *mLayer = nullptr;
152
153 bool mMetadataFilled = false;
154
155 QString mOriginalSubsetSQL;
156
157 QAction *mActionLoadMetadata = nullptr;
158 QAction *mActionSaveMetadataAs = nullptr;
159
160 QAction *mActionLoadStyle = nullptr;
161 QAction *mActionSaveStyle = nullptr;
162 QAction *mActionSaveMultipleStyles = nullptr;
163
165 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
167 QgsLabelingWidget *labelingDialog = nullptr;
169 QgsMaskingWidget *mMaskingWidget = nullptr;
171 QgsAttributeActionDialog *mActionDialog = nullptr;
173 QgsDiagramWidget *diagramPropertiesDialog = nullptr;
175 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
177 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
178
180 QList<QgsVectorLayerJoinInfo> mOldJoins;
181
183 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
184
186 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
187 QStandardItemModel *mMetadataUrlModel = nullptr;
188
189 void updateAuxiliaryStoragePage();
190 void deleteAuxiliaryField( int index );
191
192 QgsExpressionContext mContext;
193
195
196 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
197
198 void showHelp();
199
200 QgsMetadataWidget *mMetadataWidget = nullptr;
201
202 QAction *mAuxiliaryLayerActionNew = nullptr;
203 QAction *mAuxiliaryLayerActionClear = nullptr;
204 QAction *mAuxiliaryLayerActionDelete = nullptr;
205 QAction *mAuxiliaryLayerActionExport = nullptr;
206 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
207 QAction *mAuxiliaryLayerActionAddField = nullptr;
208
209 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
210
211 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
212
213 QgsProviderSourceWidget *mSourceWidget = nullptr;
214
216
217 std::unique_ptr<QgsProjectDirtyBlocker> mProjectDirtyBlocker;
218
219 void initMapTipPreview();
220
221 QgsWebView *mMapTipPreview = nullptr;
222
223 private slots:
224 void openPanel( QgsPanelWidget *panel );
225
226 friend class QgsAppScreenShots;
227 friend class TestQgsLayerPropertiesDialogs;
228};
229
230#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.
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.
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.
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.
Base class for all map layer types.
Definition qgsmaplayer.h:76
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 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.
The QgsWebView class is a collection of stubs to mimic the API of QWebView on systems where the real ...
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.