QGIS API Documentation  2.13.0-Master
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 
27 class SymbolLayerItem;
28 
29 #include <QMap>
30 #include <QStandardItemModel>
31 
32 
33 class GUI_EXPORT QgsLayerPropertiesWidget : public QWidget, private Ui::LayerPropertiesWidget
34 {
35  Q_OBJECT
36 
37  public:
38  QgsLayerPropertiesWidget( QgsSymbolLayerV2* layer, const QgsSymbolV2* symbol, const QgsVectorLayer* vl, QWidget* parent = nullptr );
39 
46  QgsExpressionContext* expressionContext() const { return mPresetExpressionContext; }
47 
53  virtual void setMapCanvas( QgsMapCanvas* canvas );
54 
55  public slots:
56  void layerTypeChanged();
57  void emitSignalChanged();
58 
67  void setExpressionContext( QgsExpressionContext* context );
68 
69  signals:
70  void changed();
71  void changeLayer( QgsSymbolLayerV2* );
72 
73  protected:
74  void populateLayerTypes();
75  void updateSymbolLayerWidget( QgsSymbolLayerV2* layer );
76 
77  protected: // data
79 
82 
83  private slots:
84  void reloadLayer();
85 
86  private:
87  QgsExpressionContext* mPresetExpressionContext;
88  QgsMapCanvas* mMapCanvas;
89 
90 };
91 
92 #endif //QGSLAYERPROPERTIESWIDGET_H
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:105
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Represents a vector layer which manages a vector based data sets.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
const QgsVectorLayer * mVectorLayer