1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
/************************************************************************
* 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(signature="appended")
The :py:class:`QgsLayoutItemComboBox` class is a combo box which displays items of
a matching type from a layout.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutitemcombobox.h"
%End
public:
explicit QgsLayoutItemComboBox( QWidget *parent /TransferThis/ = 0, QgsLayout *layout = 0 );
%Docstring
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 :py:func:`~QgsLayoutItemComboBox.setCurrentLayout` is called
%End
void setCurrentLayout( QgsLayout *layout );
%Docstring
Sets the ``layout`` containing the items to list in the combo box.
.. seealso:: :py:func:`currentLayout`
%End
QgsLayout *currentLayout();
%Docstring
Returns the current layout containing the items shown in the combo box.
.. seealso:: :py:func:`setCurrentLayout`
%End
void setItemType( QgsLayoutItemRegistry::ItemType itemType );
%Docstring
Sets a filter for the item type to show in the combo box.
:param itemType: type of items to show. Set to :py:class:`QgsLayoutItemRegistry`.LayoutItem to
show all items.
.. seealso:: :py:func:`itemType`
%End
QgsLayoutItemRegistry::ItemType itemType() const;
%Docstring
Returns the filter for the item types to show in the combo box.
.. seealso:: :py:func:`setItemType`
%End
void setExceptedItemList( const QList< QgsLayoutItem * > &exceptList );
%Docstring
Sets a list of specific items to exclude from the combo box.
.. seealso:: :py:func:`exceptedItemList`
%End
QList< QgsLayoutItem * > exceptedItemList() const;
%Docstring
Returns the list of specific items excluded from the combo box.
.. seealso:: :py:func:`setExceptedItemList`
%End
void setAllowEmptyItem( bool allowEmpty );
%Docstring
Sets whether an optional empty layout item is present in the combobox.
.. seealso:: :py:func:`allowEmptyItem`
.. versionadded:: 3.8
%End
bool allowEmptyItem() const;
%Docstring
Returns ``True`` if the model includes the empty item choice.
.. seealso:: :py:func:`setAllowEmptyItem`
.. versionadded:: 3.8
%End
void setItemFlags( QgsLayoutItem::Flags flags );
%Docstring
Sets layout item flags to use for filtering the available items.
Set ``flags`` to ``None`` to clear the flag based filtering.
.. seealso:: :py:func:`itemFlags`
.. versionadded:: 3.16
%End
QgsLayoutItem::Flags itemFlags() const;
%Docstring
Returns the layout item flags used for filtering the available items.
Returns ``None`` if no flag based filtering is occurring.
.. seealso:: :py:func:`setItemFlags`
.. versionadded:: 3.16
%End
QgsLayoutItem *item( int index ) const;
%Docstring
Returns the item currently shown at the specified ``index`` within the combo box.
.. seealso:: :py:func:`currentItem`
%End
QgsLayoutItem *currentItem() const;
%Docstring
Returns the item currently selected in the combo box.
%End
public slots:
void setItem( const QgsLayoutItem *item );
%Docstring
Sets the currently selected ``item`` in the combo box.
%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 *
************************************************************************/
|