Class: QgsRasterBandComboBox¶
-
class
qgis.gui.
QgsRasterBandComboBox
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QComboBox
Constructor for QgsRasterBandComboBox.
A combobox widget which displays the bands present in a raster layer.
New in version 3.0: Enums
Methods
Returns the current band number selected in the combobox, or -1 if no band is selected.
Returns true if the combo box is showing the “not set” option.
Returns the layer currently associated with the combobox.
Sets the current
band
number selected in the combobox.Sets the raster
layer
for which the bands are listed in the combobox.Sets whether the combo box should show the “not set” option.
Signals
This signal is emitted when the currently selected band changes.
Attributes
-
actionEvent
()¶
-
bandChanged
¶ This signal is emitted when the currently selected band changes. [signal]
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
currentBand
(self) → int¶ Returns the current band number selected in the combobox, or -1 if no band is selected.
See also
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isShowingNotSetOption
(self) → bool¶ Returns true if the combo box is showing the “not set” option.
See also
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layer
(self) → QgsRasterLayer¶ Returns the layer currently associated with the combobox.
See also
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setBand
(self, band: int)¶ Sets the current
band
number selected in the combobox.See also
band()
-
setLayer
(self, layer: QgsMapLayer)¶ 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.See also
-
setShowNotSetOption
(self, show: bool, string: str = '')¶ 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
.See also
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-