dialogselgaussiannoise.cpp 754 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "dialogselgaussiannoise.h"
  2. #include "ui_dialogselgaussiannoise.h"
  3. DialogSelGaussianNoise::DialogSelGaussianNoise(QWidget *parent) :
  4. QDialog(parent),
  5. ui(new Ui::DialogSelGaussianNoise)
  6. {
  7. ui->setupUi(this);
  8. }
  9. DialogSelGaussianNoise::~DialogSelGaussianNoise()
  10. {
  11. delete ui;
  12. }
  13. float DialogSelGaussianNoise::getGaussianNoiseVariance()
  14. {
  15. if(!ui->textEditVariance->toPlainText().compare(""))
  16. {
  17. return 100;
  18. }
  19. else
  20. {
  21. return ui->textEditVariance->toPlainText().toFloat();
  22. }
  23. }
  24. float DialogSelGaussianNoise::getGaussianNoiseMean()
  25. {
  26. if(!ui->textEditMean->toPlainText().compare(""))
  27. {
  28. return 0;
  29. }
  30. else
  31. {
  32. return ui->textEditMean->toPlainText().toFloat();
  33. }
  34. }