QGIS API Documentation 3.41.0-Master (3440c17df1d)
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
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 addMetadataUrl();
97 void removeSelectedMetadataUrl();
98 void mButtonAddWmsDimension_clicked();
99 void mButtonEditWmsDimension_clicked();
100 void mWmsDimensionsTreeWidget_itemDoubleClicked( QTreeWidgetItem *item, int column );
101 void mButtonRemoveWmsDimension_clicked();
102
103 void mSimplifyDrawingGroupBox_toggled( bool checked );
104
105 signals:
106
108
110
111 private slots:
113 void toggleEditing();
114
116 void saveMultipleStylesAs();
117
118 void aboutToShowStyleMenu();
119
123 void updateVariableEditor();
124
125 void onAuxiliaryLayerNew();
126
127 void onAuxiliaryLayerClear();
128
129 void onAuxiliaryLayerDelete();
130
131 void onAuxiliaryLayerDeleteField();
132
133 void onAuxiliaryLayerAddField();
134
135 // Update the preview of the map tip
136 void updateMapTipPreview();
137 // Resize the map tip preview
138 void resizeMapTip();
139
140 private:
141
142 enum PropertyType
143 {
144 Style = 0,
145 Metadata,
146 };
147
148 void updateSymbologyPage();
149
150 void setPbnQueryBuilderEnabled();
151
152 QgsMessageBar *mMessageBar = nullptr;
153 QgsVectorLayer *mLayer = nullptr;
154
155 bool mMetadataFilled = false;
156
157 QString mOriginalSubsetSQL;
158
159 QAction *mActionLoadMetadata = nullptr;
160 QAction *mActionSaveMetadataAs = nullptr;
161
162 QAction *mActionLoadStyle = nullptr;
163 QAction *mActionSaveStyle = nullptr;
164 QAction *mActionSaveMultipleStyles = nullptr;
165
167 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
169 QgsLabelingWidget *labelingDialog = nullptr;
171 QgsMaskingWidget *mMaskingWidget = nullptr;
173 QgsAttributeActionDialog *mActionDialog = nullptr;
175 QgsDiagramWidget *diagramPropertiesDialog = nullptr;
177 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
179 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
180
182 QList< QgsVectorLayerJoinInfo > mOldJoins;
183
185 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
186
188 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
189 QStandardItemModel *mMetadataUrlModel = nullptr;
190
191 void updateAuxiliaryStoragePage();
192 void deleteAuxiliaryField( int index );
193
194 QgsExpressionContext mContext;
195
197
198 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
199
200 void showHelp();
201
202 QgsMetadataWidget *mMetadataWidget = nullptr;
203
204 QAction *mAuxiliaryLayerActionNew = nullptr;
205 QAction *mAuxiliaryLayerActionClear = nullptr;
206 QAction *mAuxiliaryLayerActionDelete = nullptr;
207 QAction *mAuxiliaryLayerActionExport = nullptr;
208 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
209 QAction *mAuxiliaryLayerActionAddField = nullptr;
210
211 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
212
213 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
214
215 QgsProviderSourceWidget *mSourceWidget = nullptr;
216
218
219 std::unique_ptr<QgsProjectDirtyBlocker> mProjectDirtyBlocker;
220
221 void initMapTipPreview();
222
223 QgsWebView *mMapTipPreview = nullptr;
224
225 private slots:
226 void openPanel( QgsPanelWidget *panel );
227
228 friend class QgsAppScreenShots;
229 friend class TestQgsLayerPropertiesDialogs;
230};
231
232#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.