2017-05-23 14:45:44 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgshighlight.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsHighlight: QgsMapCanvasItem
|
2013-06-22 19:37:41 +02:00
|
|
|
{
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A class for highlight features on the map.
|
|
|
|
|
|
|
|
The QgsHighlight class provides a transparent overlay canvas item
|
|
|
|
for highlighting features or geometries on a map canvas.
|
|
|
|
|
|
|
|
\code{.py}
|
|
|
|
color = QColor(Qt.red)
|
|
|
|
highlight = QgsHighlight(mapCanvas, feature, layer)
|
|
|
|
highlight.setColor(color)
|
|
|
|
color.setAlpha(50)
|
|
|
|
highlight.setFillColor(color)
|
|
|
|
highlight.show()
|
|
|
|
\endcode
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-05-23 14:45:44 +02:00
|
|
|
#include "qgshighlight.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2016-08-02 07:26:11 +10:00
|
|
|
|
2017-11-08 17:41:11 +01:00
|
|
|
QgsHighlight( QgsMapCanvas *mapCanvas, const QgsGeometry &geom, QgsMapLayer *layer );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsHighlight
|
|
|
|
:param mapCanvas: associated map canvas
|
|
|
|
:param geom: initial geometry of highlight
|
|
|
|
:param layer: associated map layer
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2016-08-02 07:26:11 +10:00
|
|
|
|
2017-05-23 14:45:44 +02:00
|
|
|
QgsHighlight( QgsMapCanvas *mapCanvas, const QgsFeature &feature, QgsVectorLayer *layer );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for highlighting true feature shape using feature attributes
|
|
|
|
and renderer.
|
|
|
|
:param mapCanvas: map canvas
|
|
|
|
:param feature:
|
|
|
|
:param layer: vector layer
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
~QgsHighlight();
|
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
void setColor( const QColor &color );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set line/stroke to color, polygon fill to color with alpha = 63.
|
|
|
|
This is legacy function, use setFillColor() after setColor() if different fill color is required. *
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2014-01-26 18:35:21 +01:00
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
void setFillColor( const QColor &fillColor );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Fill color for the highlight.
|
|
|
|
Will be used for polygons and points.
|
2017-11-08 17:41:11 +01:00
|
|
|
|
|
|
|
.. versionadded:: 2.4
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2014-03-27 13:45:25 +01:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
void setWidth( int width );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set stroke width.
|
2017-11-08 17:41:11 +01:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Ignored in feature mode.
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2014-03-27 13:45:25 +01:00
|
|
|
void setBuffer( double buffer );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set line / stroke buffer in millimeters.
|
2017-11-08 17:41:11 +01:00
|
|
|
|
|
|
|
.. versionadded:: 2.4
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2014-03-27 13:45:25 +01:00
|
|
|
|
|
|
|
void setMinWidth( double width );
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Set minimum line / stroke width in millimeters.
|
2017-11-08 17:41:11 +01:00
|
|
|
|
|
|
|
.. versionadded:: 2.4
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2014-03-27 13:45:25 +01:00
|
|
|
|
2017-11-08 17:41:11 +01:00
|
|
|
QgsMapLayer *layer() const;
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Return the layer for which this highlight has been created.
|
|
|
|
|
|
|
|
:rtype: QgsMapLayer
|
2017-05-23 14:45:44 +02:00
|
|
|
%End
|
2014-04-06 16:17:58 +02:00
|
|
|
|
2015-02-03 02:21:52 +01:00
|
|
|
virtual void updatePosition();
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
protected:
|
2017-05-01 16:42:33 +02:00
|
|
|
virtual void paint( QPainter *p );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
void updateRect();
|
2017-05-23 14:45:44 +02:00
|
|
|
%Docstring
|
|
|
|
recalculates needed rectangle
|
|
|
|
%End
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
};
|
2017-05-23 14:45:44 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgshighlight.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|