QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSLAYOUTMANAGER_H
17 #define QGSLAYOUTMANAGER_H
19 #include "qgis_core.h"
23 #include <QAbstractListModel>
24 #include <QSortFilterProxyModel>
87 QList< QgsMasterLayoutInterface * > layouts()
const;
92 QList< QgsPrintLayout * > printLayouts()
const;
105 bool readXml(
const QDomElement &element,
const QDomDocument &doc );
111 QDomElement writeXml( QDomDocument &doc )
const;
158 QList< QgsMasterLayoutInterface * > mLayouts;
181 LayoutRole = Qt::UserRole + 1,
189 int rowCount(
const QModelIndex &parent )
const override;
190 QVariant data(
const QModelIndex &index,
int role )
const override;
191 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
192 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
210 void setAllowEmptyLayout(
bool allowEmpty );
219 void layoutAboutToBeAdded(
const QString &name );
220 void layoutAboutToBeRemoved(
const QString &name );
221 void layoutAdded(
const QString &name );
222 void layoutRemoved(
const QString &name );
226 bool mAllowEmpty =
false;
247 FilterPrintLayouts = 1 << 1,
248 FilterReports = 1 << 2,
250 Q_DECLARE_FLAGS( Filters, Filter )
257 bool lessThan(
const QModelIndex &left,
const QModelIndex &right )
const override;
258 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
265 QgsLayoutManagerProxyModel::Filters filters()
const;
272 void setFilters( QgsLayoutManagerProxyModel::Filters filters );
291 void setFilterString(
const QString &filter );
295 Filters mFilters = Filters( FilterPrintLayouts | FilterReports );
297 QString mFilterString;
302 #endif // QGSLAYOUTMANAGER_H
Manages storage of a set of layouts.
void layoutRenamed(QgsMasterLayoutInterface *layout, const QString &newName)
Emitted when a layout is renamed.
QString filterString() const
Returns the current filter string, if set.
Filter
Available filter flags for filtering the model.
An interface for classes which can visit style entity (e.g.
bool allowEmptyLayout() const
Returns true if the model allows the empty layout ("not set") choice.
@ PrintLayout
Individual print layout (QgsPrintLayout)
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
void layoutAdded(const QString &name)
Emitted when a layout has been added to the manager.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
void layoutAboutToBeAdded(const QString &name)
Emitted when a layout is about to be added to the manager.
void layoutAboutToBeRemoved(const QString &name)
Emitted when a layout is about to be removed from the manager.
List model representing the print layouts and reports available in a layout manager.
QSortFilterProxyModel subclass for QgsLayoutManagerModel.
Interface for master layout type objects, such as print layouts and reports.
void layoutRemoved(const QString &name)
Emitted when a layout was removed from the manager.