Application: * signalNewDocument, check the extra argument, isMainDoc, the decide whether to create view of the new document. This is so that external linked document can be opened in background without crowding the tab list. * slotDeleteDocument, calls Document::beforeDelete() * slotActiveDocument, creates view if none, because external document is now opened without view. * onLastWindowClosed(), switch to next active document, and creates view if none. * send(Has)MsgToFocusView(), new API to send message to the active view in focus. This is to solve the ambiguity of things like pressing delete key, copy, paste handling when the active new is not in focus. For example, when spread sheet view is active, delete/copy/paste handling should be different when the focus on the spread sheet view or focus on tree view. * tryClose(), delegate to MainWindow for close confirmation * reopen(), new API to reload a partial document in full Document/DocumentP: * _CoinMap, new internal map for quick access view provider from its root node. * slotNewObject, modified to support view provider override from App::FeaturePython, through new API DocumentObject::getViewProviderNameOverride(). * slotDeletedObject/slotTransactionRemove, improve handling of geo group children rebuild * slotSkipRecompute, add special handling of document with skip recompute. Some command cannot work when skip recompute is active. For example, sketcher command will check if recompute is successful on many commands, and will undo if not. New 'PartialCompute' flag is added to allow recompute only the editing object and all its dependencies if 'SkipRecompute' is active. * slotTouchedObject, new signal handling of manually touched object. * setModified(), do nothing if already modified. This is a critical performance improvement, because marking tab window as modified turns out to be a relatively expensive operation, and will cause massive slow down if calling it on every property change. * getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to obtain view provider(s) from coin SoPath. * save/saveAll/saveCopy, modified to support external document saving. * Save/RestoreDocFile(), save and restore tree item recursive expansion status. * slotFinishRestoreObject(), handle new signal signalFinishRestoreObject(), unifies postprocessing in restore and import operation. * createView/setActiveView(), add support of delayed view creations * canClose(), delegate to MainWindows to ask for confirmation * undo/redo(), support grouped transaction undo/redo. Transactions may be grouped by the same transaction ID if they are triggered by a single operation but involves objects from multiple documents. * toggleInSceneGraph(), new API to add or remove root node from or to scenegraph without deleting the view object. MainWindow: * Update command status using a single shot timer instead of periodical one. * Improve message display is status bar. Give error and warning message higher priority (using QStatusBar::showMessage()) than normal status message (using actionLabel), reversed from original implementation. * confirmSave(), new API to check for modification, and ask user to save the document before closing. The confirmation dialog allows user to apply the answer to all document for convenience. * saveAll(), new API to save all document with correct ordering in case of external linking. * createMimeDataFromSelection/insertFromMimeData(), support copy paste object with external linking. A new dialog DlgObjectSelection is used to let user select exactly which object to export. CommandDoc/CommandWindow: * Related changes to object delete, document import, export, and save.
163 lines
5.5 KiB
XML
163 lines
5.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="PersistencePy"
|
|
Name="DocumentPy"
|
|
Twin="Document"
|
|
TwinPointer="Document"
|
|
Include="Gui/Document.h"
|
|
Namespace="Gui"
|
|
FatherInclude="Base/PersistencePy.h"
|
|
FatherNamespace="Base">
|
|
<Documentation>
|
|
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
|
|
<UserDocu>This is a Document class</UserDocu>
|
|
</Documentation>
|
|
<Methode Name="show">
|
|
<Documentation>
|
|
<UserDocu>Show the object</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="hide">
|
|
<Documentation>
|
|
<UserDocu>Hide the object</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="setPos">
|
|
<Documentation>
|
|
<UserDocu>Set the position</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="setEdit">
|
|
<Documentation>
|
|
<UserDocu>
|
|
setEdit([String:Name|ViewProvider|DocumentObject]|,mod,subname=None)
|
|
Set the given object in edit mode.
|
|
</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getInEdit">
|
|
<Documentation>
|
|
<UserDocu>
|
|
getInEdit()
|
|
Returns the current object in edit mode or None if there is no such object
|
|
</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="resetEdit">
|
|
<Documentation>
|
|
<UserDocu>
|
|
Reset (end) the current editing.
|
|
</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="addAnnotation">
|
|
<Documentation>
|
|
<UserDocu>Add an Inventor object</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="update">
|
|
<Documentation>
|
|
<UserDocu>Update the view representations of all objects</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="getObject">
|
|
<Documentation>
|
|
<UserDocu>Return the object with the given name</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="activeObject">
|
|
<Documentation>
|
|
<UserDocu>deprecated -- use ActiveObject</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="activeView">
|
|
<Documentation>
|
|
<UserDocu>deprecated -- use ActiveView</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="mdiViewsOfType" Const="true">
|
|
<Documentation>
|
|
<UserDocu>Return a list if mdi views of a given type</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="sendMsgToViews">
|
|
<Documentation>
|
|
<UserDocu>Send a message to all views of the document</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="mergeProject">
|
|
<Documentation>
|
|
<UserDocu>Merges this document with another project file</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="toggleTreeItem">
|
|
<Documentation>
|
|
<UserDocu>toggleTreeItem(DocObject,int=0) - change TreeItem of a document object 0:Toggle,1:Collaps,2:Expand</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="scrollToTreeItem">
|
|
<Documentation>
|
|
<UserDocu>scrollToTreeItem(ViewObject) - scroll the tree view to the item of a view object</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Methode Name="toggleInSceneGraph">
|
|
<Documentation>
|
|
<UserDocu>
|
|
toggleInSceneGraph(ViewObject)
|
|
|
|
Add or remove view object from scene graph of all views depending on its canAddToSceneGraph()
|
|
</UserDocu>
|
|
</Documentation>
|
|
</Methode>
|
|
<Attribute Name="ActiveObject" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>The active object of the document</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="ActiveObject" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="ActiveView" ReadOnly="false">
|
|
<Documentation>
|
|
<UserDocu>The active view of the document</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="ActiveView" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="EditingTransform">
|
|
<Documentation>
|
|
<UserDocu>The editing transformation matrix</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="EditingTransform" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="InEditInfo">
|
|
<Documentation>
|
|
<UserDocu>A tuple(obj,subname,subElement,editMode) of editing object reference, or None if no object is in edit</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="InEditInfo" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="EditMode" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Current edit mode. Only meaningful when there is a current object in edit</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="EditMode" Type="Int" />
|
|
</Attribute>
|
|
<Attribute Name="Document" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>The related App document to this Gui document</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Document" Type="Object" />
|
|
</Attribute>
|
|
<Attribute Name="Transacting" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Indicate whether the document is undoing/redoing</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Transacting" Type="Boolean" />
|
|
</Attribute>
|
|
<Attribute Name="Modified" ReadOnly="true">
|
|
<Documentation>
|
|
<UserDocu>Returns True if the document is marked as modified, and False otherwise</UserDocu>
|
|
</Documentation>
|
|
<Parameter Name="Modified" Type="Boolean" />
|
|
</Attribute>
|
|
</PythonExport>
|
|
</GenerateModel>
|