QGIS API Documentation  2.99.0-Master (0a63d1f)
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 #include "qgsexpressioncontext.h"
21 #include "qgssymbolwidgetcontext.h"
22 
23 class QgsSymbol;
24 class QgsSymbolLayer;
26 class QgsVectorLayer;
27 class QgsMapCanvas;
28 class QgsPanelWidget;
29 
30 class SymbolLayerItem;
31 
32 #include <QMap>
33 #include <QStandardItemModel>
34 #include "qgis_gui.h"
35 
39 class GUI_EXPORT QgsLayerPropertiesWidget : public QgsPanelWidget, protected QgsExpressionContextGenerator, private Ui::LayerPropertiesWidget
40 {
41  Q_OBJECT
42 
43  public:
44  QgsLayerPropertiesWidget( QgsSymbolLayer* layer, const QgsSymbol* symbol, const QgsVectorLayer* vl, QWidget* parent = nullptr );
45 
51  void setContext( const QgsSymbolWidgetContext& context );
52 
57  QgsSymbolWidgetContext context() const;
58 
64  virtual void setDockMode( bool dockMode ) override;
65 
66  public slots:
67  void layerTypeChanged();
68  void emitSignalChanged();
69 
70  signals:
71  void changed();
72  void changeLayer( QgsSymbolLayer* );
73 
74  protected:
75  void populateLayerTypes();
76  void updateSymbolLayerWidget( QgsSymbolLayer* layer );
77 
79 
80  protected: // data
82 
85 
86  private slots:
87  void reloadLayer();
88  void on_mEnabledCheckBox_toggled( bool enabled );
89 
90  void updateDataDefinedEnable();
91 
92  private:
93 
94  QgsSymbolWidgetContext mContext;
95 
96 };
97 
98 #endif //QGSLAYERPROPERTIESWIDGET_H
Base class for any widget that can be shown as a inline panel.
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:74
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs...
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract interface for generating an expression context.
Represents a vector layer which manages a vector based data sets.
const QgsVectorLayer * mVectorLayer