Now all escaping required for the C++ code generation is done when the .cpp/.h files are generated. Previously, only newlines were escaped automatically. This was a) inconsistent and b) leaked c++ details into the xml data. In addition, the escaping is now done in one central place, harmonizing the three previous implementations. Pre-existing c++ escape sequences in the XML files have been replaced by their literal equivalent so that the resulting python doc sting remains unchanged.
158 lines
4.5 KiB
XML
158 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
|
<PythonExport
|
|
Father="PyObjectBase"
|
|
Name="CommandPy"
|
|
Twin="Command"
|
|
TwinPointer="Command"
|
|
Include="Gui/Command.h"
|
|
FatherInclude="Base/PyObjectBase.h"
|
|
Namespace="Gui"
|
|
FatherNamespace="Base">
|
|
<Documentation>
|
|
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer[at]users.sourceforge.net" />
|
|
<UserDocu>FreeCAD Python wrapper of Command functions</UserDocu>
|
|
</Documentation>
|
|
<Methode Name="get" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>get(name) -> Gui.Command or None
|
|
|
|
Get a given command by name or None if it doesn't exist.
|
|
|
|
name : str
|
|
Command name.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="update" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>update() -> None
|
|
|
|
Update active status of all commands.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="listAll" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>listAll() -> list of str
|
|
|
|
Returns the name of all commands.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="listByShortcut" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>listByShortcut(string, useRegExp=False) -> list of str
|
|
|
|
Returns a list of all commands, filtered by shortcut.
|
|
Shortcuts are converted to uppercase and spaces removed
|
|
prior to comparison.
|
|
|
|
string : str
|
|
Shortcut to be searched.
|
|
useRegExp : bool
|
|
Filter using regular expression.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="run">
|
|
<Documentation>
|
|
<UserDocu>run(item=0) -> None
|
|
|
|
Runs the given command.
|
|
|
|
item : int
|
|
Item to be run.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="isActive" Const="true">
|
|
<Documentation>
|
|
<UserDocu>isActive() -> bool
|
|
|
|
Returns True if the command is active, False otherwise.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getShortcut">
|
|
<Documentation>
|
|
<UserDocu>getShortcut() -> str
|
|
|
|
Returns string representing shortcut key accelerator for command.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="setShortcut">
|
|
<Documentation>
|
|
<UserDocu>setShortcut(string) -> bool
|
|
|
|
Sets shortcut for given command, returns True for success.
|
|
|
|
string : str
|
|
Shortcut to be set.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="resetShortcut">
|
|
<Documentation>
|
|
<UserDocu>resetShortcut() -> bool
|
|
|
|
Resets shortcut for given command back to the default, returns True for success.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getInfo">
|
|
<Documentation>
|
|
<UserDocu>getInfo() -> dict
|
|
|
|
Return information about this command.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getAction">
|
|
<Documentation>
|
|
<UserDocu>getAction() -> list of QAction
|
|
|
|
Return the associated QAction object.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="createCustomCommand" Static='true' Keyword='true'>
|
|
<Documentation>
|
|
<UserDocu>createCustomCommand(macroFile, menuText, toolTip, whatsThis, statusTip, pixmap, shortcut) -> str
|
|
|
|
Create a custom command for a macro. Returns name of the created command.
|
|
|
|
macroFile : str
|
|
Macro file.
|
|
menuText : str
|
|
Menu text. Optional.
|
|
toolTip : str
|
|
Tool tip text. Optional.
|
|
whatsThis : str
|
|
`What's this?` text. Optional.
|
|
statusTip : str
|
|
Status tip text. Optional.
|
|
pixmap : str
|
|
Pixmap name. Optional.
|
|
shortcut : str
|
|
Shortcut key sequence. Optional.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="removeCustomCommand" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>removeCustomCommand(name) -> bool
|
|
|
|
Remove the custom command if it exists.
|
|
Given the name of a custom command, this removes that command.
|
|
It is not an error to remove a non-existent command, the function
|
|
simply does nothing in that case.
|
|
Returns True if something was removed, or False if not.
|
|
|
|
name : str
|
|
Command name.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="findCustomCommand" Static='true'>
|
|
<Documentation>
|
|
<UserDocu>findCustomCommand(name) -> str or None
|
|
|
|
Given the name of a macro, return the name of the custom command for that macro
|
|
or None if there is no command matching that macro script name.
|
|
|
|
name : str
|
|
Macro name.</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
</PythonExport>
|
|
</GenerateModel>
|