File: qgsmodelgraphicsscene.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 (251 lines) | stat: -rw-r--r-- 7,063 bytes parent folder | download | duplicates (6)
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/processing/models/qgsmodelgraphicsscene.h                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsModelGraphicsScene : QGraphicsScene
{
%Docstring(signature="appended")
QGraphicsScene subclass representing the model designer.

.. warning::

   Not stable API

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsmodelgraphicsscene.h"
%End
  public:
    enum ZValues /BaseType=IntEnum/
    {
      GroupBox,
      ArrowLink,
      ModelComponent,
      MouseHandles,
      RubberBand,
      ZSnapIndicator,

    };

    enum Flag /BaseType=IntEnum/
    {
      FlagHideControls,
      FlagHideComments,
    };
    typedef QFlags<QgsModelGraphicsScene::Flag> Flags;


    QgsModelGraphicsScene( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsModelGraphicsScene with the specified ``parent``
object.
%End

    QgsProcessingModelAlgorithm *model();

    void setModel( QgsProcessingModelAlgorithm *model );

    void setFlags( QgsModelGraphicsScene::Flags flags );
%Docstring
Sets the combination of ``flags`` controlling how the scene is rendered
and behaves.

.. seealso:: :py:func:`setFlag`

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

    void setFlag( QgsModelGraphicsScene::Flag flag, bool on = true );
%Docstring
Enables or disables a particular ``flag`` for the scene. Other existing
flags are not affected.

.. seealso:: :py:func:`setFlags`

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

    QgsModelGraphicsScene::Flags flags() const;
%Docstring
Returns the current combination of flags set for the scene.

.. seealso:: :py:func:`setFlags`

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

    virtual void mousePressEvent( QGraphicsSceneMouseEvent *event );


    void createItems( QgsProcessingModelAlgorithm *model, QgsProcessingContext &context );
%Docstring
Populates the scene by creating items representing the specified
``model``.
%End

    QList<QgsModelComponentGraphicItem *> selectedComponentItems();
%Docstring
Returns list of selected component items.
%End

    QgsModelComponentGraphicItem *componentItemAt( QPointF position ) const;
%Docstring
Returns the topmost component item at a specified ``position``.
%End

    QgsModelComponentGraphicItem *groupBoxItem( const QString &uuid );
%Docstring
Returns the graphic item corresponding to the specified group box
``uuid``.
%End

    void selectAll();
%Docstring
Selects all the components in the scene.
%End

    void deselectAll();
%Docstring
Clears any selected items in the scene.

Call this method rather than QGraphicsScene.clearSelection, as the
latter does not correctly emit signals to allow the scene's model to
update.
%End

    void setSelectedItem( QgsModelComponentGraphicItem *item );
%Docstring
Clears any selected items and sets ``item`` as the current selection.
%End

    void setLastRunResult( const QgsProcessingModelResult &result );
%Docstring
Sets the ``result`` of the last run of the model through the designer
window.
%End

    QgsMessageBar *messageBar() const;
%Docstring
Returns the message bar associated with the scene.

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

    void setMessageBar( QgsMessageBar *bar );
%Docstring
Sets the message ``bar`` associated with the scene.

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

    void showWarning( const QString &shortMessage, const QString &title, const QString &longMessage, Qgis::MessageLevel level = Qgis::MessageLevel::Warning ) const;
%Docstring
Shows a warning message, allowing users to click a button to see the
full details (``longMessage``).
%End

  signals:

    void rebuildRequired();
%Docstring
Emitted when a change in the model requires a full rebuild of the scene.
%End

    void componentAboutToChange( const QString &text, int id = 0 );
%Docstring
Emitted whenever a component of the model is about to be changed.

The ``text`` argument gives the translated text describing the change
about to occur, and the optional ``id`` can be used to group the
associated undo commands.
%End

    void componentChanged();
%Docstring
Emitted whenever a component of the model is changed.
%End

    void selectedItemChanged( QgsModelComponentGraphicItem *selected );
%Docstring
Emitted whenever the selected item changes. If ``None``, no item is
selected.
%End

    void runSelected();
%Docstring
Emitted when the user opts to run selected steps from the model.

.. versionadded:: 3.38
%End

    void runFromChild( const QString &childId );
%Docstring
Emitted when the user opts to run the part of the model starting from
the specified child algorithm.

.. versionadded:: 3.38
%End

    void showChildAlgorithmOutputs( const QString &childId );
%Docstring
Emitted when the user opts to view previous results from the child
algorithm with matching ID.

.. versionadded:: 3.38
%End

    void showChildAlgorithmLog( const QString &childId );
%Docstring
Emitted when the user opts to view the previous log from the child
algorithm with matching ID.

.. versionadded:: 3.38
%End

  protected:
    virtual QgsModelComponentGraphicItem *createParameterGraphicItem( QgsProcessingModelAlgorithm *model, QgsProcessingModelParameter *param ) const /Factory/;
%Docstring
Creates a new graphic item for a model parameter.
%End

    virtual QgsModelChildAlgorithmGraphicItem *createChildAlgGraphicItem( QgsProcessingModelAlgorithm *model, QgsProcessingModelChildAlgorithm *child ) const /Factory/;
%Docstring
Creates a new graphic item for a model child algorithm.
%End

    virtual QgsModelComponentGraphicItem *createOutputGraphicItem( QgsProcessingModelAlgorithm *model, QgsProcessingModelOutput *output ) const /Factory/;
%Docstring
Creates a new graphic item for a model output.
%End

    virtual QgsModelComponentGraphicItem *createCommentGraphicItem( QgsProcessingModelAlgorithm *model, QgsProcessingModelComment *comment, QgsModelComponentGraphicItem *parentItem ) const /Factory/;
%Docstring
Creates a new graphic item for a model comment.
%End

    QgsModelComponentGraphicItem *createGroupBoxGraphicItem( QgsProcessingModelAlgorithm *model, QgsProcessingModelGroupBox *box ) const /Factory/;
%Docstring
Creates a new graphic item for a model group box.
%End

};



/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/processing/models/qgsmodelgraphicsscene.h                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/