|
QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
The QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout. More...
#include <qgslayoutitemcombobox.h>

Public Slots | |
| void | setItem (const QgsLayoutItem *item) |
| Sets the currently selected item in the combo box. More... | |
Signals | |
| void | itemChanged (QgsLayoutItem *item) |
| Emitted whenever the currently selected item changes. More... | |
Public Member Functions | |
| QgsLayoutItemComboBox (QWidget *parent=nullptr, QgsLayout *layout=nullptr) | |
| QgsLayoutItemComboBox creates a combo box to display a list of items in a layout. More... | |
| bool | allowEmptyItem () const |
Returns true if the model includes the empty item choice. More... | |
| QgsLayoutItem * | currentItem () const |
| Returns the item currently selected in the combo box. More... | |
| QgsLayout * | currentLayout () |
| Returns the current layout containing the items shown in the combo box. More... | |
| QList< QgsLayoutItem * > | exceptedItemList () const |
| Returns the list of specific items excluded from the combo box. More... | |
| QgsLayoutItem * | item (int index) const |
| Returns the item currently shown at the specified index within the combo box. More... | |
| QgsLayoutItem::Flags | itemFlags () const |
| Returns the layout item flags used for filtering the available items. More... | |
| QgsLayoutItemRegistry::ItemType | itemType () const |
| Returns the filter for the item types to show in the combo box. More... | |
| void | setAllowEmptyItem (bool allowEmpty) |
| Sets whether an optional empty layout item is present in the combobox. More... | |
| void | setCurrentLayout (QgsLayout *layout) |
| Sets the layout containing the items to list in the combo box. More... | |
| void | setExceptedItemList (const QList< QgsLayoutItem * > &exceptList) |
| Sets a list of specific items to exclude from the combo box. More... | |
| void | setItemFlags (QgsLayoutItem::Flags flags) |
| Sets layout item flags to use for filtering the available items. More... | |
| void | setItemType (QgsLayoutItemRegistry::ItemType itemType) |
| Sets a filter for the item type to show in the combo box. More... | |
The QgsLayoutItemComboBox class is a combo box which displays items of a matching type from a layout.
Definition at line 34 of file qgslayoutitemcombobox.h.
|
explicit |
QgsLayoutItemComboBox creates a combo box to display a list of items in a layout.
The items can optionally be filtered by type. If layout is not set, no items will be shown until setCurrentLayout() is called
Definition at line 23 of file qgslayoutitemcombobox.cpp.
| bool QgsLayoutItemComboBox::allowEmptyItem | ( | ) | const |
Returns true if the model includes the empty item choice.
Definition at line 119 of file qgslayoutitemcombobox.cpp.
| QgsLayoutItem * QgsLayoutItemComboBox::currentItem | ( | ) | const |
Returns the item currently selected in the combo box.
Definition at line 70 of file qgslayoutitemcombobox.cpp.
| QgsLayout * QgsLayoutItemComboBox::currentLayout | ( | ) |
Returns the current layout containing the items shown in the combo box.
Definition at line 47 of file qgslayoutitemcombobox.cpp.
| QList< QgsLayoutItem * > QgsLayoutItemComboBox::exceptedItemList | ( | ) | const |
Returns the list of specific items excluded from the combo box.
Definition at line 109 of file qgslayoutitemcombobox.cpp.
| QgsLayoutItem * QgsLayoutItemComboBox::item | ( | int | index | ) | const |
Returns the item currently shown at the specified index within the combo box.
Definition at line 134 of file qgslayoutitemcombobox.cpp.
|
signal |
Emitted whenever the currently selected item changes.
| QgsLayoutItem::Flags QgsLayoutItemComboBox::itemFlags | ( | ) | const |
Returns the layout item flags used for filtering the available items.
Returns nullptr if no flag based filtering is occurring.
Definition at line 129 of file qgslayoutitemcombobox.cpp.
| QgsLayoutItemRegistry::ItemType QgsLayoutItemComboBox::itemType | ( | ) | const |
Returns the filter for the item types to show in the combo box.
Definition at line 99 of file qgslayoutitemcombobox.cpp.
| void QgsLayoutItemComboBox::setAllowEmptyItem | ( | bool | allowEmpty | ) |
Sets whether an optional empty layout item is present in the combobox.
Definition at line 114 of file qgslayoutitemcombobox.cpp.
| void QgsLayoutItemComboBox::setCurrentLayout | ( | QgsLayout * | layout | ) |
Sets the layout containing the items to list in the combo box.
Definition at line 32 of file qgslayoutitemcombobox.cpp.
| void QgsLayoutItemComboBox::setExceptedItemList | ( | const QList< QgsLayoutItem * > & | exceptList | ) |
Sets a list of specific items to exclude from the combo box.
Definition at line 104 of file qgslayoutitemcombobox.cpp.
|
slot |
Sets the currently selected item in the combo box.
Definition at line 52 of file qgslayoutitemcombobox.cpp.
| void QgsLayoutItemComboBox::setItemFlags | ( | QgsLayoutItem::Flags | flags | ) |
Sets layout item flags to use for filtering the available items.
Set flags to nullptr to clear the flag based filtering.
Definition at line 124 of file qgslayoutitemcombobox.cpp.
| void QgsLayoutItemComboBox::setItemType | ( | QgsLayoutItemRegistry::ItemType | itemType | ) |
Sets a filter for the item type to show in the combo box.
| itemType | type of items to show. Set to QgsLayoutItemRegistry::LayoutItem to show all items. |
Definition at line 94 of file qgslayoutitemcombobox.cpp.