QGIS API Documentation  3.17.0-Master (57c5a6fc26)
Public Slots | Signals | Public Member Functions | List of all members
QgsLayoutComboBox Class Reference

The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager. More...

#include <qgslayoutcombobox.h>

Inheritance diagram for QgsLayoutComboBox:
Inheritance graph
[legend]

Public Slots

void setCurrentLayout (QgsMasterLayoutInterface *layout)
 Sets the currently selected layout in the combo box. More...
 

Signals

void layoutChanged (QgsMasterLayoutInterface *layout)
 Emitted whenever the currently selected layout changes. More...
 

Public Member Functions

 QgsLayoutComboBox (QWidget *parent=nullptr, QgsLayoutManager *manager=nullptr)
 QgsLayoutComboBox creates a combo box to display a list of items in a layout manager. More...
 
bool allowEmptyLayout () const
 Returns true if the combobox includes the empty layout ("not set") choice. More...
 
QgsMasterLayoutInterfacecurrentLayout () const
 Returns the layout currently selected in the combo box. More...
 
QgsLayoutManagerProxyModel::Filters filters () const
 Returns the current filters used for filtering available layouts. More...
 
QgsMasterLayoutInterfacelayout (int index) const
 Returns the layout at the specified index. More...
 
void setAllowEmptyLayout (bool allowEmpty)
 Sets whether an optional empty layout ("not set") option is present in the combobox. More...
 
void setFilters (QgsLayoutManagerProxyModel::Filters filters)
 Sets the current filters used for filtering available layouts. More...
 
void setLayoutManager (QgsLayoutManager *manager)
 Sets the layout manager containing the layouts to list in the combo box. More...
 

Detailed Description

The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager.

Since
QGIS 3.8

Definition at line 30 of file qgslayoutcombobox.h.

Constructor & Destructor Documentation

◆ QgsLayoutComboBox()

QgsLayoutComboBox::QgsLayoutComboBox ( QWidget *  parent = nullptr,
QgsLayoutManager manager = nullptr 
)
explicit

QgsLayoutComboBox creates a combo box to display a list of items in a layout manager.

The layouts can optionally be filtered by type.

Definition at line 20 of file qgslayoutcombobox.cpp.

Member Function Documentation

◆ allowEmptyLayout()

bool QgsLayoutComboBox::allowEmptyLayout ( ) const

Returns true if the combobox includes the empty layout ("not set") choice.

See also
setAllowEmptyLayout()

Definition at line 60 of file qgslayoutcombobox.cpp.

◆ currentLayout()

QgsMasterLayoutInterface * QgsLayoutComboBox::currentLayout ( ) const

Returns the layout currently selected in the combo box.

Definition at line 83 of file qgslayoutcombobox.cpp.

◆ filters()

QgsLayoutManagerProxyModel::Filters QgsLayoutComboBox::filters ( ) const

Returns the current filters used for filtering available layouts.

See also
setFilters()

Definition at line 45 of file qgslayoutcombobox.cpp.

◆ layout()

QgsMasterLayoutInterface * QgsLayoutComboBox::layout ( int  index) const

Returns the layout at the specified index.

Definition at line 107 of file qgslayoutcombobox.cpp.

◆ layoutChanged

void QgsLayoutComboBox::layoutChanged ( QgsMasterLayoutInterface layout)
signal

Emitted whenever the currently selected layout changes.

◆ setAllowEmptyLayout()

void QgsLayoutComboBox::setAllowEmptyLayout ( bool  allowEmpty)

Sets whether an optional empty layout ("not set") option is present in the combobox.

See also
allowEmptyLayout()

Definition at line 55 of file qgslayoutcombobox.cpp.

◆ setCurrentLayout

void QgsLayoutComboBox::setCurrentLayout ( QgsMasterLayoutInterface layout)
slot

Sets the currently selected layout in the combo box.

Definition at line 65 of file qgslayoutcombobox.cpp.

◆ setFilters()

void QgsLayoutComboBox::setFilters ( QgsLayoutManagerProxyModel::Filters  filters)

Sets the current filters used for filtering available layouts.

See also
filters()

Definition at line 50 of file qgslayoutcombobox.cpp.

◆ setLayoutManager()

void QgsLayoutComboBox::setLayoutManager ( QgsLayoutManager manager)

Sets the layout manager containing the layouts to list in the combo box.

Definition at line 28 of file qgslayoutcombobox.cpp.


The documentation for this class was generated from the following files: