示例#1
0
void QgsMeshCalculatorDialog::setAcceptButtonState()
{
  if ( expressionValid() && filePathValid() )
    mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( true );
  else
    mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
}
示例#2
0
void QgsRasterCalcDialog::setAcceptButtonState()
{
  if ( expressionValid() && filePathValid() )
  {
    mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( true );
  }
  else
  {
    mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
  }
}
示例#3
0
void QgsRasterCalcDialog::on_mExpressionTextEdit_textChanged()
{
  if ( expressionValid() )
  {
    mExpressionValidLabel->setText( tr( "Expression valid" ) );
    if ( filePathValid() )
    {
      mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( true );
      return;
    }
  }
  else
  {
    mExpressionValidLabel->setText( tr( "Expression invalid" ) );
  }
  mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
}