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
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/processing/qgsprocessingmaplayercombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsProcessingMapLayerComboBox : QWidget
{
%Docstring(signature="appended")
Processing map layer combo box.
.. warning::
Not part of stable API and may change in future QGIS releases.
.. versionadded:: 3.8
%End
%TypeHeaderCode
#include "qgsprocessingmaplayercombobox.h"
%End
public:
QgsProcessingMapLayerComboBox( const QgsProcessingParameterDefinition *parameter, QgsProcessingGui::WidgetType type = QgsProcessingGui::Standard, QWidget *parent = 0 );
%Docstring
Constructor for QgsProcessingMapLayerComboBox, with the specified
``parameter`` definition.
%End
~QgsProcessingMapLayerComboBox();
void setLayer( QgsMapLayer *layer );
%Docstring
Sets the combo box to the specified ``layer``, if ``layer`` is
compatible with the widget's parameter definition.
%End
QgsMapLayer *currentLayer();
%Docstring
Returns the current layer selected in the combobox, or ``None`` if the
selection cannot be represented as a map layer.
.. warning::
Prefer calling :py:func:`~QgsProcessingMapLayerComboBox.value` instead, as it correctly encapsulates all valid
values which can be represented by the widget.
.. seealso:: :py:func:`currentText`
%End
QString currentText();
%Docstring
Returns the current text of the selected item in the combobox.
.. warning::
Prefer calling :py:func:`~QgsProcessingMapLayerComboBox.value` instead, as it correctly encapsulates all valid
values which can be represented by the widget.
.. seealso:: :py:func:`currentLayer`
%End
void setValue( const QVariant &value, QgsProcessingContext &context );
%Docstring
Sets the ``value`` shown in the widget.
.. seealso:: :py:func:`value`
%End
QVariant value() const;
%Docstring
Returns the current value of the widget.
.. seealso:: :py:func:`setValue`
%End
void setWidgetContext( const QgsProcessingParameterWidgetContext &context );
%Docstring
Sets the ``context`` in which the widget is shown.
.. versionadded:: 3.14
%End
void setEditable( bool editable );
%Docstring
Sets whether the combo box value can be freely edited.
.. seealso:: :py:func:`isEditable`
.. versionadded:: 3.14
%End
bool isEditable() const;
%Docstring
Returns whether the combo box value can be freely edited.
.. seealso:: :py:func:`setEditable`
.. versionadded:: 3.14
%End
signals:
void valueChanged();
%Docstring
Emitted whenever the value is changed in the widget.
%End
protected:
virtual void dragEnterEvent( QDragEnterEvent *event );
virtual void dragLeaveEvent( QDragLeaveEvent *event );
virtual void dropEvent( QDropEvent *event );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/processing/qgsprocessingmaplayercombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|