// Auto generated by Testing Dashboard
// File        : scripts/Edit/CutWithReference/Tests/CutWithReferenceTest00.js
// Timestamp   : 2015-04-23 15:30:44
// Description : 

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

function CutWithReferenceTest00() {
    TdbTest.call(this, 'scripts/Edit/CutWithReference/Tests/CutWithReferenceTest00.js');
}

CutWithReferenceTest00.prototype = new TdbTest();

CutWithReferenceTest00.prototype.test00 = function() {
    qDebug('running CutWithReferenceTest00.test00()...');
    this.setUp();
    TdbTest.clickOnWidget('MainWindow::CadToolBar::MainToolsPanel::LineToolsPanelButton');
    TdbTest.clickOnWidget('MainWindow::CadToolBar::LineToolsPanel::Line2PButton');
    this.setZoom(10, new RVector(5, 5, 0, true));
    var p = new RVector(10.1, 19.8);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.setZoom(10, new RVector(5, 5, 0, true));
    var p = new RVector(20.1, 20.1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.setZoom(10, new RVector(5, 5, 0, true));
    var p = new RVector(20, 10.2);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    var p = new RVector(28, 14.4);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
    var p = new RVector(27.4, 15.1);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
    this.selectAll();
    this.triggerCommand('cutwithreference');
    this.setZoom(10, new RVector(5, 5, 0, true));
    var p = new RVector(20.1, 19.8);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    this.triggerCommand('paste');
    this.setToolOption('Paste/Rotation', '0');
    this.setToolOption('Paste/Scale', '1');
    this.setToolOption('Paste/FlipHorizontal', 'false');
    this.setToolOption('Paste/FlipVertical', 'false');
    this.setToolOption('Paste/ToCurrentLayer', 'false');
    this.setToolOption('Paste/OverwriteLayers', 'false');
    this.setToolOption('Paste/OverwriteBlocks', 'false');
    this.updateToolOptions();
    this.setZoom(10, new RVector(5, 5, 0, true));
    var p = new RVector(39.7, 19.8);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
    var p = new RVector(27.6, 12.9);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
    var p = new RVector(27.5, 12.9);
    this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
    this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
    this.verifyDrawing('CutWithReferenceTest00_000.dxf');
    this.tearDown();
    qDebug('finished CutWithReferenceTest00.test00()');
};

