without changing the cpp-code
I want to have my own symbol and shortcut,
something like this:
Code: Select all
tdCmdAlignment::StdCmdAlignment()
: Command("Std_Alignment")
{
// #+ hack
sGroup = QT_TR_NOOP("School");
// #-
sMenuText = QT_TR_NOOP("Alignment...");
sToolTipText = QT_TR_NOOP("Align the selected objects");
sStatusTip = QT_TR_NOOP("Align the selected objects");
sWhatsThis = "Std_Alignment";
// #+ hack
sPixmap = "irgendwo/Allign.svg";
sAccel = "Ctrl+A";
// #-
}
Or is it possible to derive a python class from this class and overwrite with my own attributes?
Code: Select all
class _CommandMyAllignment (tdCmdAlignment::StdCmdAlignment) :
"the School Alligment command definition"
def GetResources(self):
return {'Pixmap' : App.getHomePath() +'/Mod/School/icons/allign.svg',
'MenuText': 'Ausrichten',
'ToolTip': 'Richtet zwei Koerper aneinander aus ',
'Accel': 'Ctrl+A'
}
thomas.