// CANVIA A TIPUS DE LINIA NR. 1 :: // afegeix a menús... include("../DFa.js"); function lineweight1(guiAction) { DFa.call(this, guiAction); } // definim funció :: lineweight1.prototype = new DFa(); lineweight1.prototype.beginEvent = function() { DFa.prototype.beginEvent.call(this); var di = this.getDocumentInterface(); var document = this.getDocument(); //// objectsOperation Start::: var op = new RModifyObjectsOperation(); document.setCurrentLineweight(13); // aquí es posa gruix de capa. //// objectsOperation End::: di.applyOperation(op); // loop for all layer ends this.terminate(); }; // Add command for this action:: lineweight1.init = function(basePath) { var action = new RGuiAction(qsTr("lineweight1"), RMainWindowQt.getMainWindow()); action.setRequiresDocument(true); action.setScriptFile(basePath + "/lineweight1.js"); action.setDefaultCommands(["lineweight1"]); action.setDefaultShortcut(new QKeySequence("w,1")); action.setGroupSortOrder(78100); action.setSortOrder(200); action.setWidgetNames(["DFaMenu"]); };