mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Make QgsRubberBand fillColor a Q_PROPERTY
This commit is contained in:
parent
a0292c3ff3
commit
328760437c
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user