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;
 
List model representing the print layouts and reports available in a layout manager.
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.
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.