QGIS API Documentation
3.6.0-Noosa (5873452)
|
A combobox widget which displays the bands present in a raster layer. More...
#include <qgsrasterbandcombobox.h>
Public Slots | |
void | setBand (int band) |
Sets the current band number selected in the combobox. More... | |
void | setLayer (QgsMapLayer *layer) |
Sets the raster layer for which the bands are listed in the combobox. More... | |
Signals | |
void | bandChanged (int band) |
This signal is emitted when the currently selected band changes. More... | |
Public Member Functions | |
QgsRasterBandComboBox (QWidget *parent=nullptr) | |
Constructor for QgsRasterBandComboBox. More... | |
int | currentBand () const |
Returns the current band number selected in the combobox, or -1 if no band is selected. More... | |
bool | isShowingNotSetOption () const |
Returns true if the combo box is showing the "not set" option. More... | |
QgsRasterLayer * | layer () const |
Returns the layer currently associated with the combobox. More... | |
void | setShowNotSetOption (bool show, const QString &string=QString()) |
Sets whether the combo box should show the "not set" option. More... | |
Properties | |
int | band |
A combobox widget which displays the bands present in a raster layer.
Definition at line 33 of file qgsrasterbandcombobox.h.
QgsRasterBandComboBox::QgsRasterBandComboBox | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsRasterBandComboBox.
Definition at line 20 of file qgsrasterbandcombobox.cpp.
|
signal |
This signal is emitted when the currently selected band changes.
int QgsRasterBandComboBox::currentBand | ( | ) | const |
Returns the current band number selected in the combobox, or -1 if no band is selected.
Definition at line 35 of file qgsrasterbandcombobox.cpp.
bool QgsRasterBandComboBox::isShowingNotSetOption | ( | ) | const |
Returns true if the combo box is showing the "not set" option.
Definition at line 78 of file qgsrasterbandcombobox.cpp.
QgsRasterLayer * QgsRasterBandComboBox::layer | ( | ) | const |
Returns the layer currently associated with the combobox.
Definition at line 30 of file qgsrasterbandcombobox.cpp.
|
slot |
Sets the current band number selected in the combobox.
Definition at line 73 of file qgsrasterbandcombobox.cpp.
|
slot |
Sets the raster layer for which the bands are listed in the combobox.
If no layer is set or a non-raster layer is set then the combobox will be empty.
Definition at line 40 of file qgsrasterbandcombobox.cpp.
void QgsRasterBandComboBox::setShowNotSetOption | ( | bool | show, |
const QString & | string = QString() |
||
) |
Sets whether the combo box should show the "not set" option.
Optionally the built in "not set" text can be overridden by specifying a string.
Definition at line 83 of file qgsrasterbandcombobox.cpp.
|
readwrite |
Definition at line 36 of file qgsrasterbandcombobox.h.