@@ -133,26 +133,68 @@ filterByLayerType() is ``True``.
133
133
.. seealso:: :py:func:`setFilterByLayerType`
134
134
%End
135
135
136
- void setDataItemProviderKeyFilter ( const QStringList &filter );
136
+ void setHiddenDataItemProviderKeyFilter ( const QStringList &hiddenItemsFilter );
137
137
%Docstring
138
- Sets the customization filters for data items based on item's data provider key
138
+ Sets a filter to hide data items based on on item's data item provider key.
139
139
140
- By default browser model shows all items from all available data items provider and few special
141
- items (e.g. Favourites). To customize the behavior, set the filter to not load certain data items.
140
+ By default browser model shows all items from all available data item providers and few special
141
+ items (e.g. Favourites).
142
+ To customize the behavior, set the filter to not load certain data items.
142
143
The items that are not based on data item providers have prefix "special:", for example
143
- "special:Favourites ", "special:Home", "PostGIS", "MSSQL"
144
+ "special:Favorites ", "special:Home", "PostGIS", "MSSQL"
144
145
145
146
All items created by the providers listed in filter are hidden from the layer tree.
146
147
This filter is always evaluated.
147
148
149
+ :param hiddenItemsFilter: a list of data provider prefixes that will be hidden.
150
+
148
151
.. versionadded:: 3.12
152
+ %End
153
+
154
+ void setShownDataItemProviderKeyFilter( const QStringList &shownItemsFilter );
155
+ %Docstring
156
+ Sets a filter to show data items based on on item's data item provider key.
157
+
158
+ By default browser model shows all items from all available data item providers and few special
159
+ items (e.g. Favourites).
160
+ To customize the behavior, set the filter to load only certain data items.
161
+ The items that are not based on data item providers have prefix "special:", for example
162
+ "special:Favorites", "special:Home", "PostGIS", "MSSQL"
163
+
164
+ Only the items created by the providers listed in filter are shown in the layer tree.
165
+ This filter is always evaluated.
166
+
167
+ :param shownItemsFilter: a list of data provider prefixes that will be hidden.
168
+
169
+ .. versionadded:: 3.14
170
+ %End
171
+
172
+ bool showLayers() const;
173
+ %Docstring
174
+ Returns ``True`` if layers must be shown, this flag is ``True`` by default.
175
+
176
+ .. seealso:: :py:func:`setShowLayers`
177
+
178
+ .. versionadded:: 3.14
179
+ %End
180
+
181
+ void setShowLayers( bool showLayers );
182
+ %Docstring
183
+ Sets show layers to ``showLayers``
184
+
185
+ .. seealso:: :py:func:`showLayers`
186
+
187
+ .. versionadded:: 3.14
149
188
%End
150
189
151
190
protected:
152
191
153
192
virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
154
193
155
194
195
+ public:
196
+ virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
197
+
156
198
};
157
199
158
200
/************************************************************************
0 commit comments