QGIS API Documentation  2.99.0-Master (d55fa22)
Public Slots | Signals | Public Member Functions | List of all members
QgsComposerItemComboBox Class Reference

The QgsComposerItemComboBox class is a combo box which displays items of a matching type from a composition. More...

#include <qgscomposeritemcombobox.h>

Inheritance diagram for QgsComposerItemComboBox:
Inheritance graph
[legend]

Public Slots

void setItem (const QgsComposerItem *item)
 Sets the currently selected item in the combo box. More...
 

Signals

void itemChanged (QgsComposerItem *item)
 Emitted whenever the currently selected item changes. More...
 

Public Member Functions

 QgsComposerItemComboBox (QWidget *parent=0, QgsComposition *composition=nullptr)
 QgsComposerItemComboBox creates a combo box to display a list of items in a composition. More...
 
QgsComposerItemcurrentItem () const
 Returns the item currently selected in the combo box. More...
 
QList< QgsComposerItem *> exceptedItemList () const
 Returns the list of specific items excluded from the combo box. More...
 
QgsComposerItemitem (int index) const
 Return the item currently shown at the specified index within the combo box. More...
 
QgsComposerItem::ItemType itemType () const
 Returns the filter for the item types to show in the combo box. More...
 
void setComposition (QgsComposition *composition)
 Sets the composition containing the items to list in the combo box. More...
 
void setExceptedItemList (const QList< QgsComposerItem * > &exceptList)
 Sets a list of specific items to exclude from the combo box. More...
 
void setItemType (QgsComposerItem::ItemType itemType)
 Sets a filter for the item type to show in the combo box. More...
 

Detailed Description

The QgsComposerItemComboBox class is a combo box which displays items of a matching type from a composition.

Since
QGIS 2.16

Definition at line 33 of file qgscomposeritemcombobox.h.

Constructor & Destructor Documentation

◆ QgsComposerItemComboBox()

QgsComposerItemComboBox::QgsComposerItemComboBox ( QWidget *  parent = 0,
QgsComposition composition = nullptr 
)
explicit

QgsComposerItemComboBox creates a combo box to display a list of items in a composition.

The items can optionally be filtered by type.

Parameters
parentparent widget
compositioncomposition to show items from. If not set, no items will be shown until setComposition() is called

Definition at line 19 of file qgscomposeritemcombobox.cpp.

Member Function Documentation

◆ currentItem()

QgsComposerItem * QgsComposerItemComboBox::currentItem ( ) const

Returns the item currently selected in the combo box.

Definition at line 62 of file qgscomposeritemcombobox.cpp.

◆ exceptedItemList()

QList< QgsComposerItem * > QgsComposerItemComboBox::exceptedItemList ( ) const

Returns the list of specific items excluded from the combo box.

See also
setExceptedItemList()

Definition at line 101 of file qgscomposeritemcombobox.cpp.

◆ item()

QgsComposerItem * QgsComposerItemComboBox::item ( int  index) const

Return the item currently shown at the specified index within the combo box.

Parameters
indexposition of item to return
See also
currentItem()

Definition at line 105 of file qgscomposeritemcombobox.cpp.

◆ itemChanged

void QgsComposerItemComboBox::itemChanged ( QgsComposerItem item)
signal

Emitted whenever the currently selected item changes.

◆ itemType()

QgsComposerItem::ItemType QgsComposerItemComboBox::itemType ( ) const

Returns the filter for the item types to show in the combo box.

See also
setItemType()

Definition at line 91 of file qgscomposeritemcombobox.cpp.

◆ setComposition()

void QgsComposerItemComboBox::setComposition ( QgsComposition composition)

Sets the composition containing the items to list in the combo box.

Definition at line 31 of file qgscomposeritemcombobox.cpp.

◆ setExceptedItemList()

void QgsComposerItemComboBox::setExceptedItemList ( const QList< QgsComposerItem * > &  exceptList)

Sets a list of specific items to exclude from the combo box.

Parameters
exceptListlist of items to exclude
See also
exceptedItemList()

Definition at line 96 of file qgscomposeritemcombobox.cpp.

◆ setItem

void QgsComposerItemComboBox::setItem ( const QgsComposerItem item)
slot

Sets the currently selected item in the combo box.

Parameters
itemselected item

Definition at line 42 of file qgscomposeritemcombobox.cpp.

◆ setItemType()

void QgsComposerItemComboBox::setItemType ( QgsComposerItem::ItemType  itemType)

Sets a filter for the item type to show in the combo box.

Parameters
itemTypetype of items to show. Set to QgsComposerItem::ComposerItem to show all items.
See also
itemType()

Definition at line 86 of file qgscomposeritemcombobox.cpp.


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