Skip to content

Commit

Permalink
Doxy
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 23, 2020
1 parent 246f1f5 commit 6aa537c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 12 deletions.
6 changes: 6 additions & 0 deletions python/core/auto_generated/layertree/qgslayertreemodel.sip.in
Expand Up @@ -350,7 +350,13 @@ Updates model when node's name has changed
void nodeLayerLoaded();
void nodeLayerWillBeUnloaded();
void layerLegendChanged();

void layerFlagsChanged();
%Docstring
Emitted when layer flags have changed.

.. versionadded:: 3.18
%End

void layerNeedsUpdate();

Expand Down
29 changes: 17 additions & 12 deletions python/gui/auto_generated/layertree/qgslayertreeview.sip.in
Expand Up @@ -14,20 +14,11 @@
class QgsLayerTreeProxyModel : QSortFilterProxyModel
{
%Docstring
*************************************************************************
qgslayertreeview.h
--------------------------------------
Date : May 2014
Copyright : (C) 2014 by Martin Dobias
Email : wonder dot sk at gmail dot com
**************************************************************************

This program is free software; you can redistribute it and/or modify *
it under the terms of the GNU General Public License as published by *
the Free Software Foundation; either version 2 of the License, or *
(at your option) any later version. *
The QgsLayerTreeProxyModel class is a proxy model for QgsLayerTreeModel, supports
hidden layers and text filtering.

**************************************************************************
.. versionadded:: 3.18
%End

%TypeHeaderCode
Expand All @@ -36,12 +27,26 @@ the Free Software Foundation; either version 2 of the License, or *
public:

QgsLayerTreeProxyModel( QgsLayerTreeModel *treeModel, QObject *parent );
%Docstring
Constructs QgsLayerTreeProxyModel with source model ``treeModel`` and a ``parent``
@param treeModel
@param parent
%End

void setFilterText( const QString &filterText = QString() );
%Docstring
Sets filter to ``filterText``.
%End

bool showHidden() const;
%Docstring
Returns if hidden layers are shown.
%End

void setShowHidden( bool showHidden );
%Docstring
Determines if hidden layers are shown.
%End

protected:

Expand Down
5 changes: 5 additions & 0 deletions src/core/layertree/qgslayertreemodel.h
Expand Up @@ -313,6 +313,11 @@ class CORE_EXPORT QgsLayerTreeModel : public QAbstractItemModel
void nodeLayerLoaded();
void nodeLayerWillBeUnloaded();
void layerLegendChanged();

/**
* Emitted when layer flags have changed.
* \since QGIS 3.18
*/
void layerFlagsChanged();

void layerNeedsUpdate();
Expand Down
22 changes: 22 additions & 0 deletions src/gui/layertree/qgslayertreeview.h
Expand Up @@ -35,18 +35,40 @@ class QgsLayerTreeFilterProxyModel;

#include <QSortFilterProxyModel>

/**
* \ingroup gui
*
* The QgsLayerTreeProxyModel class is a proxy model for QgsLayerTreeModel, supports
* hidden layers and text filtering.
*
* \since QGIS 3.18
*/
class GUI_EXPORT QgsLayerTreeProxyModel : public QSortFilterProxyModel
{
Q_OBJECT

public:

/**
* Constructs QgsLayerTreeProxyModel with source model \a treeModel and a \a parent
* @param treeModel
* @param parent
*/
QgsLayerTreeProxyModel( QgsLayerTreeModel *treeModel, QObject *parent );

/**
* Sets filter to \a filterText.
*/
void setFilterText( const QString &filterText = QString() );

/**
* Returns if hidden layers are shown.
*/
bool showHidden() const;

/**
* Determines if hidden layers are shown.
*/
void setShowHidden( bool showHidden );

protected:
Expand Down

0 comments on commit 6aa537c

Please sign in to comment.