mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
158 lines
4.6 KiB
Plaintext
158 lines
4.6 KiB
Plaintext
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/gui/layout/qgslayoutviewrubberband.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
class QgsLayoutViewRubberBand
|
||
|
{
|
||
|
%Docstring
|
||
|
QgsLayoutViewRubberBand is an abstract base class for temporary rubber band items
|
||
|
in various shapes, for use within QgsLayoutView widgets.
|
||
|
.. versionadded:: 3.0
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgslayoutviewrubberband.h"
|
||
|
%End
|
||
|
|
||
|
%ConvertToSubClassCode
|
||
|
if ( dynamic_cast<QgsLayoutViewMouseEvent *>( sipCpp ) )
|
||
|
sipType = sipType_QgsLayoutViewMouseEvent;
|
||
|
else
|
||
|
sipType = 0;
|
||
|
%End
|
||
|
public:
|
||
|
|
||
|
QgsLayoutViewRubberBand( QgsLayoutView *view );
|
||
|
%Docstring
|
||
|
Constructor for QgsLayoutViewRubberBand.
|
||
|
%End
|
||
|
|
||
|
virtual ~QgsLayoutViewRubberBand();
|
||
|
|
||
|
virtual QgsLayoutViewRubberBand *create( QgsLayoutView *view ) const = 0 /Factory/;
|
||
|
%Docstring
|
||
|
Creates a new instance of the QgsLayoutViewRubberBand subclass.
|
||
|
:rtype: QgsLayoutViewRubberBand
|
||
|
%End
|
||
|
|
||
|
virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
|
||
|
%Docstring
|
||
|
Called when a rubber band should be created at the specified
|
||
|
starting ``position`` (in layout 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 layout coordinate space).
|
||
|
%End
|
||
|
|
||
|
virtual void finish( QPointF position, Qt::KeyboardModifiers modifiers ) = 0;
|
||
|
%Docstring
|
||
|
Called when a rubber band use has finished and the rubber
|
||
|
band is no longer required.
|
||
|
%End
|
||
|
|
||
|
QgsLayoutView *view() const;
|
||
|
%Docstring
|
||
|
Returns the view associated with the rubber band.
|
||
|
.. seealso:: layout()
|
||
|
:rtype: QgsLayoutView
|
||
|
%End
|
||
|
|
||
|
QgsLayout *layout() const;
|
||
|
%Docstring
|
||
|
Returns the layout associated with the rubber band.
|
||
|
.. seealso:: view()
|
||
|
:rtype: QgsLayout
|
||
|
%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.
|
||
|
:rtype: QRectF
|
||
|
%End
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
class QgsLayoutViewRectangularRubberBand : QgsLayoutViewRubberBand
|
||
|
{
|
||
|
%Docstring
|
||
|
QgsLayoutViewRectangularRubberBand is rectangular rubber band for use within QgsLayoutView widgets.
|
||
|
.. versionadded:: 3.0
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgslayoutviewrubberband.h"
|
||
|
%End
|
||
|
public:
|
||
|
|
||
|
QgsLayoutViewRectangularRubberBand( QgsLayoutView *view );
|
||
|
%Docstring
|
||
|
Constructor for QgsLayoutViewRectangularRubberBand.
|
||
|
%End
|
||
|
virtual QgsLayoutViewRectangularRubberBand *create( QgsLayoutView *view ) const /Factory/;
|
||
|
|
||
|
|
||
|
~QgsLayoutViewRectangularRubberBand();
|
||
|
|
||
|
virtual void start( QPointF position, Qt::KeyboardModifiers modifiers );
|
||
|
|
||
|
virtual void update( QPointF position, Qt::KeyboardModifiers modifiers );
|
||
|
|
||
|
virtual void finish( QPointF, Qt::KeyboardModifiers );
|
||
|
|
||
|
|
||
|
};
|
||
|
|
||
|
class QgsLayoutViewEllipticalRubberBand : QgsLayoutViewRubberBand
|
||
|
{
|
||
|
%Docstring
|
||
|
QgsLayoutViewEllipseRubberBand is elliptical rubber band for use within QgsLayoutView widgets.
|
||
|
.. versionadded:: 3.0
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgslayoutviewrubberband.h"
|
||
|
%End
|
||
|
public:
|
||
|
|
||
|
QgsLayoutViewEllipticalRubberBand( QgsLayoutView *view );
|
||
|
%Docstring
|
||
|
Constructor for QgsLayoutViewEllipticalRubberBand.
|
||
|
%End
|
||
|
virtual QgsLayoutViewEllipticalRubberBand *create( QgsLayoutView *view ) const /Factory/;
|
||
|
|
||
|
|
||
|
~QgsLayoutViewEllipticalRubberBand();
|
||
|
|
||
|
virtual void start( QPointF position, Qt::KeyboardModifiers modifiers );
|
||
|
|
||
|
virtual void update( QPointF position, Qt::KeyboardModifiers modifiers );
|
||
|
|
||
|
virtual void finish( QPointF, Qt::KeyboardModifiers );
|
||
|
|
||
|
|
||
|
};
|
||
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/gui/layout/qgslayoutviewrubberband.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|