Skip to content

Commit 6b3679b

Browse files
authoredMar 12, 2020
Merge pull request #34968 from elpaso/tablewidget
[api] New database table name widget
2 parents 4c49625 + 3719370 commit 6b3679b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1742
-92
lines changed
 

‎python/core/auto_generated/qgsbrowserproxymodel.sip.in

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,68 @@ filterByLayerType() is ``True``.
133133
.. seealso:: :py:func:`setFilterByLayerType`
134134
%End
135135

136-
void setDataItemProviderKeyFilter( const QStringList &filter );
136+
void setHiddenDataItemProviderKeyFilter( const QStringList &hiddenItemsFilter );
137137
%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.
139139

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.
142143
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"
144145

145146
All items created by the providers listed in filter are hidden from the layer tree.
146147
This filter is always evaluated.
147148

149+
:param hiddenItemsFilter: a list of data provider prefixes that will be hidden.
150+
148151
.. 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
149188
%End
150189

151190
protected:
152191

153192
virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
154193

155194

195+
public:
196+
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
197+
156198
};
157199

158200
/************************************************************************

‎python/core/auto_generated/qgsdataitem.sip.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ The optional ``providerKey`` string (added in QGIS 3.12) can be used to specify
6969

7070
bool hasChildren();
7171

72+
virtual bool layerCollection() const;
73+
%Docstring
74+
Returns ``True`` if the data item is a collection of layers
75+
The default implementation returns ``False``, subclasses must implement this method if their children are layers.
76+
77+
.. versionadded:: 3.14
78+
%End
79+
7280
int rowCount();
7381

7482
virtual QVector<QgsDataItem *> createChildren() /Factory/;

0 commit comments

Comments
 (0)
Please sign in to comment.