QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
21 class QgsSymbolV2;
22 class QgsSymbolLayerV2;
24 class QgsVectorLayer;
25 class QgsMapCanvas;
26 class QgsPanelWidget;
27 
28 class SymbolLayerItem;
29 
30 #include <QMap>
31 #include <QStandardItemModel>
32 
36 class GUI_EXPORT QgsLayerPropertiesWidget : public QgsPanelWidget, private Ui::LayerPropertiesWidget
37 {
38  Q_OBJECT
39 
40  public:
41  QgsLayerPropertiesWidget( QgsSymbolLayerV2* layer, const QgsSymbolV2* symbol, const QgsVectorLayer* vl, QWidget* parent = nullptr );
42 
49  QgsExpressionContext* expressionContext() const { return mPresetExpressionContext; }
50 
56  virtual void setMapCanvas( QgsMapCanvas* canvas );
57 
63  virtual void setDockMode( bool dockMode ) override;
64 
65  public slots:
66  void layerTypeChanged();
67  void emitSignalChanged();
68 
77  void setExpressionContext( QgsExpressionContext* context );
78 
79  signals:
80  void changed();
81  void changeLayer( QgsSymbolLayerV2* );
82 
83  protected:
84  void populateLayerTypes();
85  void updateSymbolLayerWidget( QgsSymbolLayerV2* layer );
86 
87  protected: // data
89 
92 
93  private slots:
94  void reloadLayer();
95 
96  private:
97  QgsExpressionContext* mPresetExpressionContext;
98  QgsMapCanvas* mMapCanvas;
99 
100 };
101 
102 #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:109
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
Represents a vector layer which manages a vector based data sets.
const QgsVectorLayer * mVectorLayer