QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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 "ui_qgsvectorlayerpropertiesbase.h"
23
24#include "qgsguiutils.h"
29
30#include <QStandardItemModel>
31
32class QgsMapLayer;
33
35class QgsVectorLayer;
43class QgsMessageBar;
45class QgsPanelWidget;
46class QgsVectorLayer3DRendererWidget;
49class QgsMaskingWidget;
52class QgsWebView;
53
59class GUI_EXPORT QgsVectorLayerProperties : public QgsLayerPropertiesDialog, private Ui::QgsVectorLayerPropertiesBase, private QgsExpressionContextGenerator
60{
61 Q_OBJECT
62
63 public:
64 QgsVectorLayerProperties( QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr = nullptr, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
65
66 bool eventFilter( QObject *obj, QEvent *ev ) override;
67
68 protected slots:
69 void optionsStackedWidget_CurrentChanged( int index ) final;
70 void syncToLayer() final;
71 void apply() final;
72 void rollback() final;
73
74 private slots:
75
76 void insertField();
77 void insertOrEditExpression();
78
80 QString htmlMetadata();
81
82 //
83 //methods reimplemented from qt designer base class
84 //
85
86 void pbnQueryBuilder_clicked();
87 void pbnIndex_clicked();
88 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
89 void pbnUpdateExtents_clicked();
90
91 void mButtonAddJoin_clicked();
92 void mButtonEditJoin_clicked();
93 void mJoinTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
94 void mButtonRemoveJoin_clicked();
95
96 // Server properties
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
188 void updateAuxiliaryStoragePage();
189 void deleteAuxiliaryField( int index );
190
191 QgsExpressionContext mContext;
192
194
195 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
196
197 void showHelp();
198
199 QgsMetadataWidget *mMetadataWidget = nullptr;
200
201 QAction *mAuxiliaryLayerActionNew = nullptr;
202 QAction *mAuxiliaryLayerActionClear = nullptr;
203 QAction *mAuxiliaryLayerActionDelete = nullptr;
204 QAction *mAuxiliaryLayerActionExport = nullptr;
205 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
206 QAction *mAuxiliaryLayerActionAddField = nullptr;
207
208 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
209
210 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
211
212 QgsProviderSourceWidget *mSourceWidget = nullptr;
213
215
216 std::unique_ptr<QgsProjectDirtyBlocker> mProjectDirtyBlocker;
217
218 void initMapTipPreview();
219
220 QgsWebView *mMapTipPreview = nullptr;
221
222 private slots:
223 void openPanel( QgsPanelWidget *panel );
224
225 friend class QgsAppScreenShots;
227};
228
229#endif
A dialog for configuring vector layer actions.
Creates panels to configure attributes 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.
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.
QgsLayerPropertiesDialog(QgsMapLayer *layer, QgsMapCanvas *canvas, const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags(), QgsSettings *settings=nullptr)
Constructor for QgsLayerPropertiesDialog.
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 dynamic list of layers from a QGIS project.
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:80
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.
bool eventFilter(QObject *obj, QEvent *ev) override
QgsVectorLayerProperties(QgsMapCanvas *canvas, QgsMessageBar *messageBar, QgsVectorLayer *lyr=nullptr, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
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:134
Setting to define QGIS Server WMS Dimension.