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
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/browser/qgsbrowserproxymodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsBrowserProxyModel : QSortFilterProxyModel
{
%Docstring(signature="appended")
A QSortFilterProxyModel subclass for filtering and sorting browser model items.
.. versionadded:: 3.4
%End
%TypeHeaderCode
#include "qgsbrowserproxymodel.h"
%End
public:
enum FilterSyntax
{
Normal,
Wildcards,
RegularExpression,
};
explicit QgsBrowserProxyModel( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsBrowserProxyModel, with the specified ``parent`` object.
%End
void setBrowserModel( QgsBrowserModel *model );
%Docstring
Sets the underlying browser ``model``.
.. seealso:: :py:func:`browserModel`
%End
QgsBrowserModel *browserModel();
%Docstring
Returns the underlying browser model.
.. seealso:: :py:func:`setBrowserModel`
%End
QgsDataItem *dataItem( const QModelIndex &index ) const;
%Docstring
Returns the data item at the specified proxy ``index``, or ``None`` if no item
exists at the index.
%End
void setFilterSyntax( FilterSyntax syntax );
%Docstring
Sets the filter ``syntax``.
.. seealso:: :py:func:`filterSyntax`
%End
FilterSyntax filterSyntax() const;
%Docstring
Returns the filter syntax.
.. seealso:: :py:func:`setFilterSyntax`
%End
void setFilterString( const QString &filter );
%Docstring
Sets the ``filter`` string to use when filtering items in the model.
.. seealso:: :py:func:`filterString`
%End
QString filterString() const;
%Docstring
Returns the filter string used when filtering items in the model.
.. seealso:: :py:func:`setFilterString`
%End
void setFilterCaseSensitivity( Qt::CaseSensitivity sensitivity );
%Docstring
Sets whether item filtering should be case sensitive.
.. seealso:: :py:func:`caseSensitivity`
%End
Qt::CaseSensitivity caseSensitivity() const;
%Docstring
Returns whether item filtering is case sensitive.
.. seealso:: :py:func:`setFilterCaseSensitivity`
%End
bool filterByLayerType() const;
%Docstring
Returns ``True`` if the model is filtered by map layer type.
.. seealso:: :py:func:`layerType`
.. seealso:: :py:func:`setFilterByLayerType`
%End
void setFilterByLayerType( bool enabled );
%Docstring
Sets whether the model is filtered by map layer type.
.. seealso:: :py:func:`filterByLayerType`
.. seealso:: :py:func:`setLayerType`
%End
Qgis::LayerType layerType() const;
%Docstring
Returns the layer type to filter the model by. This is only used if
:py:func:`~QgsBrowserProxyModel.filterByLayerType` is ``True``.
.. seealso:: :py:func:`setLayerType`
.. seealso:: :py:func:`filterByLayerType`
%End
void setLayerType( Qgis::LayerType type );
%Docstring
Sets the layer ``type`` to filter the model by. This is only used if
:py:func:`~QgsBrowserProxyModel.filterByLayerType` is ``True``.
.. seealso:: :py:func:`layerType`
.. seealso:: :py:func:`setFilterByLayerType`
%End
void setHiddenDataItemProviderKeyFilter( const QStringList &hiddenItemsFilter );
%Docstring
Sets a filter to hide data items based on :py:func:`QgsDataItem.providerKey()` associated with the item.
By default browser model shows all items from all available data item providers and few special
items (e.g. Favorites).
To customize the behavior, set the filter to not load certain data items.
The items that are not based on data item providers have prefix "special:", for example
"special:Favorites", "special:Home", "PostGIS", "MSSQL"
All items created by the providers listed in filter are hidden from the layer tree.
This filter is always evaluated.
:param hiddenItemsFilter: a list of data provider prefixes that will be hidden.
.. versionadded:: 3.12
%End
void setShownDataItemProviderKeyFilter( const QStringList &shownItemsFilter );
%Docstring
Sets a filter to show data items based on :py:func:`QgsDataItem.providerKey()` associated with the item.
By default browser model shows all items from all available data item providers and few special
items (e.g. Favorites).
To customize the behavior, set the filter to load only certain data items.
The items that are not based on data item providers have prefix "special:", for example
"special:Favorites", "special:Home", "PostGIS", "MSSQL"
Only the items created by the providers listed in filter are shown in the layer tree.
This filter is always evaluated.
:param shownItemsFilter: a list of data provider prefixes that will be hidden.
.. versionadded:: 3.14
%End
bool showLayers() const;
%Docstring
Returns ``True`` if layers must be shown, this flag is ``True`` by default.
.. seealso:: :py:func:`setShowLayers`
.. versionadded:: 3.14
%End
void setShowLayers( bool showLayers );
%Docstring
Sets show layers to ``showLayers``
.. seealso:: :py:func:`showLayers`
.. versionadded:: 3.14
%End
protected:
virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
public:
virtual bool hasChildren( const QModelIndex &parent = QModelIndex() ) const;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/browser/qgsbrowserproxymodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
|