QGIS API Documentation  2.99.0-Master (9f5e33a)
qgsinvertedpolygonrendererwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsinvertedpolygonrendererwidget.h
3  ---------------------
4  begin : April 2014
5  copyright : (C) 2014 Hugo Mercier / Oslandia
6  email : hugo dot mercier at oslandia 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 QGSINVERTEDPOLYGONRENDERERWIDGET_H
16 #define QGSINVERTEDPOLYGONRENDERERWIDGET_H
17 
18 #include "ui_qgsinvertedpolygonrendererwidgetbase.h"
19 #include "qgis.h"
21 #include "qgsrendererwidget.h"
22 #include "qgis_gui.h"
23 
24 class QMenu;
25 
31 class GUI_EXPORT QgsInvertedPolygonRendererWidget : public QgsRendererWidget, private Ui::QgsInvertedPolygonRendererWidgetBase
32 {
33  Q_OBJECT
34 
35  public:
36 
42  static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY;
43 
50 
51  virtual QgsFeatureRenderer *renderer() override;
52 
53  void setContext( const QgsSymbolWidgetContext &context ) override;
54 
55  protected:
57  std::unique_ptr<QgsInvertedPolygonRenderer> mRenderer;
59  std::unique_ptr<QgsRendererWidget> mEmbeddedRendererWidget;
60 
61  private slots:
62  void on_mRendererComboBox_currentIndexChanged( int index );
63  void on_mMergePolygonsCheckBox_stateChanged( int state );
64 };
65 
66 
67 #endif // QGSMASKRENDERERV2WIDGET_H
virtual QgsFeatureRenderer * renderer()=0
return pointer to the renderer (no transfer of ownership)
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expressio...
std::unique_ptr< QgsInvertedPolygonRenderer > mRenderer
The mask renderer.
std::unique_ptr< QgsRendererWidget > mEmbeddedRendererWidget
The widget used to represent the mask&#39;s embedded renderer.
Base class for renderer settings widgets.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
A widget used represent options of a QgsInvertedPolygonRenderer.
#define SIP_FACTORY
Definition: qgis_sip.h:57
Represents a vector layer which manages a vector based data sets.