OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb

Dragonfly main context

author:ORS Team
contact:http://theobjects.com
email:info@theobjects.com
organization:Object Research Systems (ORS), Inc.
address:460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7
copyright:Object Research Systems (ORS), Inc. All rights reserved 2021.
date:Nov 18 2019 09:49
dragonflyVersion:
 4.5.0.711 (D)
UUID:ad5ab0000a1211ea9cb6309c235e8fdb

Class Code

class OrsPythonPlugins.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb(varName=None)
UIDescriptors = [<ORSServiceClass.OrsPlugin.uidescriptor.UIDescriptor object>]
canBeGenericallyOpened = False
classmethod getContextName()
getIsObjectAvailable(anObject)

Gets to know if the object is available in the context.

Parameters:anObject (ORSModel.ors.Managed) – an object
Return:True if the object is available in the context; False otherwise.
Rtype:bool
classmethod getMainFormClass()

Gets the class of the main form

Returns:output
keepAlive = False
modalContext = False
multiple = False
openWidget(name, dock=None, tab=None, x=-1, y=-1, w=-1, l=-1, order=-1, show=True)

Instantiates the widget with the provided name. This is done only if it is not already instantiated.

Parameters:
  • name (str) – name of the widget to instantiate
  • dock (str) – docking location in the main window (left, right, top, bottom, center, floating)
  • tab (str) – name of the tab to dock in
  • x (int) – position of top left corner of window in x. Use -1 for default value.
  • y (int) – position of top left corner of window in y. Use -1 for default value.
  • w (int) – width of window. Use -1 for default value.
  • l (int) – height of window. Use -1 for default value.
  • order (int.) – position of widget in docking location. Use -1 to put at the end.
  • show (bool) – if True, the form is also shown after being instantiated. If the form already exists, a “raise” is done. If False, no call to show the form is made.
privateObjects = False
restrictPlugins = False
savable = True
setupContext(openMainForm=True)

Performs the tasks to setup the context. This is normally done after the instantiation of the main plugin in context and setting his state.

These are the usual tasks:

  • instantiate all required plugins;
  • define context restrictions (actions, states, …);
  • open the main window with the mainform of the main plugin in context and all plugin forms
    (if openMainForm is True);
  • initialize the menu (if wanted);
  • perform any other task to initialize the context (configure views, text presenters, …).
Parameters:openMainForm (bool) – True to use the forms; False otherwise.
classmethod startupWithFreePluginsAndUserStartup(openMainForm=True)