QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
qgsmaplayerconfigwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaplayerconfigwidget.h
3  -------------------------
4  begin : June 2016
5  copyright : (C) 2016 by Nathan Woodrow
6  email : woodrow dot nathan at gmail dot 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 #ifndef QGSMAPLAYERCONFIGWIDGET_H
16 #define QGSMAPLAYERCONFIGWIDGET_H
17 
18 #include <QWidget>
19 #include <QIcon>
20 
21 #include "qgspanelwidget.h"
22 #include "qgis_gui.h"
23 
24 class QgsMapCanvas;
25 class QgsMapLayer;
26 
33 class GUI_EXPORT QgsMapLayerConfigWidget : public QgsPanelWidget
34 {
35  Q_OBJECT
36  public:
37 
46  QgsMapLayerConfigWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
47 
54  virtual bool shouldTriggerLayerRepaint() const { return true; }
55 
56  public slots:
57 
62  virtual void apply() = 0;
63 
64  protected:
65  QgsMapLayer *mLayer = nullptr;
66  QgsMapCanvas *mMapCanvas = nullptr;
67 };
68 
69 #endif // QGSMAPLAYERCONFIGWIDGET_H
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition: qgsmaplayer.h:79
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:75
virtual bool shouldTriggerLayerRepaint() const
Whether this config widget changes map layer properties in a way that triggerRepaint() should be call...