QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
List model representing the print layouts and reports available in a layout manager. More...
#include <qgslayoutmanager.h>
Public Types | |
enum | Role { LayoutRole = 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. More... | |
bool | allowEmptyLayout () const |
Returns true if the model allows the empty layout ("not set") choice. More... | |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QModelIndex | indexFromLayout (QgsMasterLayoutInterface *layout) const |
Returns the model index corresponding to a layout. More... | |
QgsMasterLayoutInterface * | layoutFromIndex (const QModelIndex &index) const |
Returns the layout at the corresponding index. More... | |
int | rowCount (const QModelIndex &parent) const override |
void | setAllowEmptyLayout (bool allowEmpty) |
Sets whether an optional empty layout ("not set") option is present in the model. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
List model representing the print layouts and reports available in a layout manager.
Definition at line 172 of file qgslayoutmanager.h.
Custom model roles.
Enumerator | |
---|---|
LayoutRole | Layout object. |
Definition at line 179 of file qgslayoutmanager.h.
|
explicit |
Constructor for QgsLayoutManagerModel, showing the layouts from the specified manager.
Definition at line 337 of file qgslayoutmanager.cpp.
|
inline |
Returns true
if the model allows the empty layout ("not set") choice.
Definition at line 216 of file qgslayoutmanager.h.
|
override |
Definition at line 354 of file qgslayoutmanager.cpp.
|
override |
Definition at line 435 of file qgslayoutmanager.cpp.
QModelIndex QgsLayoutManagerModel::indexFromLayout | ( | QgsMasterLayoutInterface * | layout | ) | const |
Returns the model index corresponding to a layout.
Definition at line 464 of file qgslayoutmanager.cpp.
QgsMasterLayoutInterface * QgsLayoutManagerModel::layoutFromIndex | ( | const QModelIndex & | index | ) | const |
Returns the layout at the corresponding index.
Definition at line 451 of file qgslayoutmanager.cpp.
|
override |
Definition at line 348 of file qgslayoutmanager.cpp.
void QgsLayoutManagerModel::setAllowEmptyLayout | ( | bool | allowEmpty | ) |
Sets whether an optional empty layout ("not set") option is present in the model.
Definition at line 484 of file qgslayoutmanager.cpp.
|
override |
Definition at line 391 of file qgslayoutmanager.cpp.