QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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_sip.h"
20 #include "qgsrendererwidget.h"
21 #include "qgis_gui.h"
22 
23 class QMenu;
25 
32 class GUI_EXPORT QgsInvertedPolygonRendererWidget : public QgsRendererWidget, private Ui::QgsInvertedPolygonRendererWidgetBase
33 {
34  Q_OBJECT
35 
36  public:
37 
44  static QgsRendererWidget *create( QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer ) SIP_FACTORY;
45 
54 
55  QgsFeatureRenderer *renderer() override;
56 
57  void setContext( const QgsSymbolWidgetContext &context ) override;
58 
59  void setDockMode( bool dockMode ) override;
60 
61  protected:
63  std::unique_ptr<QgsInvertedPolygonRenderer> mRenderer;
65  std::unique_ptr<QgsRendererWidget> mEmbeddedRendererWidget;
66 
67  private slots:
68  void mRendererComboBox_currentIndexChanged( int index );
69  void mMergePolygonsCheckBox_stateChanged( int state );
70 };
71 
72 
73 #endif // QGSINVERTEDPOLYGONRENDERERWIDGET_H
QgsRendererWidget::renderer
virtual QgsFeatureRenderer * renderer()=0
Returns pointer to the renderer (no transfer of ownership)
QgsInvertedPolygonRendererWidget
A widget used represent options of a QgsInvertedPolygonRenderer.
Definition: qgsinvertedpolygonrendererwidget.h:32
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition: qgssymbolwidgetcontext.h:35
QgsInvertedPolygonRendererWidget::mEmbeddedRendererWidget
std::unique_ptr< QgsRendererWidget > mEmbeddedRendererWidget
The widget used to represent the mask's embedded renderer.
Definition: qgsinvertedpolygonrendererwidget.h:65
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
qgis_sip.h
QgsRendererWidget::setDockMode
void setDockMode(bool dockMode) override
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Definition: qgsrendererwidget.cpp:356
QgsInvertedPolygonRendererWidget::mRenderer
std::unique_ptr< QgsInvertedPolygonRenderer > mRenderer
The mask renderer.
Definition: qgsinvertedpolygonrendererwidget.h:63
QgsRendererWidget
Base class for renderer settings widgets.
Definition: qgsrendererwidget.h:45
QgsFeatureRenderer
Definition: qgsrenderer.h:101
QgsStyle
Definition: qgsstyle.h:159
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:391
qgsrendererwidget.h
QgsRendererWidget::setContext
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expressio...
Definition: qgsrendererwidget.cpp:341
QgsInvertedPolygonRenderer
QgsInvertedPolygonRenderer is a polygon-only feature renderer used to display features inverted,...
Definition: qgsinvertedpolygonrenderer.h:42