24 , mMinMaxWidget( nullptr )
48 mMinMaxContainerWidget->setLayout( layout );
51 connect( mMinMaxWidget, SIGNAL( load(
int,
double,
double,
int ) ),
52 this, SLOT(
loadMinMax(
int,
double,
double,
int ) ) );
56 for (
int i = 1; i <= nBands; ++i )
62 mContrastEnhancementComboBox->addItem(
tr(
"No enhancement" ), 0 );
63 mContrastEnhancementComboBox->addItem(
tr(
"Stretch to MinMax" ), 1 );
64 mContrastEnhancementComboBox->addItem(
tr(
"Stretch and clip to MinMax" ), 2 );
65 mContrastEnhancementComboBox->addItem(
tr(
"Clip to MinMax" ), 3 );
69 connect( mGradientComboBox, SIGNAL( currentIndexChanged(
int ) ),
this, SIGNAL(
widgetChanged() ) );
70 connect( mContrastEnhancementComboBox, SIGNAL( currentIndexChanged(
int ) ),
this, SIGNAL(
widgetChanged() ) );
91 int band = mGrayBandComboBox->itemData( mGrayBandComboBox->currentIndex() ).toInt();
98 mContrastEnhancementComboBox->currentIndex() ).toInt() ) );
117 Q_UNUSED( theBandNo );
118 Q_UNUSED( theOrigin );
119 QgsDebugMsg(
QString(
"theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );
121 if ( qIsNaN( theMin ) )
123 mMinLineEdit->clear();
130 if ( qIsNaN( theMax ) )
132 mMaxLineEdit->clear();
140 void QgsSingleBandGrayRendererWidget::on_mGrayBandComboBox_currentIndexChanged(
int index )
143 myBands.
append( mGrayBandComboBox->itemData( index ).toInt() );
154 mGrayBandComboBox->setCurrentIndex( mGrayBandComboBox->findData( gr->
grayBand() ) );
155 mGradientComboBox->setCurrentIndex( mGradientComboBox->findData( gr->
gradient() ) );
164 mContrastEnhancementComboBox->setCurrentIndex(
virtual int bandCount() const =0
Get number of bands.
void setContrastEnhancementAlgorithm(ContrastEnhancementAlgorithm, bool generateTable=true)
Set the contrast enhancement algorithm.
double maximumValue() const
Return the maximum value for the contrast enhancement range.
A rectangle specified with double values.
void setContentsMargins(int left, int top, int right, int bottom)
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
const QgsContrastEnhancement * contrastEnhancement() const
double minimumValue() const
Return the minimum value for the contrast enhancement range.
QgsRasterRenderer * renderer() const
QString tr(const char *sourceText, const char *disambiguation, int n)
Map canvas is a class for displaying all GIS data types on a canvas.
QString number(int n, int base)
void append(const T &value)
void setMinimumValue(double, bool generateTable=true)
Return the minimum value for the contrast enhancement range.
Raster renderer pipe for single band gray.
Gradient gradient() const
void setGradient(Gradient theGradient)
virtual QGis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
void setContrastEnhancement(QgsContrastEnhancement *ce)
Takes ownership.
ContrastEnhancementAlgorithm
This enumerator describes the types of contrast enhancement algorithms that can be used...
DataType
Raster data types.
ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const
Manipulates raster pixel values so that they enhanceContrast or clip into a specified numerical range...
QgsRasterDataProvider * dataProvider()
Returns the data provider.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Raster renderer pipe that applies colors to a raster.
void setMaximumValue(double, bool generateTable=true)
Set the maximum value for the contrast enhancement range.
Base class for raster data providers.