LineParallelThroughTest01.js 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/LineParallelThrough/Tests/LineParallelThroughTest01.js
  21. // Timestamp : 2011-03-08 11:57:22
  22. // Description : Draw parallels to polyline segments
  23. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  24. function LineParallelThroughTest01() {
  25. TdbTest.call(this, 'scripts/Draw/Line/LineParallelThrough/Tests/LineParallelThroughTest01.js');
  26. }
  27. LineParallelThroughTest01.prototype = new TdbTest();
  28. LineParallelThroughTest01.prototype.test00 = function() {
  29. qDebug('running LineParallelThroughTest01.test00()...');
  30. this.setUp();
  31. this.importFile('scripts/Draw/Line/LineParallelThrough/Tests/data/polyline.dxf');
  32. this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton');
  33. this.clickOnWidget('MainWindow::LineToolsPanel::LineParallelThroughButton');
  34. this.setToolOption('LineParallelThrough/Number', '1');
  35. this.updateToolOptions();
  36. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  37. var p = new RVector(-0.036611, 6.63382);
  38. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  39. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  40. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  41. var p = new RVector(-1.928403, 7.020777);
  42. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  43. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  44. var p = new RVector(4.778858, 8.052664);
  45. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  46. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  47. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  48. var p = new RVector(4.563882, 9.90146);
  49. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  50. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  51. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  52. var p = new RVector(4.950839, 11.922237);
  53. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  54. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  55. var p = new RVector(7.960507, 10.030445);
  56. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  57. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  58. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  59. var p = new RVector(13.678877, 8.35363);
  60. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  61. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  62. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  63. var p = new RVector(17.075502, 4.914009);
  64. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  65. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  66. var p = new RVector(15.742649, 3.065213);
  67. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  68. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  69. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  70. var p = new RVector(14.925739, 2.334294);
  71. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  72. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  73. this.setZoom(23.258377425044095, new RVector(8.42069, 4.50195, 0) );
  74. var p = new RVector(17.032507, 2.033327);
  75. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  76. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  77. var p = new RVector(15.441682, 2.592265);
  78. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  79. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  80. var p = new RVector(15.312697, 2.592265);
  81. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  82. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  83. this.verifyDrawing('LineParallelThroughTest01_000.dxf');
  84. this.tearDown();
  85. qDebug('finished LineParallelThroughTest01.test00()');
  86. };