Skip to content

Commit

Permalink
Merge pull request #45327 from DelazJ/calculatorDialogs
Browse files Browse the repository at this point in the history
Group widgets in mesh/raster calculator dialogs
  • Loading branch information
PeterPetrik committed Sep 30, 2021
2 parents f76af64 + 4e7e12e commit aa00c9f
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 386 deletions.
20 changes: 6 additions & 14 deletions src/app/mesh/qgsmeshcalculatordialog.cpp
Expand Up @@ -63,9 +63,9 @@ QgsMeshCalculatorDialog::QgsMeshCalculatorDialog( QgsMeshLayer *meshLayer, QWidg
connect( mAllTimesButton, &QPushButton::clicked, this, &QgsMeshCalculatorDialog::mAllTimesButton_clicked );
connect( mExpressionTextEdit, &QTextEdit::textChanged, this, &QgsMeshCalculatorDialog::updateInfoMessage );

connect( useMaskCb, &QCheckBox::stateChanged, this, &QgsMeshCalculatorDialog::toggleExtendMask );
connect( useExtentCb, &QCheckBox::stateChanged, this, &QgsMeshCalculatorDialog::toggleExtendMask );
connect( useMaskCb, &QRadioButton::toggled, this, &QgsMeshCalculatorDialog::toggleExtendMask );
maskBox->setVisible( false );
useMaskCb->setEnabled( cboLayerMask->count() );

mXMaxSpinBox->setShowClearButton( false );
mXMinSpinBox->setShowClearButton( false );
Expand Down Expand Up @@ -279,19 +279,11 @@ void QgsMeshCalculatorDialog::datasetGroupEntry( const QModelIndex &index )
mExpressionTextEdit->insertPlainText( QStringLiteral( " %1 " ).arg( group ) );
}

void QgsMeshCalculatorDialog::toggleExtendMask( int state )
void QgsMeshCalculatorDialog::toggleExtendMask()
{
Q_UNUSED( state )
if ( useMaskCb->checkState() == Qt::Checked )
{
extendBox->setVisible( false );
maskBox->setVisible( true );
}
else
{
extendBox->setVisible( true );
maskBox->setVisible( false );
}
bool visible = useMaskCb->isChecked();
extendBox->setVisible( !visible );
maskBox->setVisible( visible );
}

void QgsMeshCalculatorDialog::updateInfoMessage()
Expand Down
2 changes: 1 addition & 1 deletion src/app/mesh/qgsmeshcalculatordialog.h
Expand Up @@ -45,7 +45,7 @@ class APP_EXPORT QgsMeshCalculatorDialog: public QDialog, private Ui::QgsMeshCal
void datasetGroupEntry( const QModelIndex &index );
void mCurrentLayerExtentButton_clicked();
void mAllTimesButton_clicked();
void toggleExtendMask( int state );
void toggleExtendMask();
void updateInfoMessage();
void onOutputRadioButtonChange();
void onOutputFormatChange();
Expand Down

0 comments on commit aa00c9f

Please sign in to comment.