OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb¶
Dragonfly main context
- 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:
Nov 18 2019 09:49
- dragonflyVersion:
4.5.0.711 (D)
- UUID:
ad5ab0000a1211ea9cb6309c235e8fdb
Class Code¶
- class OrsPythonPlugins.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb.OrsDragonflyMainContext_ad5ab0000a1211ea9cb6309c235e8fdb(*args, **kwargs)¶
- getIsObjectAvailable(anObject)¶
Gets to know if the object is available in the context.
- Parameters:
anObject (ORSModel.ors.Managed) – an object
- Return:
Trueif the object is available in the context;Falseotherwise.- Rtype:
bool
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
- 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. IfFalse, no call to show the form is made.
- 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
openMainFormisTrue);
initialize the menu (if wanted);
perform any other task to initialize the context (configure views, text presenters, …).
- Parameters:
openMainForm (bool) –
Trueto use the forms;Falseotherwise.