File: qgslayoutviewrubberband.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (226 lines) | stat: -rw-r--r-- 6,800 bytes parent folder | download | duplicates (12)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/layout/qgslayoutviewrubberband.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsLayoutViewRubberBand : QObject
{
%Docstring(signature="appended")
:py:class:`QgsLayoutViewRubberBand` is an abstract base class for
temporary rubber band items in various shapes, for use within
:py:class:`QgsLayoutView` widgets.
%End

%TypeHeaderCode
#include "qgslayoutviewrubberband.h"
%End
%ConvertToSubClassCode
    if ( dynamic_cast<QgsLayoutViewMouseEvent *>( sipCpp ) )
      sipType = sipType_QgsLayoutViewMouseEvent;
    else
      sipType = 0;
%End
  public:
    QgsLayoutViewRubberBand( QgsLayoutView *view = 0 );
%Docstring
Constructor for QgsLayoutViewRubberBand.
%End

    ~QgsLayoutViewRubberBand();

    virtual QgsLayoutViewRubberBand *create( QgsLayoutView *view ) const = 0 /Factory/;
%Docstring
Creates a new instance of the QgsLayoutViewRubberBand subclass.
%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 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

    QgsLayoutView *view() const;
%Docstring
Returns the view associated with the rubber band.

.. seealso:: :py:func:`layout`
%End

    QgsLayout *layout() const;
%Docstring
Returns the layout associated with the rubber band.

.. seealso:: :py:func:`view`
%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

  signals:

    void sizeChanged( const QString &size );
%Docstring
Emitted when the size of the rubber band is changed. The ``size``
argument gives a translated string describing the new rubber band size,
with a format which differs per subclass (e.g. rectangles may describe a
size using width and height, while circles may describe a size by
radius).
%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 QgsLayoutViewRectangularRubberBand : QgsLayoutViewRubberBand
{
%Docstring(signature="appended")
:py:class:`QgsLayoutViewRectangularRubberBand` is rectangular rubber
band for use within :py:class:`QgsLayoutView` widgets.
%End

%TypeHeaderCode
#include "qgslayoutviewrubberband.h"
%End
  public:
    QgsLayoutViewRectangularRubberBand( QgsLayoutView *view = 0 );
%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 QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() );


};

class QgsLayoutViewEllipticalRubberBand : QgsLayoutViewRubberBand
{
%Docstring(signature="appended")
:py:class:`QgsLayoutViewEllipseRubberBand` is elliptical rubber band for
use within :py:class:`QgsLayoutView` widgets.
%End

%TypeHeaderCode
#include "qgslayoutviewrubberband.h"
%End
  public:
    QgsLayoutViewEllipticalRubberBand( QgsLayoutView *view = 0 );
%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 QRectF finish( QPointF position = QPointF(), Qt::KeyboardModifiers modifiers = Qt::KeyboardModifiers() );


};

class QgsLayoutViewTriangleRubberBand : QgsLayoutViewRubberBand
{
%Docstring(signature="appended")
:py:class:`QgsLayoutViewTriangleRubberBand` is triangular rubber band
for use within :py:class:`QgsLayoutView` widgets.
%End

%TypeHeaderCode
#include "qgslayoutviewrubberband.h"
%End
  public:
    QgsLayoutViewTriangleRubberBand( QgsLayoutView *view = 0 );
%Docstring
Constructor for QgsLayoutViewTriangleRubberBand.
%End
    virtual QgsLayoutViewTriangleRubberBand *create( QgsLayoutView *view ) const /Factory/;


    ~QgsLayoutViewTriangleRubberBand();

    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/layout/qgslayoutviewrubberband.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/