16#ifndef QGSSYMBOLSELECTORDIALOG_H
17#define QGSSYMBOLSELECTORDIALOG_H
19#include "ui_qgssymbolselectordialogbase.h"
29#include <QDialogButtonBox>
31#include <QStandardItemModel>
53class DataDefinedRestorer :
public QObject
57 DataDefinedRestorer( QgsSymbol *symbol,
const QgsSymbolLayer *symbolLayer );
63 QgsMarkerSymbol *mMarker =
nullptr;
64 const QgsMarkerSymbolLayer *mMarkerSymbolLayer =
nullptr;
67 QPointF mMarkerOffset;
71 QgsLineSymbol *mLine =
nullptr;
72 const QgsLineSymbolLayer *mLineSymbolLayer =
nullptr;
74 double mLineOffset = 0;
153 void moveLayerDown();
178 void duplicateLayer();
189 void updateLayerPreview();
194 void updatePreview();
197 void symbolChanged();
219 void projectDataChanged();
224 void layersAboutToBeRemoved(
const QList<QgsMapLayer *> &layers );
226 void emitSymbolModified();
228 void updateListIcons();
244 void updateLockButton();
246 void updateLockButtonIcon();
266 void moveLayerByOffset(
int offset );
272 void setWidget( QWidget *widget );
276 std::unique_ptr<QgsSymbol> mOwnedSymbol;
277 QMenu *mAdvancedMenu =
nullptr;
278 QAction *mLockColorAction =
nullptr;
279 QAction *mLockSelectionColorAction =
nullptr;
280 QPointer<QgsVectorLayer> mVectorLayer;
283 QWidget *mPresentWidget =
nullptr;
285 std::unique_ptr<DataDefinedRestorer> mDataDefineRestorer;
289 bool mBlockModified =
false;
397 void updateLockButton();
403 void moveLayerByOffset(
int offset );
405 void setWidget( QWidget *widget );
408 QDialogButtonBox *mButtonBox =
nullptr;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Abstract base class for line symbol layers.
A line symbol type, for rendering LineString and MultiLineString geometries.
Map canvas is a class for displaying all GIS data types on a canvas.
Abstract base class for marker symbol layers.
A marker symbol type, for rendering Point and MultiPoint geometries.
A database of saved style entities, including symbols, color ramps, text formats and others.
A node contained within a QgsSymbolLayerModel.
A QAbstractItemModel subclass for displaying a QgsSymbol in a tree view in the symbology panel.
Abstract base class for symbol layers.
A dialog that can be used to select and build a symbol.
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression ...
QgsSymbolSelectorDialog(QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent=nullptr, bool embedded=false)
Constructor for QgsSymbolSelectorDialog.
QgsSymbolWidgetContext context() const
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expressi...
QMenu * advancedMenu()
Returns menu for "advanced" button - create it if doesn't exist and show the advanced button.
void symbolModified()
Emitted when the symbol defined in the dialog is modified.
void symbolChanged()
Slot to update tree when a new symbol from style.
QDialogButtonBox * buttonBox() const
Returns a reference to the dialog's button box.
QgsSymbol * symbol()
Returns the symbol that is currently active in the widget.
void loadSymbol(QgsSymbol *symbol)
Loads the given symbol into the widget.
void updateLayerPreview()
void duplicateLayer()
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer.
void changeLayer(QgsSymbolLayer *layer)
Alters tree and sets proper widget when Layer Type is changed.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
Represents a vector layer which manages a vector based dataset.