ccStatisticalTestDlg.cpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE #
  4. //# #
  5. //# This program is free software; you can redistribute it and/or modify #
  6. //# it under the terms of the GNU General Public License as published by #
  7. //# the Free Software Foundation; version 2 or later of the License. #
  8. //# #
  9. //# This program is distributed in the hope that it will be useful, #
  10. //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
  11. //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
  12. //# GNU General Public License for more details. #
  13. //# #
  14. //# COPYRIGHT: EDF R&D / TELECOM ParisTech (ENST-TSI) #
  15. //# #
  16. //##########################################################################
  17. #include "ccStatisticalTestDlg.h"
  18. #include "ui_statisticalTestDlg.h"
  19. ccStatisticalTestDlg::ccStatisticalTestDlg( QString p1Label,
  20. QString p2Label,
  21. QString p3Label/*=QString()*/,
  22. QString windowTitle/*=QString()*/,
  23. QWidget* parent/*=nullptr*/)
  24. : QDialog(parent, Qt::Tool)
  25. , m_ui( new Ui::StatisticalTestDialog )
  26. {
  27. m_ui->setupUi(this);
  28. m_ui->param1Label->setText(p1Label);
  29. m_ui->param2Label->setText(p2Label);
  30. if (!p3Label.isNull())
  31. {
  32. m_ui->param3Label->setText(p3Label);
  33. }
  34. else
  35. {
  36. m_ui->param3Label->setVisible(false);
  37. m_ui->param3SpinBox->setVisible(false);
  38. }
  39. m_ui->neighborsSpinBox->setValue(16);
  40. if (!windowTitle.isNull())
  41. {
  42. setWindowTitle(windowTitle);
  43. }
  44. }
  45. ccStatisticalTestDlg::~ccStatisticalTestDlg()
  46. {
  47. delete m_ui;
  48. }
  49. double ccStatisticalTestDlg::getParam1() const
  50. {
  51. return m_ui->param1SpinBox->value();
  52. }
  53. double ccStatisticalTestDlg::getParam2() const
  54. {
  55. return m_ui->param2SpinBox->value();
  56. }
  57. double ccStatisticalTestDlg::getParam3() const
  58. {
  59. return m_ui->param3SpinBox->value();
  60. }
  61. int ccStatisticalTestDlg::getNeighborsNumber() const
  62. {
  63. return m_ui->neighborsSpinBox->value();
  64. }
  65. double ccStatisticalTestDlg::getProbability() const
  66. {
  67. return m_ui->probaSpinBox->value();
  68. }