File: qgsabstractdatasourcewidget.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 (264 lines) | stat: -rw-r--r-- 7,841 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
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
252
253
254
255
256
257
258
259
260
261
262
263
264
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsabstractdatasourcewidget.h                                *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsAbstractDataSourceWidget : QDialog
{
%Docstring(signature="appended")
Abstract base Data Source Widget to create connections and add layers
This class provides common functionality and the interface for all
source select dialogs used by data providers to configure data sources
and add layers.

The implementation is generic enough to handle other layer search and
selection widgets.
%End

%TypeHeaderCode
#include "qgsabstractdatasourcewidget.h"
%End
  public:
    virtual void setBrowserModel( QgsBrowserModel *model );
%Docstring
Sets a browser ``model`` to use with the widget.

.. seealso:: :py:func:`browserModel`

.. versionadded:: 3.18
%End

    virtual QgsMapCanvas *mapCanvas();
%Docstring
Returns the dialog map canvas

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

    virtual void setMapCanvas( QgsMapCanvas *mapCanvas );
%Docstring
Sets the dialog map canvas

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

  public slots:

    virtual void refresh();
%Docstring
Triggered when the provider's connections need to be refreshed The
default implementation does nothing
%End

    virtual void addButtonClicked();
%Docstring
Triggered when the add button is clicked, the add layer signal is
emitted Concrete classes should implement the right behavior depending
on the layer being added.
%End

    virtual void reset();
%Docstring
Called when this source select widget is being shown in a "new and
clean" dialog.

The data source manager recycles existing source select widgets but will
call this method on every reopening. This should clear any selection
that has previously been done.

.. versionadded:: 3.10
%End

    virtual bool configureFromUri( const QString &uri );
%Docstring
Configure the widget from a layer ``uri`` by selecting the layer path or
connection options. The base implementation does nothing and returns
``False``: providers with ConfigureSourceSelectFromUri capability must
override to implement this functionality.

:return: ``True`` on success.

.. note::

   Not all data providers may be able to configure the widget from the provided uri, in that case this method returns ``False``.

.. versionadded:: 3.38
%End

  signals:

    void connectionsChanged();
%Docstring
Emitted when the provider's connections have changed This signal is
normally forwarded the app and used to refresh browser items
%End

    void addDatabaseLayers( const QStringList &paths, const QString &providerKey );
%Docstring
Emitted when a DB layer has been selected for addition
%End

 void addRasterLayer( const QString &rasterLayerPath, const QString &baseName, const QString &providerKey ) /Deprecated/;
%Docstring
Emitted when a raster layer has been selected for addition

.. deprecated:: 3.40

   Use :py:func:`~QgsAbstractDataSourceWidget.addLayer` instead.
%End

    void addRasterLayers( const QStringList &layersList );
%Docstring
Emitted when one or more GDAL supported layers are selected for addition

:param layersList: list of layers protocol URIs

.. versionadded:: 3.20
%End

 void addVectorLayer( const QString &uri, const QString &layerName, const QString &providerKey = QString() ) /Deprecated/;
%Docstring
Emitted when a vector layer has been selected for addition.

If ``providerKey`` is not specified, the default provider key associated
with the source will be used.

.. deprecated:: 3.40

   Use :py:func:`~QgsAbstractDataSourceWidget.addLayer` instead.
%End

 void addMeshLayer( const QString &url, const QString &baseName, const QString &providerKey ) /Deprecated/;
%Docstring
Emitted when a mesh layer has been selected for addition.

.. deprecated:: 3.40

   Use :py:func:`~QgsAbstractDataSourceWidget.addLayer` instead.
%End

 void addVectorTileLayer( const QString &url, const QString &baseName ) /Deprecated/;
%Docstring
Emitted when a vector tile layer has been selected for addition.

.. deprecated:: 3.40

   Use :py:func:`~QgsAbstractDataSourceWidget.addLayer` instead.
%End

 void addPointCloudLayer( const QString &url, const QString &baseName, const QString &providerKey ) /Deprecated/;
%Docstring
Emitted when a point cloud layer has been selected for addition.

.. deprecated:: 3.40

   Use :py:func:`~QgsAbstractDataSourceWidget.addLayer` instead.
%End

    void addLayer( Qgis::LayerType type, const QString &url, const QString &baseName, const QString &providerKey );
%Docstring
Emitted when a layer has been selected for addition.

This is a generic method, intended for replacing the specific layer type
signals implemented above.

.. warning::

   For QGIS versions < 4.x, the specific layer type added signals must be emitted for vector, raster,
   mesh, vector tile and point cloud layers in addition to this signal.

.. versionadded:: 3.34
%End

    void addVectorLayers( const QStringList &layerList, const QString &encoding, const QString &dataSourceType );
%Docstring
Emitted when one or more OGR supported layers are selected for addition

:param layerList: list of layers protocol URIs
:param encoding: encoding
:param dataSourceType: string (can be "file" or "database")
%End

    void replaceVectorLayer( const QString &oldId, const QString &source, const QString &name, const QString &provider );
%Docstring
Emitted when a layer needs to be replaced

:param oldId: old layer ID
:param source: URI of the layer
:param name: of the layer
:param provider: key
%End

 void progress( int, int ) /Deprecated/;
%Docstring
Emitted when a progress dialog is shown by the provider dialog.

.. deprecated:: 3.4

   This signal is no longer used. Use :py:class:`QgsProxyProgressTask` instead to show progress reports.
%End

    void progressMessage( QString message );
%Docstring
Emitted when a progress dialog is shown by the provider dialog
%End

    void enableButtons( bool enable );
%Docstring
Emitted when the ok/add buttons should be enabled/disabled
%End

    void pushMessage( const QString &title, const QString &message, const Qgis::MessageLevel level = Qgis::MessageLevel::Info );
%Docstring
Emitted when a ``message`` with ``title`` and ``level`` must be shown to
the user using the parent visible message bar

.. versionadded:: 3.14
%End

  protected:
    QgsAbstractDataSourceWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Standalone );
%Docstring
Constructor
%End

    QgsProviderRegistry::WidgetMode widgetMode() const;
%Docstring
Returns the widget mode
%End

    QgsBrowserModel *browserModel();
%Docstring
Returns the associated browser model (may be ``None``).

.. versionadded:: 3.18
%End

    void setupButtons( QDialogButtonBox *buttonBox );
%Docstring
Connect the ok and apply/add buttons to the slots
%End

    QPushButton *addButton() const;
%Docstring
Returns the add Button
%End

};

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