ccAskTwoDoubleValuesDlg.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 "ccAskTwoDoubleValuesDlg.h"
  18. ccAskTwoDoubleValuesDlg::ccAskTwoDoubleValuesDlg( const QString& vName1,
  19. const QString& vName2,
  20. double minVal,
  21. double maxVal,
  22. double defaultVal1,
  23. double defaultVal2,
  24. int precision/*=6*/,
  25. QString windowTitle/*=QString()*/,
  26. QWidget* parent/*=nullptr*/)
  27. : QDialog(parent, Qt::Tool)
  28. , Ui::AskTwoDoubleValuesDialog()
  29. {
  30. setupUi(this);
  31. label1->setText(vName1);
  32. label2->setText(vName2);
  33. doubleSpinBox1->setDecimals(precision);
  34. doubleSpinBox2->setDecimals(precision);
  35. doubleSpinBox1->setRange(minVal,maxVal);
  36. doubleSpinBox2->setRange(minVal,maxVal);
  37. doubleSpinBox1->setValue(defaultVal1);
  38. doubleSpinBox2->setValue(defaultVal2);
  39. if (!windowTitle.isEmpty())
  40. {
  41. setWindowTitle(windowTitle);
  42. }
  43. }