2017-04-19 11:31:23 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmaplayercombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-24 22:53:10 +01:00
|
|
|
class QgsMapLayerComboBox : QComboBox
|
|
|
|
{
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
The QgsMapLayerComboBox class is a combo box which displays the list of layers
|
|
|
|
.. versionadded:: 2.3
|
|
|
|
%End
|
2014-03-24 22:53:10 +01:00
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmaplayercombobox.h"
|
|
|
|
%End
|
|
|
|
public:
|
2017-04-19 11:31:23 +02:00
|
|
|
|
2014-03-24 22:53:10 +01:00
|
|
|
explicit QgsMapLayerComboBox( QWidget *parent /TransferThis/ = 0 );
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
QgsMapLayerComboBox creates a combo box to dislpay the list of layers (currently in the registry).
|
|
|
|
The layers can be filtered and/or ordered.
|
|
|
|
%End
|
2014-03-24 22:53:10 +01:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
void setFilters( QgsMapLayerProxyModel::Filters filters );
|
|
|
|
%Docstring
|
|
|
|
setFilters allows fitering according to layer type and/or geometry type.
|
|
|
|
%End
|
2014-03-24 22:53:10 +01:00
|
|
|
|
2014-09-01 16:45:54 +02:00
|
|
|
QgsMapLayerProxyModel::Filters filters() const;
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
currently used filter on list layers
|
|
|
|
:rtype: QgsMapLayerProxyModel.Filters
|
|
|
|
%End
|
2015-03-19 22:57:51 +01:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
void setExceptedLayerList( const QList<QgsMapLayer *> &layerList );
|
|
|
|
%Docstring
|
|
|
|
except a list of layers not to be listed
|
|
|
|
%End
|
2015-03-10 11:18:04 +01:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
QList<QgsMapLayer *> exceptedLayerList() const;
|
|
|
|
%Docstring
|
|
|
|
returns the list of excepted layers
|
|
|
|
:rtype: list of QgsMapLayer
|
|
|
|
%End
|
2014-05-02 09:59:30 +02:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
void setExcludedProviders( const QStringList &providers );
|
|
|
|
%Docstring
|
|
|
|
Sets a list of data providers which should be excluded from the combobox.
|
|
|
|
.. versionadded:: 3.0
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: excludedProviders()
|
2017-04-19 11:31:23 +02:00
|
|
|
%End
|
2016-11-16 13:46:20 +10:00
|
|
|
|
|
|
|
QStringList excludedProviders() const;
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the list of data providers which are excluded from the combobox.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setExcludedProviders()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: list of str
|
|
|
|
%End
|
2016-11-16 13:46:20 +10:00
|
|
|
|
2016-11-16 11:53:13 +10:00
|
|
|
void setAllowEmptyLayer( bool allowEmpty );
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Sets whether an optional empty layer ("not set") option is shown in the combo box.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: allowEmptyLayer()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-11-16 11:53:13 +10:00
|
|
|
|
|
|
|
bool allowEmptyLayer() const;
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Returns true if the combo box allows the empty layer ("not set") choice.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setAllowEmptyLayer()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-11-16 11:53:13 +10:00
|
|
|
|
2016-11-16 12:13:09 +10:00
|
|
|
void setShowCrs( bool showCrs );
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Sets whether the CRS of layers is also included in the combo box text.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: showCrs()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-11-16 12:13:09 +10:00
|
|
|
|
|
|
|
bool showCrs() const;
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Returns true if the combo box shows the layer's CRS.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setShowCrs()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setAdditionalItems( const QStringList &items );
|
|
|
|
%Docstring
|
|
|
|
Sets a list of additional (non map layer) items to include at the end of the combobox.
|
|
|
|
These may represent additional layers such as layers which are not included in the map
|
|
|
|
layer registry, or paths to layers which have not yet been loaded into QGIS.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: additionalItems()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-11-16 12:13:09 +10:00
|
|
|
|
2016-11-16 13:32:27 +10:00
|
|
|
QStringList additionalItems() const;
|
2017-04-19 11:31:23 +02:00
|
|
|
%Docstring
|
|
|
|
Return the list of additional (non map layer) items included at the end of the combo box.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setAdditionalItems()
|
2017-04-19 11:31:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: list of str
|
|
|
|
%End
|
2016-11-16 13:32:27 +10:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
QgsMapLayer *currentLayer() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the current layer selected in the combo box.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: layer
|
2017-04-19 11:31:23 +02:00
|
|
|
:rtype: QgsMapLayer
|
|
|
|
%End
|
2014-03-24 22:53:10 +01:00
|
|
|
|
2017-04-19 11:31:23 +02:00
|
|
|
QgsMapLayer *layer( int layerIndex ) const;
|
|
|
|
%Docstring
|
|
|
|
Return the layer currently shown at the specified index within the combo box.
|
|
|
|
\param layerIndex position of layer to return
|
|
|
|
.. versionadded:: 2.10
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: currentLayer
|
2017-04-19 11:31:23 +02:00
|
|
|
:rtype: QgsMapLayer
|
|
|
|
%End
|
2015-06-10 16:03:38 +10:00
|
|
|
|
2014-03-24 22:53:10 +01:00
|
|
|
public slots:
|
2017-04-19 11:31:23 +02:00
|
|
|
void setLayer( QgsMapLayer *layer );
|
|
|
|
%Docstring
|
|
|
|
setLayer set the current layer selected in the combo
|
|
|
|
%End
|
2014-03-24 22:53:10 +01:00
|
|
|
|
|
|
|
signals:
|
2017-04-19 11:31:23 +02:00
|
|
|
void layerChanged( QgsMapLayer *layer );
|
|
|
|
%Docstring
|
|
|
|
layerChanged this signal is emitted whenever the currently selected layer changes
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void indexChanged( int i );
|
|
|
|
void rowsChanged();
|
2017-04-19 11:31:23 +02:00
|
|
|
|
2014-03-24 22:53:10 +01:00
|
|
|
};
|
2017-04-19 11:31:23 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmaplayercombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|