16#ifndef QGSLAYOUTMANAGER_H
17#define QGSLAYOUTMANAGER_H
23#include <QAbstractListModel>
24#include <QSortFilterProxyModel>
86 QList< QgsMasterLayoutInterface * > layouts()
const;
91 QList< QgsPrintLayout * > printLayouts()
const;
104 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
110 QDomElement writeXml( QDomDocument &doc )
const;
157 QList< QgsMasterLayoutInterface * > mLayouts;
197 int rowCount(
const QModelIndex &parent )
const override;
198 QVariant data(
const QModelIndex &index,
int role )
const override;
199 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
200 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
218 void setAllowEmptyLayout(
bool allowEmpty );
227 void layoutAboutToBeAdded(
const QString &name );
228 void layoutAboutToBeRemoved(
const QString &name );
229 void layoutAdded(
const QString &name );
230 void layoutRemoved(
const QString &name );
234 bool mAllowEmpty =
false;
255 FilterPrintLayouts = 1 << 1,
256 FilterReports = 1 << 2,
265 bool lessThan(
const QModelIndex &left,
const QModelIndex &right )
const override;
266 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
299 void setFilterString(
const QString &filter );
303 Filters mFilters = Filters( FilterPrintLayouts | FilterReports );
305 QString mFilterString;
List model representing the print layouts and reports available in a layout manager.
CustomRole
Custom model roles.
bool allowEmptyLayout() const
Returns true if the model allows the empty layout ("not set") choice.
QSortFilterProxyModel subclass for QgsLayoutManagerModel.
QString filterString() const
Returns the current filter string, if set.
Filter
Available filter flags for filtering the model.
Manages storage of a set of layouts.
void layoutAboutToBeRemoved(const QString &name)
Emitted when a layout is about to be removed from the manager.
void layoutAboutToBeAdded(const QString &name)
Emitted when a layout is about to be added to the manager.
void layoutRenamed(QgsMasterLayoutInterface *layout, const QString &newName)
Emitted when a layout is renamed.
void layoutRemoved(const QString &name)
Emitted when a layout was removed from the manager.
void layoutAdded(const QString &name)
Emitted when a layout has been added to the manager.
Interface for master layout type objects, such as print layouts and reports.
@ PrintLayout
Individual print layout (QgsPrintLayout)
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
An interface for classes which can visit style entity (e.g.
#define SIP_ENUM_BASETYPE(type)
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_MONKEYPATCH_COMPAT_NAME(FORMERNAME)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)