|
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/gui/layout/qgslayoutviewrubberband.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +class QgsLayoutViewRubberBand |
| 14 | +{ |
| 15 | +%Docstring |
| 16 | + QgsLayoutViewRubberBand is an abstract base class for temporary rubber band items |
| 17 | + in various shapes, for use within QgsLayoutView widgets. |
| 18 | +.. versionadded:: 3.0 |
| 19 | +%End |
| 20 | + |
| 21 | +%TypeHeaderCode |
| 22 | +#include "qgslayoutviewrubberband.h" |
| 23 | +%End |
| 24 | + |
| 25 | +%ConvertToSubClassCode |
| 26 | + if ( dynamic_cast<QgsLayoutViewMouseEvent *>( sipCpp ) ) |
| 27 | + sipType = sipType_QgsLayoutViewMouseEvent; |
| 28 | + else |
| 29 | + sipType = 0; |
| 30 | +%End |
| 31 | + public: |
| 32 | + |
| 33 | + QgsLayoutViewRubberBand( QgsLayoutView *view ); |
| 34 | +%Docstring |
| 35 | + Constructor for QgsLayoutViewRubberBand. |
| 36 | +%End |
| 37 | + |
| 38 | + virtual ~QgsLayoutViewRubberBand(); |
| 39 | + |
| 40 | + virtual QgsLayoutViewRubberBand *create( QgsLayoutView *view ) const = 0 /Factory/; |
| 41 | +%Docstring |
| 42 | + Creates a new instance of the QgsLayoutViewRubberBand subclass. |
| 43 | + :rtype: QgsLayoutViewRubberBand |
| 44 | +%End |
| 45 | + |
| 46 | + virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ) = 0; |
| 47 | +%Docstring |
| 48 | + Called when a rubber band should be created at the specified |
| 49 | + starting ``position`` (in layout coordinate space). |
| 50 | +%End |
| 51 | + |
| 52 | + virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ) = 0; |
| 53 | +%Docstring |
| 54 | + Called when a rubber band should be updated to reflect a temporary |
| 55 | + ending ``position`` (in layout coordinate space). |
| 56 | +%End |
| 57 | + |
| 58 | + virtual void finish( QPointF position, Qt::KeyboardModifiers modifiers ) = 0; |
| 59 | +%Docstring |
| 60 | + Called when a rubber band use has finished and the rubber |
| 61 | + band is no longer required. |
| 62 | +%End |
| 63 | + |
| 64 | + QgsLayoutView *view() const; |
| 65 | +%Docstring |
| 66 | + Returns the view associated with the rubber band. |
| 67 | +.. seealso:: layout() |
| 68 | + :rtype: QgsLayoutView |
| 69 | +%End |
| 70 | + |
| 71 | + QgsLayout *layout() const; |
| 72 | +%Docstring |
| 73 | + Returns the layout associated with the rubber band. |
| 74 | +.. seealso:: view() |
| 75 | + :rtype: QgsLayout |
| 76 | +%End |
| 77 | + |
| 78 | + protected: |
| 79 | + |
| 80 | + QRectF updateRect( QPointF start, QPointF position, bool constrainSquare, bool fromCenter ); |
| 81 | +%Docstring |
| 82 | + Calculates an updated bounding box rectangle from a original ``start`` position |
| 83 | + and new ``position``. If ``constrainSquare`` is true then the bounding box will be |
| 84 | + forced to a square shape. If ``fromCenter`` is true then the original ``start`` |
| 85 | + position will form the center point of the returned rectangle. |
| 86 | + :rtype: QRectF |
| 87 | +%End |
| 88 | + |
| 89 | +}; |
| 90 | + |
| 91 | + |
| 92 | +class QgsLayoutViewRectangularRubberBand : QgsLayoutViewRubberBand |
| 93 | +{ |
| 94 | +%Docstring |
| 95 | + QgsLayoutViewRectangularRubberBand is rectangular rubber band for use within QgsLayoutView widgets. |
| 96 | +.. versionadded:: 3.0 |
| 97 | +%End |
| 98 | + |
| 99 | +%TypeHeaderCode |
| 100 | +#include "qgslayoutviewrubberband.h" |
| 101 | +%End |
| 102 | + public: |
| 103 | + |
| 104 | + QgsLayoutViewRectangularRubberBand( QgsLayoutView *view ); |
| 105 | +%Docstring |
| 106 | + Constructor for QgsLayoutViewRectangularRubberBand. |
| 107 | +%End |
| 108 | + virtual QgsLayoutViewRectangularRubberBand *create( QgsLayoutView *view ) const /Factory/; |
| 109 | + |
| 110 | + |
| 111 | + ~QgsLayoutViewRectangularRubberBand(); |
| 112 | + |
| 113 | + virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ); |
| 114 | + |
| 115 | + virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ); |
| 116 | + |
| 117 | + virtual void finish( QPointF, Qt::KeyboardModifiers ); |
| 118 | + |
| 119 | + |
| 120 | +}; |
| 121 | + |
| 122 | +class QgsLayoutViewEllipticalRubberBand : QgsLayoutViewRubberBand |
| 123 | +{ |
| 124 | +%Docstring |
| 125 | + QgsLayoutViewEllipseRubberBand is elliptical rubber band for use within QgsLayoutView widgets. |
| 126 | +.. versionadded:: 3.0 |
| 127 | +%End |
| 128 | + |
| 129 | +%TypeHeaderCode |
| 130 | +#include "qgslayoutviewrubberband.h" |
| 131 | +%End |
| 132 | + public: |
| 133 | + |
| 134 | + QgsLayoutViewEllipticalRubberBand( QgsLayoutView *view ); |
| 135 | +%Docstring |
| 136 | + Constructor for QgsLayoutViewEllipticalRubberBand. |
| 137 | +%End |
| 138 | + virtual QgsLayoutViewEllipticalRubberBand *create( QgsLayoutView *view ) const /Factory/; |
| 139 | + |
| 140 | + |
| 141 | + ~QgsLayoutViewEllipticalRubberBand(); |
| 142 | + |
| 143 | + virtual void start( QPointF position, Qt::KeyboardModifiers modifiers ); |
| 144 | + |
| 145 | + virtual void update( QPointF position, Qt::KeyboardModifiers modifiers ); |
| 146 | + |
| 147 | + virtual void finish( QPointF, Qt::KeyboardModifiers ); |
| 148 | + |
| 149 | + |
| 150 | +}; |
| 151 | +/************************************************************************ |
| 152 | + * This file has been generated automatically from * |
| 153 | + * * |
| 154 | + * src/gui/layout/qgslayoutviewrubberband.h * |
| 155 | + * * |
| 156 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 157 | + ************************************************************************/ |
0 commit comments