QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgslayerpropertieswidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayerpropertieswidget.h
3 ---------------------
4 begin : June 2012
5 copyright : (C) 2012 by Martin Dobias
6 email : aruntheguy at gmail.com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSLAYERPROPERTIESWIDGET_H
17#define QGSLAYERPROPERTIESWIDGET_H
18
19#include "ui_widget_layerproperties.h"
20
22#include "qgssymbollayer.h"
24
25class QgsSymbol;
26class QgsSymbolLayer;
28class QgsVectorLayer;
29class QgsMapCanvas;
30class QgsPanelWidget;
31
32#include <QMap>
33#include <QStandardItemModel>
34#include "qgis_gui.h"
35
44class GUI_EXPORT QgsLayerPropertiesWidget : public QgsPanelWidget, public QgsExpressionContextGenerator, private Ui::LayerPropertiesWidget
45{
46 Q_OBJECT
47
48 public:
56 QgsLayerPropertiesWidget( QgsSymbolLayer *layer, const QgsSymbol *symbol, QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
57
64
70
76 void setDockMode( bool dockMode ) override;
77
78 public slots:
79 void layerTypeChanged();
80 void emitSignalChanged();
81
82 signals:
83
87 void changed();
88
93
94 protected:
95 void populateLayerTypes();
97
99
106
107 protected: // data
109
110 const QgsSymbol *mSymbol = nullptr;
112
113 private slots:
114 void reloadLayer();
115 void mEnabledCheckBox_toggled( bool enabled );
116 void updateProperty();
117
118 private:
119 QgsSymbolWidgetContext mContext;
120};
121
122#endif //QGSLAYERPROPERTIESWIDGET_H
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...
QgsLayerPropertiesWidget(QgsSymbolLayer *layer, const QgsSymbol *symbol, QgsVectorLayer *vl, QWidget *parent=nullptr)
Constructor for QgsLayerPropertiesWidget.
void changeLayer(QgsSymbolLayer *layer)
Emitted when the symbol layer is changed in the widget.
QgsSymbolWidgetContext context() const
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expressi...
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression ...
void changed()
Emitted when the symbol layer configuration is changed in the widget.
void updateSymbolLayerWidget(QgsSymbolLayer *layer)
void registerDataDefinedButton(QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key)
Registers a data defined override button.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for any widget that can be shown as an inline panel.
bool dockMode() const
Returns the dock mode state.
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
A button for controlling property overrides which may apply to a widget.
Abstract base class for widgets used to configure QgsSymbolLayer classes.
Abstract base class for symbol layers.
Property
Data definable properties.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
Represents a vector layer which manages a vector based dataset.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53