LinesSnapPolarCoordinate.js 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Copyright (c) 2011-2013 by Andrew Mustun. All rights reserved.
  3. *
  4. * This file is part of the QCAD project.
  5. *
  6. * QCAD is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * QCAD is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with QCAD.
  18. */
  19. // Auto generated by Testing Dashboard
  20. // File : scripts/Draw/Line/Line2P/Tests/LinesSnapPolarCoordinate.js
  21. // Timestamp : 2011-02-17 14:12:54
  22. // Description : Lines drawn with polar coordinate snap
  23. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  24. function LinesSnapPolarCoordinate() {
  25. TdbTest.call(this, 'scripts/Draw/Line/Line2P/Tests/LinesSnapPolarCoordinate.js');
  26. }
  27. LinesSnapPolarCoordinate.prototype = new TdbTest();
  28. LinesSnapPolarCoordinate.prototype.test00 = function() {
  29. qDebug('running LinesSnapPolarCoordinate.test00()...');
  30. this.setUp();
  31. this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton');
  32. this.clickOnWidget('MainWindow::LineToolsPanel::Line2PButton');
  33. this.clickOnWidget('MainWindow::SnapToolsPanel::SnapCoordinatePolarButton');
  34. this.setToolOption('SnapCoordinatePolar/R', [ 10, 0 ] );
  35. this.setToolOption('SnapCoordinatePolar/A', [ 15, 0 ] );
  36. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  37. this.updateToolOptions();
  38. this.clickOnWidget('MainWindow::Options::Set');
  39. this.setToolOption('SnapCoordinatePolar/R', [ 10, 0 ] );
  40. this.setToolOption('SnapCoordinatePolar/A', [ 30, 0 ] );
  41. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  42. this.updateToolOptions();
  43. this.clickOnWidget('MainWindow::Options::Set');
  44. this.setToolOption('SnapCoordinatePolar/R', [ 10, 0 ] );
  45. this.setToolOption('SnapCoordinatePolar/A', [ 45, 0 ] );
  46. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  47. this.updateToolOptions();
  48. this.clickOnWidget('MainWindow::Options::Set');
  49. this.setToolOption('SnapCoordinatePolar/R', [ 20, 0 ] );
  50. this.setToolOption('SnapCoordinatePolar/A', [ 60, 0 ] );
  51. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  52. this.updateToolOptions();
  53. this.clickOnWidget('MainWindow::Options::Set');
  54. this.setToolOption('SnapCoordinatePolar/R', [ 20, 0 ] );
  55. this.setToolOption('SnapCoordinatePolar/A', [ 90, 0 ] );
  56. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  57. this.updateToolOptions();
  58. this.clickOnWidget('MainWindow::Options::Set');
  59. this.setToolOption('SnapCoordinatePolar/R', [ 20, 0 ] );
  60. this.setToolOption('SnapCoordinatePolar/A', [ 146, 0 ] );
  61. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  62. this.updateToolOptions();
  63. this.clickOnWidget('MainWindow::Options::Set');
  64. this.setToolOption('SnapCoordinatePolar/R', [ 15, 0 ] );
  65. this.setToolOption('SnapCoordinatePolar/A', [ 177, 0 ] );
  66. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  67. this.updateToolOptions();
  68. this.clickOnWidget('MainWindow::Options::Set');
  69. this.setToolOption('SnapCoordinatePolar/R', [ 15, 0 ] );
  70. this.setToolOption('SnapCoordinatePolar/A', [ 220, 0 ] );
  71. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  72. this.updateToolOptions();
  73. this.clickOnWidget('MainWindow::Options::Set');
  74. this.setToolOption('SnapCoordinatePolar/R', [ 15, 0 ] );
  75. this.setToolOption('SnapCoordinatePolar/A', [ 220, 0 ] );
  76. this.setToolOption('SnapCoordinatePolar/Relative', 'false');
  77. this.updateToolOptions();
  78. this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(253, 260), Qt.RightButton, 2, 0);
  79. this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(253, 260), Qt.RightButton, 0, 0);
  80. this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(272, 256), Qt.RightButton, 2, 0);
  81. this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(272, 256), Qt.RightButton, 0, 0);
  82. this.verifyDrawing('LinesSnapPolarCoordinate_000.dxf');
  83. this.tearDown();
  84. qDebug('finished LinesSnapPolarCoordinate.test00()');
  85. };