QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
gui
raster
qgsrasterbandcombobox.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterbandcombobox.h
3
-----------------------
4
begin : May 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSRASTERBANDCOMBOBOX_H
17
#define QGSRASTERBANDCOMBOBOX_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
#include "
qgsrasterlayer.h
"
22
#include <QComboBox>
23
#include <QPointer>
24
25
class
QgsMapLayer
;
26
class
QgsRasterDataProvider
;
27
34
class
GUI_EXPORT
QgsRasterBandComboBox
:
public
QComboBox
35
{
36
Q_OBJECT
37
Q_PROPERTY(
int
band READ currentBand WRITE setBand NOTIFY bandChanged )
38
39
public
:
40
44
QgsRasterBandComboBox
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
45
50
QgsRasterLayer
*layer()
const
;
51
57
int
currentBand()
const
;
58
63
bool
isShowingNotSetOption()
const
;
64
71
void
setShowNotSetOption(
bool
show,
const
QString &
string
= QString() );
72
76
static
QString displayBandName(
QgsRasterDataProvider
*provider,
int
band );
77
78
public
slots:
79
85
void
setLayer(
QgsMapLayer
*layer );
86
91
void
setBand(
int
band );
92
93
signals:
94
98
void
bandChanged(
int
band );
99
100
private
:
101
102
QPointer< QgsRasterLayer > mLayer;
103
104
bool
mShowNotSet =
false
;
105
QString mNotSetString;
106
int
mPrevBand = -1;
107
108
109
110
};
111
112
#endif // QGSRASTERBANDCOMBOBOX_H
qgsrasterlayer.h
QgsRasterBandComboBox
A combobox widget which displays the bands present in a raster layer.
Definition:
qgsrasterbandcombobox.h:34
qgis_sip.h
QgsRasterLayer
Represents a raster layer.
Definition:
qgsrasterlayer.h:76
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition:
qgsmaplayer.h:72
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
QgsRasterDataProvider
Base class for raster data providers.
Definition:
qgsrasterdataprovider.h:88
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17