File: qgsprovidersublayermodel.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; 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: 154
file content (298 lines) | stat: -rw-r--r-- 7,285 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/providers/qgsprovidersublayermodel.h                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/








class QgsProviderSublayerModel: QAbstractItemModel
{
%Docstring(signature="appended")
A model for representing the sublayers present in a URI.

:py:class:`QgsProviderSublayerModel` is designed to present a tree view
of the sublayers available for a URI, including any vector, raster or
mesh sublayers present.

Additionally, :py:class:`QgsProviderSublayerModel` can include some
non-sublayer items, e.g. in order to represent other content available
for a URI, such as embedded project items. The non-sublayer items can be
added by calling :py:func:`~addNonLayerItem`.

.. versionadded:: 3.22
%End

%TypeHeaderCode
#include "qgsprovidersublayermodel.h"
%End
  public:

    enum class Role /BaseType=IntEnum/
    {
      ProviderKey,
      LayerType,
      Uri,
      Name,
      Description,
      Path,
      FeatureCount,
      WkbType,
      GeometryColumnName,
      LayerNumber,
      IsNonLayerItem,
      NonLayerItemType,
      Flags,
    };

    enum class Column /BaseType=IntEnum/
    {
      Name,
      Description,
    };

    class NonLayerItem
{
%Docstring(signature="appended")
Contains details for a non-sublayer item to include in a
QgsProviderSublayerModel.

.. versionadded:: 3.22
%End

%TypeHeaderCode
#include "qgsprovidersublayermodel.h"
%End
      public:

        QString type() const;
%Docstring
Returns the item's type.

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

        void setType( const QString &type );
%Docstring
Sets the item's ``type``.

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

        QString name() const;
%Docstring
Returns the item's name.

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

        void setName( const QString &name );
%Docstring
Sets the item's ``name``.

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

        QString description() const;
%Docstring
Returns the item's description.

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

        void setDescription( const QString &description );
%Docstring
Sets the item's ``description``.

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

        QString uri() const;
%Docstring
Returns the item's URI.

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

        void setUri( const QString &uri );
%Docstring
Set the item's ``uri``.

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

        QIcon icon() const;
%Docstring
Returns the item's icon.

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

        void setIcon( const QIcon &icon );
%Docstring
Sets the item's ``icon``.

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

        bool operator==( const QgsProviderSublayerModel::NonLayerItem &other ) const;
        bool operator!=( const QgsProviderSublayerModel::NonLayerItem &other ) const;

        SIP_PYOBJECT __repr__();
%MethodCode
        QString str = QStringLiteral( "<QgsProviderSublayerModel.NonLayerItem: %1 - %2>" ).arg( sipCpp->type(), sipCpp->name() );
        sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End

    };

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

    void setSublayerDetails( const QList< QgsProviderSublayerDetails > &details );
%Docstring
Sets the sublayer ``details`` to show in the model.

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

    QList< QgsProviderSublayerDetails > sublayerDetails() const;
%Docstring
Returns the sublayer details shown in the model.

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

    QgsProviderSublayerDetails indexToSublayer( const QModelIndex &index ) const;
%Docstring
Returns the sublayer corresponding to the given ``index``.
%End

    QgsProviderSublayerModel::NonLayerItem indexToNonLayerItem( const QModelIndex &index ) const;
%Docstring
Returns the non layer item corresponding to the given ``index``.
%End

    void addNonLayerItem( const QgsProviderSublayerModel::NonLayerItem &item );
%Docstring
Adds a non-layer item (e.g. an embedded QGIS project item) to the model.
%End

    virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;

    virtual QModelIndex parent( const QModelIndex &index ) const;

    virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;

    virtual int rowCount( const QModelIndex &parent ) const;

    virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

    virtual QVariant data( const QModelIndex &index, int role ) const;

    virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;




  protected:



};



class QgsProviderSublayerProxyModel: QSortFilterProxyModel
{
%Docstring(signature="appended")
A QSortFilterProxyModel for filtering and sorting a
:py:class:`QgsProviderSublayerModel`.

.. versionadded:: 3.22
%End

%TypeHeaderCode
#include "qgsprovidersublayermodel.h"
%End
  public:

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

    QString filterString() const;
%Docstring
Returns the filter string used for filtering items in the model.

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

    void setFilterString( const QString &filter );
%Docstring
Sets the ``filter`` string used for filtering items in the model.

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

    bool includeSystemTables() const;
%Docstring
Returns ``True`` if system and internal tables will be shown in the
model.

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

    void setIncludeSystemTables( bool include );
%Docstring
Sets whether system and internal tables will be shown in the model.

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

    bool includeEmptyLayers() const;
%Docstring
Returns ``True`` if empty tables will be shown in the model.

.. seealso:: :py:func:`setIncludeEmptyLayers`

.. versionadded:: 3.28
%End

    void setIncludeEmptyLayers( bool include );
%Docstring
Sets whether empty tables will be shown in the model.

.. seealso:: :py:func:`includeEmptyLayers`

.. versionadded:: 3.28
%End

  protected:
    virtual bool filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const;

    virtual bool lessThan( const QModelIndex &source_left, const QModelIndex &source_right ) const;


};


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