From e5c144566fa96758959deeb91f95f14a69ff9073 Mon Sep 17 00:00:00 2001 From: flachyjoe Date: Sat, 17 Apr 2021 22:46:07 +0200 Subject: [PATCH] Documents CommandPy.xml and DocumentPy.xml --- src/Gui/CommandPy.xml | 58 +++++------ src/Gui/DocumentPy.xml | 224 ++++++++++++++++++++++------------------- 2 files changed, 147 insertions(+), 135 deletions(-) diff --git a/src/Gui/CommandPy.xml b/src/Gui/CommandPy.xml index 410be417fb..cd8a188438 100644 --- a/src/Gui/CommandPy.xml +++ b/src/Gui/CommandPy.xml @@ -1,8 +1,8 @@ - - get(string) -> Command - -Get a given command by name or None if it doesn't exist. + Get a given command by name or None if it doesn't exist. +get(string) -> Command - update() -> None - -Update active status of all commands. + Update active status of all commands. +update() -> None - listAll() -> list of strings - -Returns the name of all commands. + Returns the name of all commands. +listAll() -> list of strings - listByShortcut(string, bool bUseRegExp=False) -> list of strings - -Returns a list of all commands, filtered by shortcut. + Returns a list of all commands, filtered by shortcut. +listByShortcut(string, bool bUseRegExp=False) -> list of strings +-- Shortcuts are converted to uppercase and spaces removed prior to comparison. - run() -> None - -Runs the given command. + Runs the given command. +run() -> None - isActive() -> bool - -Returns True if the command is active, False otherwise. + Returns True if the command is active, False otherwise. +isActive() -> bool - getShortcut() -> string - -Returns string representing shortcut key accelerator for command. + Returns string representing shortcut key accelerator for command. +getShortcut() -> string - setShortcut(string) -> bool - -Sets shortcut for given command, returns bool True for success. + Sets shortcut for given command, returns bool True for success. +setShortcut(string) -> bool - resetShortcut() -> bool - -Resets shortcut for given command back to the default, returns bool True for success. + Resets shortcut for given command back to the default, returns bool True for success. +resetShortcut() -> bool - getInfo() -> list of strings - + Return information about this command. +getInfo() -> list of strings +-- Usage: menuText, tooltipText, whatsThisText, statustipText, pixmapText, shortcutText. - getAction() -> list of QAction + Return the associated QAction object. +getAction() -> list of QAction diff --git a/src/Gui/DocumentPy.xml b/src/Gui/DocumentPy.xml index db7c950ffe..29da86eb2d 100644 --- a/src/Gui/DocumentPy.xml +++ b/src/Gui/DocumentPy.xml @@ -1,13 +1,13 @@ - @@ -15,148 +15,166 @@ - Show the object + Show the object +show() -> None + - Hide the object + Hide the object +hide() -> None + - Set the position + Set the position +setPos(matrix) -> None - - setEdit([String:Name|ViewProvider|DocumentObject]|,mod,subname=None) - Set the given object in edit mode. - + Set the given object in edit mode. +setEdit([String:Name|ViewProvider|DocumentObject]|,mod,subname=None) -> Bool + - - getInEdit() - Returns the current object in edit mode or None if there is no such object - + Returns the current object in edit mode or None if there is no such object +getInEdit() -> Object or None + - - Reset (end) the current editing. + Reset (end) the current editing. +resetEdit() -> None - Add an Inventor object + Add an Inventor object +addAnnotation(AnnoName,FileName,[ModName]) -> None + - Update the view representations of all objects + Update the view representations of all objects +update() -> None + - Return the object with the given name + Return the object with the given name +getObject(Name) -> Object or None - - - deprecated -- use ActiveObject - - - + + + deprecated -- use ActiveObject + + + deprecated -- use ActiveView - - - Return a list if mdi views of a given type - - - - - Send a message to all views of the document - - - - - Merges this document with another project file - - - - - toggleTreeItem(DocObject,int=0) - change TreeItem of a document object 0:Toggle,1:Collaps,2:Expand - - - - - scrollToTreeItem(ViewObject) - scroll the tree view to the item of a view object - - - - - -toggleInSceneGraph(ViewObject) - -Add or remove view object from scene graph of all views depending on its canAddToSceneGraph() - - - - - - The active object of the document - - - - - - The active view of the document - - - - - - The editing transformation matrix - - - + + + Return a list if mdi views of a given type +mdiViewsOfType(type) -> list of MDIView + + + + + + Send a message to all views of the document +sendMsgToViews(msg) -> None + + + + + + Merges this document with another project file +mergeProject(filename) -> None + + + + + + Change TreeItem of a document object. +toggleTreeItem(DocObject,[flag=0]) -> None +-- +flag can be 0:Toggle, 1:Collaps, 2:Expand + + + + + + scroll the tree view to the item of a view object +scrollToTreeItem(ViewObject) -> None + + + + + + Add or remove view object from scene graph of all views depending on its canAddToSceneGraph() +toggleInSceneGraph(ViewObject) -> None + + + + + + The active object of the document + + + + + + The active view of the document + + + + + + The editing transformation matrix + + + A tuple(obj,subname,subElement,editMode) of editing object reference, or None if no object is in edit - + Current edit mode. Only meaningful when there is a current object in edit - + - - - The related App document to this Gui document - - - - - - Indicate whether the document is undoing/redoing - - - - - - Returns True if the document is marked as modified, and False otherwise - - - - + + + The related App document to this Gui document + + + + + + Indicate whether the document is undoing/redoing + + + + + + Returns True if the document is marked as modified, and False otherwise + + + +