/**
 * 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/Line2P/Tests/LinesSnapGrid.js
// Timestamp   : 2011-02-11 11:40:52
// Description : Lines drawn with grid snap while zooming out

include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');

function LinesSnapGrid() {
    TdbTest.call(this, 'scripts/Draw/Line/Line2P/Tests/LinesSnapGrid.js');
}

LinesSnapGrid.prototype = new TdbTest();

LinesSnapGrid.prototype.test00 = function() {
    qDebug('running LinesSnapGrid.test00()...');
    this.setUp();
    this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton');
    this.clickOnWidget('MainWindow::LineToolsPanel::Line2PButton');
    this.clickOnWidget('MainWindow::SnapToolsPanel::SnapGridButton');
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(0, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(0, 1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(1, 1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(1, -1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(-1, -1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(-1, 2);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(2, 2);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-13.99390432098766, -10.443209876543204, 13.928549382716048, 10.245447530864206);
    var p = new RVector(2, -2);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-37.57111111111111, -23.075555555555553, 31.90888888888889, 28.404444444444444);
    var p = new RVector(-10, -10);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-37.57111111111111, -23.075555555555553, 31.90888888888889, 28.404444444444444);
    var p = new RVector(-10, 10);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-37.57111111111111, -23.075555555555553, 31.90888888888889, 28.404444444444444);
    var p = new RVector(10, 10);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-37.57111111111111, -23.075555555555553, 31.90888888888889, 28.404444444444444);
    var p = new RVector(10, -10);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
//    this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(396, 318), Qt.MidButton, 4, 0);
//    this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(337, 251), Qt.MidButton, 0, 0);
    this.zoomTo(-350.041556186444, -188.1954776761776, 269.4491029583825, 270.805373400041);
    var p = new RVector(-100, -100);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-350.041556186444, -188.1954776761776, 269.4491029583825, 270.805373400041);
    var p = new RVector(-100, 100);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-350.041556186444, -188.1954776761776, 269.4491029583825, 270.805373400041);
    var p = new RVector(100, 100);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-350.041556186444, -188.1954776761776, 269.4491029583825, 270.805373400041);
    var p = new RVector(100, -100);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3809.784011027812, -1539.3739507592636, 2818.345121402093, 3371.6232820774017);
    var p = new RVector(-1000, -1000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3809.784011027812, -1539.3739507592636, 2818.345121402093, 3371.6232820774017);
    var p = new RVector(-1000, 1000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3809.784011027812, -1539.3739507592636, 2818.345121402093, 3371.6232820774017);
    var p = new RVector(1000, 1000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3809.784011027812, -1539.3739507592636, 2818.345121402093, 3371.6232820774017);
    var p = new RVector(1000, -1000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-33983.92919401641, -11858.62197745205, 25113.135934740472, 31928.322651626884);
    var p = new RVector(-10000, -10000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-33983.92919401641, -11858.62197745205, 25113.135934740472, 31928.322651626884);
    var p = new RVector(-10000, 10000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-33983.92919401641, -11858.62197745205, 25113.135934740472, 31928.322651626884);
    var p = new RVector(10000, 10000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-33983.92919401641, -11858.62197745205, 25113.135934740472, 31928.322651626884);
    var p = new RVector(10000, -10000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-370199.659079616, -125895.59333736448, 262098.78358253173, 342594.962624745);
    var p = new RVector(-100000, -100000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-370199.659079616, -125895.59333736448, 262098.78358253173, 342594.962624745);
    var p = new RVector(-100000, 100000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-370199.659079616, -125895.59333736448, 262098.78358253173, 342594.962624745);
    var p = new RVector(100000, 100000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-370199.659079616, -125895.59333736448, 262098.78358253173, 342594.962624745);
    var p = new RVector(100000, -100000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3908937.78763473, -1365179.249135233, 2856225.926027124, 3647351.378085726);
    var p = new RVector(-1000000, -1000000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3908937.78763473, -1365179.249135233, 2856225.926027124, 3647351.378085726);
    var p = new RVector(-1000000, 1000000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3908937.78763473, -1365179.249135233, 2856225.926027124, 3647351.378085726);
    var p = new RVector(1000000, 1000000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-3908937.78763473, -1365179.249135233, 2856225.926027124, 3647351.378085726);
    var p = new RVector(1000000, -1000000);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-10.112141901687671, -6.664648483411518, 9.278450948106572, 7.7024747161769636);
    var p = new RVector(-3, -2);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.zoomTo(-10.112141901687671, -6.664648483411518, 9.278450948106572, 7.7024747161769636);
    var p = new RVector(0, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(300, 237), Qt.RightButton, 2, 0);
    this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(300, 237), Qt.RightButton, 0, 0);
    this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(198, 280), Qt.RightButton, 2, 0);
    this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(198, 280), Qt.RightButton, 0, 0);
    this.verifyDrawing('LinesSnapGrid_000.dxf');
    this.tearDown();
    qDebug('finished LinesSnapGrid.test00()');
};

