Code: Select all
MyGCode.prototype.postInitDialog = function(obj, dialog, di, obj) {
var w;
if (dialog.objectName==="CamProfileToolpathDialog") {
w = dialog.findChild("CamSpindleSpeed_Label");
w.visible = false;
w = dialog.findChild("CamSpindleSpeed");
w.visible = false;
w = dialog.findChild("CamSpindleSpeed_Unit");
w.visible = false;
w = dialog.findChild("CamPlungeRate_Label");
w.visible = false;
w = dialog.findChild("CamPlungeRate");
w.visible = false;
w = dialog.findChild("CamFeedRate_Label");
w.visible = false;
w = dialog.findChild("CamFeedRate");
w.visible = false;
w = dialog.findChild("CuttingDepths_Group");
w.visible = false;
var group = dialog.findChild("Toolpath_Group");
QGridLayout = group.layout();
var Cuttingmode_Label = new QLabel(qsTr("Cutting Mode"));
Cuttingmode_Label.objectName = "CamCuttingMode_Label";
QGridLayout.addWidget(Cuttingmode_Label,2,0);
var Cuttingmode = new QComboBox();
Cuttingmode.editable = false;
Cuttingmode.objectName = "CamCuttingMode";
Cuttingmode.addItem("NC");
Cuttingmode.addItem("LC");
Cuttingmode.addItem("TC");
Cuttingmode.addItem("MR");
Cuttingmode.addItem("FB");
QGridLayout.addWidget(Cuttingmode,2,1);
}
if (dialog.objectName==="CamToolDialog") {
w = dialog.findChild("CamSpindleSpeed_Label");
w.visible = false;
w = dialog.findChild("CamSpindleSpeed_Unit");
w.visible = false;
w = dialog.findChild("CamSpindleSpeed");
w.visible = false;
w.setValue(1);
w = dialog.findChild("CamFeedRate_Label");
w.visible = false;
w = dialog.findChild("CamFeedRate");
w.visible = false;
w.setValue(1);
w = dialog.findChild("CamPlungeRate_Label");
w.visible = false;
w = dialog.findChild("CamPlungeRate");
w.visible = false;
w.setValue(1);
}
};
Could you please help me with this? Thanks
BTW, I am using the version: 3.28.1.0