27 , mDisableMinMaxWidgetRefresh( false )
30 connect( mMinLineEdit, &QLineEdit::textChanged,
this, &QgsSingleBandGrayRendererWidget::mMinLineEdit_textChanged );
31 connect( mMaxLineEdit, &QLineEdit::textChanged,
this, &QgsSingleBandGrayRendererWidget::mMaxLineEdit_textChanged );
51 QHBoxLayout *layout =
new QHBoxLayout();
52 layout->setContentsMargins( 0, 0, 0, 0 );
53 mMinMaxContainerWidget->setLayout( layout );
54 layout->addWidget( mMinMaxWidget );
89 int band = mGrayBandComboBox->currentBand();
98 renderer->setContrastEnhancement( e );
117 void QgsSingleBandGrayRendererWidget::mMinLineEdit_textChanged(
const QString & )
122 void QgsSingleBandGrayRendererWidget::mMaxLineEdit_textChanged(
const QString & )
127 void QgsSingleBandGrayRendererWidget::minMaxModified()
129 if ( !mDisableMinMaxWidgetRefresh )
133 mContrastEnhancementComboBox->setCurrentIndex(
146 QgsDebugMsg( QStringLiteral(
"theBandNo = %1 min = %2 max = %3" ).arg( bandNo ).arg(
min ).arg(
max ) );
148 mDisableMinMaxWidgetRefresh =
true;
149 if ( std::isnan(
min ) )
151 mMinLineEdit->clear();
155 mMinLineEdit->setText( QLocale().toString(
min ) );
158 if ( std::isnan(
max ) )
160 mMaxLineEdit->clear();
164 mMaxLineEdit->setText( QLocale().toString(
max ) );
166 mDisableMinMaxWidgetRefresh =
false;
169 void QgsSingleBandGrayRendererWidget::bandChanged()
172 myBands.append( mGrayBandComboBox->currentBand() );
183 mGrayBandComboBox->setBand( gr->
grayBand() );
185 mGradientComboBox->setCurrentIndex( mGradientComboBox->findData( gr->
gradient() ) );
191 mDisableMinMaxWidgetRefresh =
true;
192 mMinLineEdit->setText( QLocale().toString( ce->
minimumValue() ) );
193 mMaxLineEdit->setText( QLocale().toString( ce->
maximumValue() ) );
194 mDisableMinMaxWidgetRefresh =
false;
196 mContrastEnhancementComboBox->setCurrentIndex(
206 mDisableMinMaxWidgetRefresh =
true;
207 mMinLineEdit->setText( value );
208 mDisableMinMaxWidgetRefresh =
false;
213 mDisableMinMaxWidgetRefresh =
true;
214 mMaxLineEdit->setText( value );
215 mDisableMinMaxWidgetRefresh =
false;