QGIS/python/core/auto_generated/layout/qgslayoutmanagermodel.sip.in

129 lines
3.4 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutmanagermodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsLayoutManagerModel : QgsProjectStoredObjectManagerModelBase
{
%Docstring(signature="appended")
List model representing the print layouts and reports available in a
layout manager.
.. versionadded:: 3.8
%End
%TypeHeaderCode
#include "qgslayoutmanagermodel.h"
%End
public:
enum class CustomRole
{
Layout,
};
explicit QgsLayoutManagerModel( QgsLayoutManager *manager, QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsLayoutManagerModel, showing the layouts from the
specified ``manager``.
%End
QgsMasterLayoutInterface *layoutFromIndex( const QModelIndex &index ) const;
%Docstring
Returns the layout at the corresponding ``index``.
.. seealso:: :py:func:`indexFromLayout`
%End
QModelIndex indexFromLayout( QgsMasterLayoutInterface *layout ) const;
%Docstring
Returns the model index corresponding to a ``layout``.
.. seealso:: :py:func:`layoutFromIndex`
%End
void setAllowEmptyLayout( bool allowEmpty );
%Docstring
Sets whether an optional empty layout ("not set") option is present in
the model.
.. seealso:: :py:func:`allowEmptyLayout`
%End
bool allowEmptyLayout() const;
%Docstring
Returns ``True`` if the model allows the empty layout ("not set")
choice.
.. seealso:: :py:func:`setAllowEmptyLayout`
%End
};
class QgsLayoutManagerProxyModel : QgsProjectStoredObjectManagerProxyModelBase
{
%Docstring(signature="appended")
QSortFilterProxyModel subclass for :py:class:`QgsLayoutManagerModel`.
.. versionadded:: 3.8
%End
%TypeHeaderCode
#include "qgslayoutmanagermodel.h"
%End
public:
enum Filter
{
FilterPrintLayouts,
FilterReports,
};
typedef QFlags<QgsLayoutManagerProxyModel::Filter> Filters;
explicit QgsLayoutManagerProxyModel( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsLayoutManagerProxyModel.
%End
QgsLayoutManagerProxyModel::Filters filters() const;
%Docstring
Returns the current filters used for filtering available layouts.
.. seealso:: :py:func:`setFilters`
%End
void setFilters( QgsLayoutManagerProxyModel::Filters filters );
%Docstring
Sets the current ``filters`` used for filtering available layouts.
.. seealso:: :py:func:`filters`
%End
protected:
virtual bool filterAcceptsRowInternal( int sourceRow, const QModelIndex &sourceParent ) const;
};
QFlags<QgsLayoutManagerProxyModel::Filter> operator|(QgsLayoutManagerProxyModel::Filter f1, QFlags<QgsLayoutManagerProxyModel::Filter> f2);
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutmanagermodel.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/