Custom Tabs¶
-
class
UI4.Tabs.BaseTab(parent, flags=0)¶ Bases:
UI4.Widgets.BaseWidgets.BaseFrameBase class for all UI tabs.
Inherits from
BaseFrameto provide handling of custom callbacks for actions and key events that are associated with user-defined keyboard shortcuts, and provides functions for storing and restoring settings per tab when loading and saving tab layouts.-
__init__(parent, flags=0)¶ Initializes an instance of the class.
Parameters: - parent (
QtWidgets.QWidgetorNone) – The parent widget to own the new instance. Passed verbatim to the base class initializer. - flags (
QtCore.Qt.WindowFlags) – The window flags to use in case no parent is given. Passed wrapped inQtCore.Qt.WindowFlags()to theBaseFramebase class initializer.
- parent (
-
applySettings(settings)¶ Applies the given settings to the tab.
Is called when creating a tab of the type represented by a class derived from
BaseTab.Parameters: settings ( dict) – A dictionary of settings to apply to this tab.Note: The default implementation does nothing.
-
closeEvent(event)¶ This event handler is called with the given event when the tab receives a window close request. A signal is emitted when the tab gets closed which would then a child widget could pick up to unregister any of its registered event handlers.
Parameters: event ( QtGui.QCloseEvent) – Event sent to widgets that the user wants to close.
-
getMenuBar()¶ Return type: QtWidgets.QMenuBarorNoneReturns: The tab’s menu bar, or Noneif the tab does not provide a menu bar.
-
getSettings()¶ Return type: dictReturns: A dictionary of settings that should be stored and restored as part of a tab layout. Note: The default implementation returns an empty dictionary.
-
getTabTitle()¶ Return type: strorNoneReturns: A specific title to use for this tab, or Noneto use a title that matches the type of the tab.
-
tabClosed¶
-