| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- /**
- * 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/Shape/ShapePolygonCP/Tests/ShapePolygonCPTest02.js
- // Timestamp : 2011-02-28 10:26:03
- // Description : Regular polygons with 3 up to 8 lines, defined by center
- include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
- function ShapePolygonCPTest02() {
- TdbTest.call(this, 'scripts/Draw/Shape/ShapePolygonCP/Tests/ShapePolygonCPTest02.js');
- }
- ShapePolygonCPTest02.prototype = new TdbTest();
- ShapePolygonCPTest02.prototype.test00 = function() {
- qDebug('running ShapePolygonCPTest02.test00()...');
- this.setUp();
- this.clickOnWidget('MainWindow::MainToolsPanel::ShapeToolsPanelButton');
- this.clickOnWidget('MainWindow::ShapeToolsPanel::ShapePolygonCPButton');
- this.setToolOption('ShapePolygonCP/Corners', '3');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- this.updateToolOptions();
- this.setZoom(10, new RVector(5, 5, 0) );
- var p = new RVector(10, 20);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(10, 20);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setZoom(10, new RVector(5, 5, 0) );
- var p = new RVector(10, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(10, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setToolOption('ShapePolygonCP/Corners', '4');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- 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);
- this.setZoom(10, new RVector(5, 5, 0) );
- var p = new RVector(30, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(30, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setToolOption('ShapePolygonCP/Corners', '5');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- this.updateToolOptions();
- this.setZoom(10, new RVector(-7.2, 5.2, 0) );
- var p = new RVector(50, 20);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(50, 20);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setZoom(10, new RVector(-7.2, 5.2, 0) );
- var p = new RVector(50, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(50, 10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setToolOption('ShapePolygonCP/Corners', '6');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- this.updateToolOptions();
- this.setZoom(10, new RVector(1.7, 13.3, 0) );
- var p = new RVector(10, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(10, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setZoom(10, new RVector(1.7, 13.3, 0) );
- var p = new RVector(10, -20);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(10, -20);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setToolOption('ShapePolygonCP/Corners', '7');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- this.updateToolOptions();
- this.setZoom(10, new RVector(1.7, 13.3, 0) );
- var p = new RVector(30, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(30, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setZoom(10, new RVector(1.7, 13.3, 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);
- this.setToolOption('ShapePolygonCP/Corners', '8');
- this.setToolOption('Shape/CreatePolyline', 'true');
- this.setToolOption('Shape/Fill', 'true');
- this.updateToolOptions();
- this.setZoom(10, new RVector(-13.4, 14.3, 0) );
- var p = new RVector(50, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(50, -10);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- this.setZoom(10, new RVector(-13.4, 14.3, 0) );
- var p = new RVector(50, -20);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
- var p = new RVector(50, -20);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
- var p = new RVector(56.6, 1.9);
- this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
- var p = new RVector(56.6, 1.9);
- this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
- this.verifyDrawing('ShapePolygonCPTest02_000.dxf');
- this.tearDown();
- qDebug('finished ShapePolygonCPTest02.test00()');
- };
|