windowclasses¶
These services support the usage of the windows (forms) of plugins and contexts.
Classes¶
OrsAbstractWindow¶
- class ORSServiceClass.windowclasses.orsabstractwindow.OrsAbstractWindow(implementation, parent=None)¶
- activateWindow(self)¶
- cleanup()¶
Deletes the variables managed by the plugin form. 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.
- closeEvent(event)¶
Request to close the form. A question might be asked to the user, if needed. By default, the event is accepted (
event.accept()) and the widget is closed. To accept the close request, leave the event as accepted and call super().closeEvent(). To ignore the close request, do “event.ignore()” and don’t call the super().closeEvent().- Parameters:
event (QCloseEvent) – close event
- tr(text)¶
Helper method to mimic how Qt behaves in the C++ side :param text: text to be translated :return: translated text
OrsAbstractMainPluginContextWindow¶
- class ORSServiceClass.windowclasses.orsabstractmainplugincontextwindow.OrsAbstractMainPluginContextWindow(implementation: OrsMainPluginContext, show=True)¶
Bases:
OrsAbstractWindow- closeEvent(event)¶
Request to close the form. A question might be asked to the user, if needed. By default, the event is accepted (
event.accept()) and the widget is closed. To accept the close request, leave the event as accepted and call super().closeEvent(). To ignore the close request, do “event.ignore()” and don’t call the super().closeEvent().- Parameters:
event (QCloseEvent) – close event
OrsAbstractWizardContextWindow¶
- class ORSServiceClass.windowclasses.orsabstractwizardcontextwindow.OrsAbstractWizardContextWindow(implementation: OrsAbstractWizardPlugin)¶
Bases:
OrsAbstractMainPluginContextWindowAbstract class to define a workflow using a wizard. This class inherits OrsAbstractMainPluginContextWindow as this wizard is running in its own context.
- on_wizardButtonBack_clicked()¶
Slot of the pushButton wizardButtonBack. The plugin implementation is requested at every command to make sure it still exists (as the plugin may be deleted during the page transition).
- on_wizardButtonNext_clicked()¶
Slot of the pushButton wizardButtonNext.
- updateAddWizardPage()¶
Updating the UI by adding the wizard page form.
- updateRemoveWizardPage()¶
Updating the UI by removing the wizard page form.
- updateUI()¶
Putting the proper wizard page in the wizard page layout. Updating the visibility and state of the main buttons (Back, Next, Close, …).
OrsAbstractWizardPageForm¶
- class ORSServiceClass.windowclasses.orsabstractwizardpageform.OrsAbstractWizardPageForm(wizardPageModel, parent=None)¶
Bases:
QWidget- cleanup()¶
Method called just before the destruction of the page. It is the place to delete referrers to that page that may prevent its deletion.
- initializePage()¶
This method is called to prepare the wizard page form just before it is shown.
- setCurrentGlobalState(newState)¶
Sets the current global state of the wizard context
- Parameters:
newState (str) – new state
- Returns:
globalStateChangeIsSuccessful (bool) – indicates if the change was successful
- showEvent(self, a0: Optional[QShowEvent])¶
- terminatePage()¶
This method is called to terminate the page after it is hidden.
- updateStateButtons(newState)¶
Method called to update the checked status (pressed or not) of the state buttons.
- Parameters:
newState (str) – name of the new (current) state