Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add a new QgsRasterBandComboBox widget
And use wherever custom widgets were being created. Reduces duplicate code and allows specialised handling for raster band display/selection to be centralized.
- Loading branch information
1 parent
3cd3e5d
commit a32314d
Showing
21 changed files
with
402 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/raster/qgsrasterbandcombobox.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsRasterBandComboBox : QComboBox | ||
{ | ||
%Docstring | ||
A combobox widget which displays the bands present in a raster layer. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsrasterbandcombobox.h" | ||
%End | ||
public: | ||
|
||
QgsRasterBandComboBox( QWidget *parent /TransferThis/ = 0 ); | ||
%Docstring | ||
Constructor for QgsRasterBandComboBox. | ||
%End | ||
|
||
QgsRasterLayer *layer() const; | ||
%Docstring | ||
Returns the layer currently associated with the combobox. | ||
.. seealso:: setLayer() | ||
:rtype: QgsRasterLayer | ||
%End | ||
|
||
int currentBand() const; | ||
%Docstring | ||
Returns the current band number selected in the combobox, or -1 | ||
if no band is selected. | ||
.. seealso:: setBand() | ||
:rtype: int | ||
%End | ||
|
||
public slots: | ||
|
||
void setLayer( QgsMapLayer *layer ); | ||
%Docstring | ||
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. | ||
.. seealso:: layer() | ||
%End | ||
|
||
void setBand( int band ); | ||
%Docstring | ||
Sets the current ``band`` number selected in the combobox. | ||
.. seealso:: band() | ||
%End | ||
|
||
signals: | ||
|
||
void bandChanged( int band ); | ||
%Docstring | ||
This signal is emitted when the currently selected band changes. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/raster/qgsrasterbandcombobox.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.