95 else if (
count() == 0 )
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QModelIndex indexFromLayer(QgsMapLayer *layer) const
indexFromLayer returns the model index for a given layer
Base class for all map layer types.
void layerChanged(QgsMapLayer *layer)
layerChanged this signal is emitted whenever the currently selected layer changes ...
void activated(int index)
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
QgsMapLayerModel * sourceLayerModel() const
layerModel returns the QgsMapLayerModel used in this QSortFilterProxyModel
void * internalPointer() const
QgsMapLayerComboBox(QWidget *parent=nullptr)
QgsMapLayerComboBox creates a combo box to dislpay the list of layers (currently in the registry)...
void setLayer(QgsMapLayer *layer)
setLayer set the current layer selected in the combo
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
void setModel(QAbstractItemModel *model)
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
void setCurrentIndex(int index)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QgsMapLayer * layer(int layerIndex) const
Return the layer currently shown at the specified index within the combo box.
QgsMapLayer * currentLayer() const
Returns the current layer selected in the combo box.