Skip to content
Permalink
Browse files
Make QgsRubberBand fillColor a Q_PROPERTY
  • Loading branch information
m-kuhn committed Sep 30, 2018
1 parent a0292c3 commit 328760437cf5f9edc330a27df457b10c3aab6853
@@ -8,7 +8,9 @@



class QgsRubberBand: QgsMapCanvasItem


class QgsRubberBand : QObject, QgsMapCanvasItem
{
%Docstring
A class for drawing transient features (e.g. digitizing lines) on the map.
@@ -22,6 +24,7 @@ for tracking the mouse while drawing polylines or polygons.
%End
public:


enum IconType
{

@@ -522,6 +522,7 @@ SET(QGIS_GUI_MOC_HDRS
qgsrasterlayersaveasdialog.h
qgsrasterpyramidsoptionswidget.h
qgsrelationeditorwidget.h
qgsrubberband.h
qgsscalecombobox.h
qgsscalerangewidget.h
qgsscalevisibilitydialog.h
@@ -778,7 +779,6 @@ SET(QGIS_GUI_HDRS
qgsmaplayerconfigwidgetfactory.h
qgsmapmouseevent.h
qgsmaptip.h
qgsrubberband.h
qgssnapindicator.h
qgssqlcomposerdialog.h
qgstablewidgetitem.h
@@ -49,6 +49,9 @@ void QgsRubberBand::setColor( const QColor &color )

void QgsRubberBand::setFillColor( const QColor &color )
{
if ( mBrush.color() == color )
return;

mBrush.setColor( color );
}

@@ -18,10 +18,13 @@
#include "qgsmapcanvasitem.h"
#include "qgis.h"
#include "qgsgeometry.h"

#include <QBrush>
#include <QList>
#include <QPen>
#include <QPolygon>
#include <QObject>

#include "qgis_gui.h"

class QgsVectorLayer;
@@ -34,10 +37,13 @@ class QPaintEvent;
* The QgsRubberBand class provides a transparent overlay widget
* for tracking the mouse while drawing polylines or polygons.
*/
class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
{
Q_OBJECT
public:

Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )

//! Icons
enum IconType
{

0 comments on commit 3287604

Please sign in to comment.