// CANVIA A TIPUS DE LINIA NR. 2 :: // afegeix a menús... include("../DFa.js"); function linetype2(guiAction) { DFa.call(this, guiAction); } // definim funció :: linetype2.prototype = new DFa(); linetype2.prototype.beginEvent = function() { DFa.prototype.beginEvent.call(this); var di = this.getDocumentInterface(); var document = this.getDocument(); //// objectsOperation Start::: var op = new RModifyObjectsOperation(); document.setCurrentLinetype(2); // aquí es posa tipus de línia. // 0: by layer. 1: by block. 2: continua. 3: dot. 4: dash. 5: axis. 6: dash-dot. 7: dash-space. //// objectsOperation End::: di.applyOperation(op); // loop for all layer ends this.terminate(); }; // Add command for this action:: linetype2.init = function(basePath) { var action = new RGuiAction(qsTr("linetype2"), RMainWindowQt.getMainWindow()); action.setRequiresDocument(true); action.setScriptFile(basePath + "/linetype2.js"); action.setDefaultCommands(["linetype2"]); action.setDefaultShortcut(new QKeySequence("t,2")); action.setGroupSortOrder(78100); action.setSortOrder(200); action.setWidgetNames(["DFaMenu"]); };