File: qgsmaplayercombobox.sip.in

package info (click to toggle)
qgis 3.22.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,186,020 kB
  • sloc: cpp: 1,275,562; python: 194,091; xml: 15,597; perl: 3,471; sh: 3,368; sql: 2,485; ansic: 2,219; yacc: 1,056; lex: 574; javascript: 504; lisp: 411; makefile: 227
file content (203 lines) | stat: -rw-r--r-- 5,473 bytes parent folder | download
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgsmaplayercombobox.h                                        *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 ************************************************************************/






class QgsMapLayerComboBox : QComboBox
{
%Docstring(signature="appended")
The :py:class:`QgsMapLayerComboBox` class is a combo box which displays the list of layers

.. versionadded:: 2.3
%End

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

    explicit QgsMapLayerComboBox( QWidget *parent /TransferThis/ = 0 );
%Docstring
QgsMapLayerComboBox creates a combo box to display the list of layers (currently in the registry).
The layers can be filtered and/or ordered.
%End

    void setFilters( QgsMapLayerProxyModel::Filters filters );
%Docstring
setFilters allows filtering according to layer type and/or geometry type.
%End

    QgsMapLayerProxyModel::Filters filters() const;
%Docstring
currently used filter on list layers
%End

    void setExceptedLayerList( const QList<QgsMapLayer *> &layerList );
%Docstring
except a list of layers not to be listed
%End

    QList<QgsMapLayer *> exceptedLayerList() const;
%Docstring
returns the list of excepted layers
%End

    void setExcludedProviders( const QStringList &providers );
%Docstring
Sets a list of data providers which should be excluded from the combobox.

.. seealso:: :py:func:`excludedProviders`

.. versionadded:: 3.0
%End

    QStringList excludedProviders() const;
%Docstring
Returns the list of data providers which are excluded from the combobox.

.. seealso:: :py:func:`setExcludedProviders`

.. versionadded:: 3.0
%End

    void setAllowEmptyLayer( bool allowEmpty, const QString &text = QString(), const QIcon &icon = QIcon() );
%Docstring
Sets whether an optional empty layer ("not set") option is shown in the combo box.

Since QGIS 3.20, the optional ``text`` and ``icon`` arguments allows the text and icon for the empty layer item to be set.

.. seealso:: :py:func:`allowEmptyLayer`

.. versionadded:: 3.0
%End

    bool allowEmptyLayer() const;
%Docstring
Returns ``True`` if the combo box allows the empty layer ("not set") choice.

.. seealso:: :py:func:`setAllowEmptyLayer`

.. versionadded:: 3.0
%End

    void setShowCrs( bool showCrs );
%Docstring
Sets whether the CRS of layers is also included in the combo box text.

.. seealso:: :py:func:`showCrs`

.. versionadded:: 3.0
%End

    bool showCrs() const;
%Docstring
Returns ``True`` if the combo box shows the layer's CRS.

.. seealso:: :py:func:`setShowCrs`

.. versionadded:: 3.0
%End

    void setAdditionalItems( const QStringList &items );
%Docstring
Sets a list of additional (non map layer) items to include at the end of the combobox.
These may represent additional layers such as layers which are not included in the map
layer registry, or paths to layers which have not yet been loaded into QGIS.

.. seealso:: :py:func:`additionalItems`

.. versionadded:: 3.0
%End

    QStringList additionalItems() const;
%Docstring
Returns the list of additional (non map layer) items included at the end of the combo box.

.. seealso:: :py:func:`setAdditionalItems`

.. versionadded:: 3.0
%End

    void setAdditionalLayers( const QList<QgsMapLayer *> &layers );
%Docstring
Sets a list of additional ``layers`` to include in the combobox.

This method allows adding additional layers, which are not part of a project's
layers, into the combobox.

.. seealso:: :py:func:`additionalLayers`

.. versionadded:: 3.22
%End

    QList< QgsMapLayer * > additionalLayers() const;
%Docstring
Returns the list of additional layers added to the combobox.

.. seealso:: :py:func:`setAdditionalLayers`

.. versionadded:: 3.22
%End

    QgsMapLayer *currentLayer() const;
%Docstring
Returns the current layer selected in the combo box.

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

    QgsMapLayer *layer( int layerIndex ) const;
%Docstring
Returns the layer currently shown at the specified index within the combo box.

:param layerIndex: position of layer to return

.. seealso:: :py:func:`currentLayer`

.. versionadded:: 2.10
%End

  public slots:
    void setLayer( QgsMapLayer *layer );
%Docstring
setLayer set the current layer selected in the combo
%End

  signals:
    void layerChanged( QgsMapLayer *layer );
%Docstring
Emitted whenever the currently selected layer changes.
%End

  protected:

    virtual void dragEnterEvent( QDragEnterEvent *event );

    virtual void dragLeaveEvent( QDragLeaveEvent *event );

    virtual void dropEvent( QDropEvent *event );

    virtual void paintEvent( QPaintEvent *e );


  protected slots:
    void indexChanged( int i );
    void rowsChanged();

};

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