1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/plot/qgsplotrubberband.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsPlotRubberBand : QObject
{
%Docstring(signature="appended")
:py:class:`QgsPlotRubberBand` is an abstract base class for temporary
rubber band items in various shapes, for use within
:py:class:`QgsPlotCanvas` widgets.
.. versionadded:: 3.26
%End
%TypeHeaderCode
#include "qgsplotrubberband.h"
%End
public:
QgsPlotRubberBand( QgsPlotCanvas *canvas = 0 );
%Docstring
Constructor for QgsPlotRubberBand.
%End
~QgsPlotRubberBand();
virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
%Docstring
Called when a rubber band should be created at the specified starting
``position`` (in canvas coordinate space).
%End
virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
%Docstring
Called when a rubber band should be updated to reflect a temporary
ending ``position`` (in canvas coordinate space).
%End
virtual QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() ) = 0;
%Docstring
Called when a rubber band use has finished and the rubber band is no
longer required. Returns the final bounding box of the rubber band.
%End
QgsPlotCanvas *canvas() const;
%Docstring
Returns the canvas associated with the rubber band.
%End
QBrush brush() const;
%Docstring
Returns the brush used for drawing the rubber band.
.. seealso:: :py:func:`setBrush`
.. seealso:: :py:func:`pen`
%End
void setBrush( const QBrush &brush );
%Docstring
Sets the ``brush`` used for drawing the rubber band.
.. seealso:: :py:func:`brush`
.. seealso:: :py:func:`setPen`
%End
QPen pen() const;
%Docstring
Returns the pen used for drawing the rubber band.
.. seealso:: :py:func:`setPen`
.. seealso:: :py:func:`brush`
%End
void setPen( const QPen &pen );
%Docstring
Sets the ``pen`` used for drawing the rubber band.
.. seealso:: :py:func:`pen`
.. seealso:: :py:func:`setBrush`
%End
protected:
QRectF updateRect( QPointF start, QPointF position, bool constrainSquare, bool fromCenter );
%Docstring
Calculates an updated bounding box rectangle from a original ``start``
position and new ``position``. If ``constrainSquare`` is ``True`` then
the bounding box will be forced to a square shape. If ``fromCenter`` is
``True`` then the original ``start`` position will form the center point
of the returned rectangle.
%End
};
class QgsPlotRectangularRubberBand : QgsPlotRubberBand
{
%Docstring(signature="appended")
:py:class:`QgsPlotRectangularRubberBand` is rectangular rubber band for
use within :py:class:`QgsPlotCanvas` widgets.
.. versionadded:: 3.26
%End
%TypeHeaderCode
#include "qgsplotrubberband.h"
%End
public:
QgsPlotRectangularRubberBand( QgsPlotCanvas *canvas = 0 );
%Docstring
Constructor for QgsPlotRectangularRubberBand.
%End
~QgsPlotRectangularRubberBand();
virtual void start( QPointF position, Qt::KeyboardModifiers modifiers );
virtual void update( QPointF position, Qt::KeyboardModifiers modifiers );
virtual QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/plot/qgsplotrubberband.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|