24 , mMinMaxWidget( NULL )
31 mMinLineEdit->setValidator(
new QDoubleValidator( mMinLineEdit ) );
32 mMaxLineEdit->setValidator(
new QDoubleValidator( mMaxLineEdit ) );
45 QHBoxLayout *layout =
new QHBoxLayout();
46 layout->setContentsMargins( 0, 0, 0, 0 );
47 mMinMaxContainerWidget->setLayout( layout );
48 layout->addWidget( mMinMaxWidget );
50 connect( mMinMaxWidget, SIGNAL( load(
int,
double,
double,
int ) ),
51 this, SLOT(
loadMinMax(
int,
double,
double,
int ) ) );
55 for (
int i = 1; i <= nBands; ++i )
61 mContrastEnhancementComboBox->addItem(
tr(
"No enhancement" ), 0 );
62 mContrastEnhancementComboBox->addItem(
tr(
"Stretch to MinMax" ), 1 );
63 mContrastEnhancementComboBox->addItem(
tr(
"Stretch and clip to MinMax" ), 2 );
64 mContrastEnhancementComboBox->addItem(
tr(
"Clip to MinMax" ), 3 );
85 int band = mGrayBandComboBox->itemData( mGrayBandComboBox->currentIndex() ).toInt();
92 mContrastEnhancementComboBox->currentIndex() ).toInt() ) );
105 Q_UNUSED( theBandNo );
106 Q_UNUSED( theOrigin );
107 QgsDebugMsg( QString(
"theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );
109 if ( qIsNaN( theMin ) )
111 mMinLineEdit->clear();
115 mMinLineEdit->setText( QString::number( theMin ) );
118 if ( qIsNaN( theMax ) )
120 mMaxLineEdit->clear();
124 mMaxLineEdit->setText( QString::number( theMax ) );
128 void QgsSingleBandGrayRendererWidget::on_mGrayBandComboBox_currentIndexChanged(
int index )
131 myBands.append( mGrayBandComboBox->itemData( index ).toInt() );
141 mGrayBandComboBox->setCurrentIndex( mGrayBandComboBox->findData( gr->
grayBand() ) );
144 mGradientComboBox->setCurrentIndex( mGradientComboBox->findData( gr->
gradient() ) );
146 mMinLineEdit->setText( QString::number( ce->
minimumValue() ) );
147 mMaxLineEdit->setText( QString::number( ce->
maximumValue() ) );
149 mContrastEnhancementComboBox->setCurrentIndex(