QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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 insertFieldOrExpression();
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
141 enum PropertyType
142 {
143 Style = 0,
144 Metadata,
145 };
146
147 void updateSymbologyPage();
148
149 void setPbnQueryBuilderEnabled();
150
151 QgsMessageBar *mMessageBar = nullptr;
152 QgsVectorLayer *mLayer = nullptr;
153
154 bool mMetadataFilled = false;
155
156 QString mOriginalSubsetSQL;
157
158 QAction *mActionLoadMetadata = nullptr;
159 QAction *mActionSaveMetadataAs = nullptr;
160
161 QAction *mActionLoadStyle = nullptr;
162 QAction *mActionSaveStyle = nullptr;
163 QAction *mActionSaveMultipleStyles = nullptr;
164
166 QgsRendererPropertiesDialog *mRendererDialog = nullptr;
168 QgsLabelingWidget *labelingDialog = nullptr;
170 QgsMaskingWidget *mMaskingWidget = nullptr;
172 QgsAttributeActionDialog *mActionDialog = nullptr;
174 QgsDiagramProperties *diagramPropertiesDialog = nullptr;
176 QgsSourceFieldsProperties *mSourceFieldsPropertiesDialog = nullptr;
178 QgsAttributesFormProperties *mAttributesFormPropertiesDialog = nullptr;
179
181 QList< QgsVectorLayerJoinInfo > mOldJoins;
182
183 void initDiagramTab();
184
186 void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 );
187
189 void addWmsDimensionInfoToTreeWidget( const QgsMapLayerServerProperties::WmsDimensionInfo &wmsDim, int insertIndex = -1 );
190 QStandardItemModel *mMetadataUrlModel = nullptr;
191
192 void updateAuxiliaryStoragePage();
193 void deleteAuxiliaryField( int index );
194
195 QgsExpressionContext mContext;
196
198
199 QgsLayerTreeFilterProxyModel *mLayersDependenciesTreeModel;
200
201 void showHelp();
202
203 QgsMetadataWidget *mMetadataWidget = nullptr;
204
205 QAction *mAuxiliaryLayerActionNew = nullptr;
206 QAction *mAuxiliaryLayerActionClear = nullptr;
207 QAction *mAuxiliaryLayerActionDelete = nullptr;
208 QAction *mAuxiliaryLayerActionExport = nullptr;
209 QAction *mAuxiliaryLayerActionDeleteField = nullptr;
210 QAction *mAuxiliaryLayerActionAddField = nullptr;
211
212 QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
213
214 QgsVectorLayerTemporalPropertiesWidget *mTemporalWidget = nullptr;
215
216 QgsProviderSourceWidget *mSourceWidget = nullptr;
217
219
220 std::unique_ptr<QgsProjectDirtyBlocker> mProjectDirtyBlocker;
221
222 void initMapTipPreview();
223
224 QgsWebView *mMapTipPreview = nullptr;
225
226 private slots:
227 void openPanel( QgsPanelWidget *panel );
228
229 friend class QgsAppScreenShots;
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:74
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:237
const QgsCoordinateReferenceSystem & crs
Setting to define QGIS Server WMS Dimension.