moduleRestoreState()

Restores the settings of the mainwindows toolbars and dockwidgets from a blob.

Synopsis

int moduleSetAction(blob state);

Parameters

Parameter Description
state The current state of the mainmodule.

Return value

If the state can not be restored (e.g. data in the blob can not be used/wrong format/...), the function returns -1, else 0.

Error

Erroneous data in the blob.

Description

The function restores the state of this mainwindow's toolbars and dockwidgets. As for moduleSaveState(), this does not restore the window size.

The mainwindow is either a Module window or a script editor window. The function can only be used in the context where there is a main window, e.g. not in an embedded module. (This is the same rule that applies to moduleAddDockModule().)

Assignment

Miscellaneous functions

Availability

UI