OrsObjectPropertiesList¶
Manages the object properties panel on the right-hand side of the application
- author:
Dragonfly Team
- contact:
- email:
- organization:
Comet Technologies Canada Inc.
- address:
460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7
- copyright:
Comet Technologies Canada Inc. All rights reserved 2023.
- date:
Oct 01 2015 16:56
- dragonflyVersion:
3.0
- UUID:
d6f287f4761811e78bbd448a5b5d70c0
Class Code¶
- class OrsPythonPlugins.OrsObjectPropertiesList.OrsObjectPropertiesList.OrsObjectPropertiesList(*args, **kwargs)¶
- addPropertyWidgetToIgnore(className)¶
In certain contexts, properties of an object should not be displayed. Add the class object representing the OrsProperties to ignore
- Parameters:
className – str
- Return:
- cleanup()¶
Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.
- classmethod exportItemsAsMultipleORSObject(selectedItems)¶
Queries the user for an export folder, and exports the objects to the file :return: Nothing
- interfacemethod exportItemsToCSV(selectedItems: List[Managed], exportData3d: bool = True) None¶
Queries the user for an export file, and exports the objects to the file
- Parameters:
selectedItems (ORSModel.ors.Managed) [count=[1, None]] – a list of objects
exportData3d (bool) – allow or not export of selected items data in 3d
- classmethod exportItemsToCSVFromGUIDs(selectedGUIDs, exportData3d)¶
Queries the user for an export file, and exports the objects to the file
- Parameters:
selectedGUIDs (str) – a list of selected guid
exportData3d (bool) – allow or not export of selected items data in 3d
- interfacemethod exportORSObjectsInFile(objectsToExport: List[Managed], filename: str, compressionEngine: CompressionEngine = CompressionEngine.NONE) None¶
Saves a list of objects in a single .ORSObject file
- Parameters:
objectsToExport (ORSModel.ors.Managed) [count=[0, None]] – list of objects
filename (file saving) – file name with .ORSObject extension
compressionEngine (IntEnum CompressionEngine) – compressionEngine for export file
- Anonymize filename:
True
- classmethod getClassNamesCanExportData(class_names)¶
Ensures that all class names given can be exported to CSV
- Parameters:
class_names – list of class names
- Returns:
output – Bool
- getClassname(anObjectGUID)¶
Gets the class name of an object
- Parameters:
anObjectGUID (str) – an object GUID
- Return:
class name
- Rtype:
str
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
- getPluginExtendedInfrastructureClassInstance(pluginExtendedInfrastructureClass)¶
Gets the instance associated to the plugin extended infrastructure class.
- Parameters:
pluginExtendedInfrastructureClass (plugin extended infrastructure class) – a plugin extended infrastructure class supported by the plugin
- Return:
an instance of the plugin extended infrastructure class
- Rtype:
instance of plugin extended infrastructure class
- classmethod getPluginExtendedInfrastructureClasses()¶
Gets the list of the supported plugin extended infrastructure classes of the plugin.
- Returns:
output (list of classes) – list of the plugin extended infrastructure classes
- getState()¶
This method is called when saving a plugin instance in a session to obtain the information required to set up the plugin at the loading of the session.
The plugin needs to be savable (see
ORSServiceClass.OrsPlugin.abstractPlugin.AbstractPlugin.savable).- Return:
a string of information that will be sent back to the setState method
- Rtype:
str
Note
The usage of the character
"is not permitted, unless escaped.
- handleChanged(oldState, newState)¶
This method is called when the state of the application is changed.
- Parameters:
oldState (str) – name of the old (previous) state
newState (str) – name of the new (current) state
- handleTriggered(eventData)¶
This method is called on every user input (mouse move, mouse click, key press, …) when the current state of the application is one of those declared by the plugin. This method can be used to perform specific tasks even if no action is currently in progress.
- Parameters:
eventData (OrsEvent.eventdata.InputEventData) – the event data
- classmethod importAllLoggingClasses()¶
This method is called to make any class extension available for macro playing. It should:
import all class extension;
return a list of classes where logging is supported.
- Returns:
output (list of classes) – list of classes where logging is supported by the current plugin
- interfacemethod importORSObjectsFromFile(fname: str, progress: Progress) List[Managed]¶
Import ORS objects from file
Deprecated since version 3.5: Use importORSObjectsFromFileAndPublish.
- Parameters:
fname (file) – a filename
progress (ORSModel.ors.Progress) – a progress bar
- Returns:
importedObjects (ORSModel.ors.Managed) [count=[0, None]] – imported objects
- interfacemethod importORSObjectsFromFileAndPublish(filenames: List[str], progress: Progress = None, useOnceSliceChannels: bool = False) List[Managed]¶
Import ORS objects from file and publish them
- Parameters:
filenames (file) [count=[1, None]] – list of filenames
progress (ORSModel.ors.Progress) – a progress bar
useOnceSliceChannels (bool) – publish every slice as separate images
- Anonymize filenames:
True
- Returns:
importedObjects (ORSModel.ors.Managed) [count=[0, None]] – imported objects
- importSelectedObjects()¶
Queries the user for an import file, opens a GUI to let the user select which objects to import, and then imports the objects selected from the file :return: results: imported objects :rtype results: Optional[List[str]]
- interfacemethod importSpecificObjectsFromFileAndPublish(fname: str, guids: List[str], progress: Progress = None, useOnceSliceChannels: bool = False) List[Managed]¶
Import specific objects from file and publish them
- Parameters:
fname (file) – filename
guids (str) [count=[1, None]] – list of strings of the objects GUIDs to import
progress (ORSModel.ors.Progress) – a progress bar
useOnceSliceChannels (bool) – publish every slice as separate images
- Anonymize fname:
True
- Returns:
importedObjects (ORSModel.ors.Managed) [count=[0, None]] – imported objects
- moveObjects(listObjectsToMove, listObjectsDisplayed, insertionIndex)¶
Reorders the list of objects at the specified insertion index.
- Parameters:
listObjectsToMove (ORSModel.ors.Managed) – objects to reorder
listObjectsDisplayed (ORSModel.ors.Managed) – objects currently displayed
insertionIndex (int) – insertion index
- Count listOrsObjectsToMove:
[0, None]
- Count listObjectsDisplayed:
[0, None]
- postLoadSession()¶
Placeholder for code that needs to get executed when a session is loaded. Note that this method is called at the very end of the process, when the model has been restored, plugins have been instantiated and the workspace has been restored.
- postOrsObjectPropertiesListTriggeringChanges(anObject)¶
Informs the object ordering model that changes caused by the current plugin are done
- Parameters:
anObject (ORSModel.ors.Managed) – object subject to changes
- preOrsObjectPropertiesListTriggeringChanges(anObject)¶
Informs the object ordering model that changes caused by the current plugin are expected
- Parameters:
anObject (ORSModel.ors.Managed) – object subject to changes
- prePublishInSession()¶
Placeholder for code that needs to get executed when a session is loaded, before the object model gets published. Note that this method is called after all plugins have been created.
- refreshUIFromModel()¶
Calls the UI to be updated based on the implementation
- removePropertyWidgetFromIgnore(className)¶
Remove the widget class from the ignore list :param className: str :return:
- setState(state)¶
This method is called to set up the plugin when loading a session.
Note
This method is called only if the string returned by
ORSServiceClass.OrsPlugin.orsPlugin.OrsPlugin.getState()at the saving of the session was not empty.- Parameters:
state (str) – string of information as provided by the getState during the saving of the session