|
QGIS API Documentation 3.99.0-Master (2fe06baccd8)
|
List model representing the print layouts and reports available in a layout manager. More...
#include <qgslayoutmanagermodel.h>

Public Types | |
| enum class | CustomRole : int { Layout = Qt::UserRole + 1 } |
| Custom model roles. More... | |
| Public Types inherited from QgsProjectStoredObjectManagerModelBase | |
| enum class | CustomRole : int { Object = Qt::UserRole + 1 } |
| Custom model roles. More... | |
Public Member Functions | |
| QgsLayoutManagerModel (QgsLayoutManager *manager, QObject *parent=nullptr) | |
| Constructor for QgsLayoutManagerModel, showing the layouts from the specified manager. | |
| bool | allowEmptyLayout () const |
Returns true if the model allows the empty layout ("not set") choice. | |
| QModelIndex | indexFromLayout (QgsMasterLayoutInterface *layout) const |
| Returns the model index corresponding to a layout. | |
| QgsMasterLayoutInterface * | layoutFromIndex (const QModelIndex &index) const |
| Returns the layout at the corresponding index. | |
| void | setAllowEmptyLayout (bool allowEmpty) |
| Sets whether an optional empty layout ("not set") option is present in the model. | |
| Public Member Functions inherited from QgsProjectStoredObjectManagerModel< QgsMasterLayoutInterface > | |
| QgsProjectStoredObjectManagerModel (QgsAbstractProjectStoredObjectManager< QgsMasterLayoutInterface > *manager, QObject *parent=nullptr) | |
| Constructor for QgsProjectStoredObjectManagerModel, showing the objects from the specified manager. | |
| bool | allowEmptyObject () const |
Returns true if the model allows the empty object ("not set") choice. | |
| QModelIndex | indexFromObject (QgsMasterLayoutInterface *object) const |
| Returns the model index corresponding to an object. | |
| QgsMasterLayoutInterface * | objectFromIndex (const QModelIndex &index) const |
| Returns the object at the corresponding index. | |
| void | setAllowEmptyObject (bool allowEmpty) |
| Sets whether an optional empty object ("not set") option is present in the model. | |
| Public Member Functions inherited from QgsProjectStoredObjectManagerModelBase | |
| QgsProjectStoredObjectManagerModelBase (QObject *parent=nullptr) | |
| Constructor for QgsProjectStoredObjectManagerModelBase, with the specified parent object. | |
| QVariant | data (const QModelIndex &index, int role) const override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| int | rowCount (const QModelIndex &parent) const override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
Additional Inherited Members | |
| Protected Attributes inherited from QgsProjectStoredObjectManagerModel< QgsMasterLayoutInterface > | |
| PRIVATE QgsAbstractProjectStoredObjectManager< QgsMasterLayoutInterface > * | mObjectManager |
| Object manager. | |
List model representing the print layouts and reports available in a layout manager.
Definition at line 47 of file qgslayoutmanagermodel.h.
|
strong |
Custom model roles.
| Enumerator | |
|---|---|
| Layout | Layout object. |
Definition at line 62 of file qgslayoutmanagermodel.h.
|
explicit |
Constructor for QgsLayoutManagerModel, showing the layouts from the specified manager.
Definition at line 29 of file qgslayoutmanagermodel.cpp.
|
inline |
Returns true if the model allows the empty layout ("not set") choice.
Definition at line 96 of file qgslayoutmanagermodel.h.
| QModelIndex QgsLayoutManagerModel::indexFromLayout | ( | QgsMasterLayoutInterface * | layout | ) | const |
Returns the model index corresponding to a layout.
Definition at line 40 of file qgslayoutmanagermodel.cpp.
| QgsMasterLayoutInterface * QgsLayoutManagerModel::layoutFromIndex | ( | const QModelIndex & | index | ) | const |
Returns the layout at the corresponding index.
Definition at line 35 of file qgslayoutmanagermodel.cpp.
| void QgsLayoutManagerModel::setAllowEmptyLayout | ( | bool | allowEmpty | ) |
Sets whether an optional empty layout ("not set") option is present in the model.
Definition at line 45 of file qgslayoutmanagermodel.cpp.