File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
python/gui/auto_generated Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
10
10
11
- class QgsRubberBand: QgsMapCanvasItem
11
+
12
+
13
+ class QgsRubberBand : QObject, QgsMapCanvasItem
12
14
{
13
15
%Docstring
14
16
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.
22
24
%End
23
25
public:
24
26
27
+
25
28
enum IconType
26
29
{
27
30
Original file line number Diff line number Diff line change @@ -522,6 +522,7 @@ SET(QGIS_GUI_MOC_HDRS
522
522
qgsrasterlayersaveasdialog.h
523
523
qgsrasterpyramidsoptionswidget.h
524
524
qgsrelationeditorwidget.h
525
+ qgsrubberband.h
525
526
qgsscalecombobox.h
526
527
qgsscalerangewidget.h
527
528
qgsscalevisibilitydialog.h
@@ -778,7 +779,6 @@ SET(QGIS_GUI_HDRS
778
779
qgsmaplayerconfigwidgetfactory.h
779
780
qgsmapmouseevent.h
780
781
qgsmaptip.h
781
- qgsrubberband.h
782
782
qgssnapindicator.h
783
783
qgssqlcomposerdialog.h
784
784
qgstablewidgetitem.h
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ void QgsRubberBand::setColor( const QColor &color )
49
49
50
50
void QgsRubberBand::setFillColor ( const QColor &color )
51
51
{
52
+ if ( mBrush .color () == color )
53
+ return ;
54
+
52
55
mBrush .setColor ( color );
53
56
}
54
57
Original file line number Diff line number Diff line change 18
18
#include " qgsmapcanvasitem.h"
19
19
#include " qgis.h"
20
20
#include " qgsgeometry.h"
21
+
21
22
#include < QBrush>
22
23
#include < QList>
23
24
#include < QPen>
24
25
#include < QPolygon>
26
+ #include < QObject>
27
+
25
28
#include " qgis_gui.h"
26
29
27
30
class QgsVectorLayer ;
@@ -34,10 +37,13 @@ class QPaintEvent;
34
37
* The QgsRubberBand class provides a transparent overlay widget
35
38
* for tracking the mouse while drawing polylines or polygons.
36
39
*/
37
- class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
40
+ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
38
41
{
42
+ Q_OBJECT
39
43
public:
40
44
45
+ Q_PROPERTY ( QColor fillColor READ fillColor WRITE setFillColor )
46
+
41
47
// ! Icons
42
48
enum IconType
43
49
{
You can’t perform that action at this time.
0 commit comments