nodedge.mdi_window

Multi Document Interface window module containing MdiWindow class.

class nodedge.mdi_window.MdiWindow

Bases: nodedge.editor_window.EditorWindow

MdiWindow class.

The mdi window is the main window of Nodedge.

Instance Attributes

  • name_company - name of the company, used for permanent profile settings

  • name_product - name of this App, used for permanent profile settings

property currentEditorWidget

Property representing the EditorWidget of the active sub-window.

Note

This property cannot be set.

Type

EditorWidget

initUI() → None

Set up this QMainWindow.

Create the mdi area, actions and menus

createStatusBar() → None

Create the status bar describing Nodedge status and the mouse position.

createActions() → None

Create File, Edit and About actions.

createToolBars() → None

Create the File and Edit toolbar containing few of their menu actions.

createMenus() → None

Create Window and Help menus.

Window menu allows to navigate between the sub-windows. Help menu allows to display know more about Nodedge.

createHomeMenu()
openHome()
createHelpMenu() → None

Create help menu, containing about action.

createWindowMenu() → None

Create window menu, containing window navigation actions.

updateMenus() → None

Update menus accordingly to the presence or not of sub-window in the editor, enabling and disabling file manipulation actions, for example.

updateFileMenu() → None

Update file menu.

updateWindowMenu() → None

Update window menu.

updateEditMenu() → None

Update edit menu.

onSubWindowClosed(widget: nodedge.editor_widget.EditorWidget, event: PySide2.QtGui.QCloseEvent) → None

Slot called when sub window is being closed.

Parameters
  • widget (EditorWidget) –

  • event (QCloseEvent.py) –

findMdiSubWindow(filename: str) → Optional[PySide2.QtWidgets.QMdiSubWindow]

Find the sub window containing the file which name has been given as parameter.

Parameters

filename – the filename to be looked for

Returns

The sub window containing the appropriate file

Return type

QMdiSubWindow

setActiveSubWindow(window: PySide2.QtWidgets.QMdiSubWindow) → None

Setter for active sub window.

Parameters

window (QMdiSubWindow) –

Returns

createNodesDock() → None

Create Nodes dock.

createHistoryDock() → None

Create history dock.

createSceneItemsDock() → None

Create scene items dock.

createPythonConsole() → None

Create a python console embedded in a dock. :return: None

closeEvent(event: PySide2.QtGui.QCloseEvent) → None

Qt’s close event handle.

Parameters

event (QCloseEvent.py) – close event

Returns

None

newFile() → PySide2.QtWidgets.QMdiSubWindow

New file.

Create a new sub window and show it.

Returns

None

openFile(filenames: Any) → None

Open fileS. TODO: Rename openFile function as it can open several files.

Parameters

filenames (Optional[bool, str, List[str]]) – TODO

Returns

None

about() → None

About slot.

Shows a message box with more information about Nodedge.

Returns

None

onNodesToolbarTriggered() → None

Slot called when the nodes toolbar has been triggered.

Returns

None

addCurrentEditorWidgetChangedListener(callback) → None

Add a callback to current widget changed listener.

Parameters

callback

Returns

onSubWindowActivated() → None

Slot called when a sub window is activated.

Returns

None

checkStylesheet() → None

Helper function which checks if the stylesheet exists and has changed.

showItemsInStatusBar(items: List[str])

Slot triggered when an item has been selected. Shows the class names of the selected items in the status bar.

Parameters

items (List[str]) – selected items

onDebugSwitched()

Event called when the debug action is triggered.

onShowDialogActions()
staticMetaObject = <PySide2.QtCore.QMetaObject object>