/** * Copyright (c) 2011-2013 by Andrew Mustun. All rights reserved. * * This file is part of the QCAD project. * * QCAD is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * QCAD is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with QCAD. */ // Auto generated by Testing Dashboard // File : scripts/Draw/Line/LineOrthogonal/Tests/LineOrthogonalTest00.js // Timestamp : 2011-02-28 10:04:20 // Description : 4 orthogonal lines, different lengths include('scripts/Pro/Developer/TestingDashboard/TdbTest.js'); function LineOrthogonalTest00() { TdbTest.call(this, 'scripts/Draw/Line/LineOrthogonal/Tests/LineOrthogonalTest00.js'); } LineOrthogonalTest00.prototype = new TdbTest(); LineOrthogonalTest00.prototype.test00 = function() { qDebug('running LineOrthogonalTest00.test00()...'); this.setUp(); this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton'); this.clickOnWidget('MainWindow::LineToolsPanel::Line2PButton'); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(0.8, 18.7); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(0.8, 18.7); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(43.8, 1.9); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(43.8, 1.9); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); var p = new RVector(28.1, 19.8); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0); var p = new RVector(28.1, 19.8); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0); var p = new RVector(-0.4, 32.9); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0); var p = new RVector(-0.4, 32.9); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0); this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton'); this.clickOnWidget('MainWindow::LineToolsPanel::LineOrthogonalButton'); this.setToolOption('LineOrthogonal/Length', [ 4, 0 ] ); this.updateToolOptions(); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(5, 17.6); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(5, 17.6); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(9.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(9.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); this.setToolOption('LineOrthogonal/Length', [ 6, 0 ] ); this.updateToolOptions(); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(19.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(19.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); this.setToolOption('LineOrthogonal/Length', [ 7, 0 ] ); this.updateToolOptions(); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(30, 20); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(30, 20); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); // key: '8' this.pressAndReleaseKeyOnGv(0x38, 0); // key: '8' this.pressAndReleaseKeyOnGv(0x38, 0); this.setToolOption('LineOrthogonal/Length', [ 8, 0 ] ); this.updateToolOptions(); this.setZoom(10, new RVector(5, 5, 0) ); var p = new RVector(39.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0); var p = new RVector(39.9, 19.9); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0); var p = new RVector(28.8, 12.8); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0); var p = new RVector(28.8, 12.8); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0); var p = new RVector(2, 3.6); this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0); var p = new RVector(2, 3.6); this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0); this.verifyDrawing('LineOrthogonalTest00_000.dxf'); this.tearDown(); qDebug('finished LineOrthogonalTest00.test00()'); };