2017-10-21 16:50:16 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/layout/qgslayoutitemcombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsLayoutItemComboBox : QComboBox
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
The QgsLayoutItemComboBox class is a combo box which displays items of
|
2017-12-15 10:36:55 -04:00
|
|
|
a matching type from a layout.
|
|
|
|
|
2017-10-21 16:50:16 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslayoutitemcombobox.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit QgsLayoutItemComboBox( QWidget *parent /TransferThis/ = 0, QgsLayout *layout = 0 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setCurrentLayout( QgsLayout *layout );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``layout`` containing the items to list in the combo box.
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setItemType( QgsLayoutItemRegistry::ItemType itemType );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets a filter for the item type to show in the combo box.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param itemType: type of items to show. Set to QgsLayoutItemRegistry.LayoutItem to
|
|
|
|
show all items.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`itemType`
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutItemRegistry::ItemType itemType() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the filter for the item types to show in the combo box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setItemType`
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setExceptedItemList( const QList< QgsLayoutItem * > &exceptList );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets a list of specific items to exclude from the combo box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`exceptedItemList`
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QList< QgsLayoutItem * > exceptedItemList() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the list of specific items excluded from the combo box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setExceptedItemList`
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutItem *item( int index ) const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the item currently shown at the specified ``index`` within the combo box.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`currentItem`
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutItem *currentItem() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the item currently selected in the combo box.
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void setItem( const QgsLayoutItem *item );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the currently selected ``item`` in the combo box.
|
2017-10-21 16:50:16 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void itemChanged( QgsLayoutItem *item );
|
|
|
|
%Docstring
|
|
|
|
Emitted whenever the currently selected item changes
|
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/layout/qgslayoutitemcombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|