-
-
Save marekw2143/4a2791d4ca38f901c53c9a30e1e308a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include("scripts/EAction.js"); | |
include("scripts/File/File.js"); | |
include("scripts/EAction.js"); | |
include("scripts/Tools/arguments.js"); | |
include("scripts/sprintf.js"); | |
include("scripts/simple.js"); | |
function dbg(text){ | |
var toLog = "Krokus::" + text; | |
qDebug( toLog ); | |
}; | |
Krokus.prototype = new EAction(); | |
function Krokus(guiAction) { | |
EAction.call(this, guiAction); | |
dbg("init called"); | |
this.setUiOptions("Krokus.ui"); | |
dbg("init setUiOptions called"); | |
}; | |
Krokus.prototype = new EAction(); | |
Krokus.prototype.beginEvent = function() { | |
qDebug("Krokus - entering beginEvent"); | |
EAction.prototype.beginEvent.call(this); | |
EAction.handleUserMessage("rysowanie linii!"); | |
// create a document: | |
var doc = EAction.getDocument(); | |
// add something to the document: | |
startTransaction(doc); | |
addLine(0,0, 100,100); | |
endTransaction(); | |
// export the document to a DXF file: | |
// var di = new RDocumentInterface(doc); | |
// di.exportFile("qcad_createdrawing.dxf"); | |
}; | |
function addLine(doc) { | |
startTransaction( doc ); | |
addLine(0,0, 100, 100); | |
endTransaction(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment