QGIS API Documentation  2.15.0-Master (02a0ebe)
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 
33 
34 class GUI_EXPORT QgsLayerPropertiesWidget : public QgsPanelWidget, private Ui::LayerPropertiesWidget
35 {
36  Q_OBJECT
37 
38  public:
39  QgsLayerPropertiesWidget( QgsSymbolLayerV2* layer, const QgsSymbolV2* symbol, const QgsVectorLayer* vl, QWidget* parent = nullptr );
40 
47  QgsExpressionContext* expressionContext() const { return mPresetExpressionContext; }
48 
54  virtual void setMapCanvas( QgsMapCanvas* canvas );
55 
61  virtual void setDockMode( bool dockMode ) override;
62 
63  public slots:
64  void layerTypeChanged();
65  void emitSignalChanged();
66 
75  void setExpressionContext( QgsExpressionContext* context );
76 
77  signals:
78  void changed();
79  void changeLayer( QgsSymbolLayerV2* );
80 
81  protected:
82  void populateLayerTypes();
83  void updateSymbolLayerWidget( QgsSymbolLayerV2* layer );
84 
85  protected: // data
87 
90 
91  private slots:
92  void reloadLayer();
93 
94  private:
95  QgsExpressionContext* mPresetExpressionContext;
96  QgsMapCanvas* mMapCanvas;
97 
98 };
99 
100 #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...
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