Editor window
A ready-made main window with menus, file handling and the editor widget inside it.
nodeeditor.node_editor_window ¶
A module containing the Main Window class
NodeEditorWindow ¶
Bases: QMainWindow
The Main Window of NodeEditor.
Holds the file and edit menus, the actions behind them and the
:class:~nodeeditor.node_editor_widget.NodeEditorWidget that draws the graph.
:Instance Attributes:
- name_company - name of the company, used for permanent profile settings
- name_product - name of this App, used for permanent profile settings
NodeEditorWidget_class
class-attribute
instance-attribute
¶
Class representing NodeEditor's Main Window
initUI ¶
Set up this QMainWindow. Create :class:~nodeeditor.node_editor_widget.NodeEditorWidget, Actions and Menus
sizeHint ¶
The preferred size of the main window.
:return: the default window size
:rtype: QSize
createStatusBar ¶
Create Status bar and connect to Graphics View scenePosChanged event
createEditMenu ¶
Create the Edit menu and fill it with the edit and grouping actions
isModified ¶
Has current :class:~nodeeditor.node_scene.Scene been modified?
:return: True if current :class:~nodeeditor.node_scene.Scene has been modified
:rtype: bool
getCurrentNodeEditorWidget ¶
get current :class:~nodeeditor.node_editor_widget
:return: get current :class:~nodeeditor.node_editor_widget
:rtype: :class:~nodeeditor.node_editor_widget
maybeSave ¶
If current Scene is modified, ask a dialog to save the changes. Used before
closing window / mdi child document
:return: True if we can continue in the Close Event and shutdown. False if we should cancel
:rtype: bool
onScenePosChanged ¶
Handle event when cursor position changed on the Scene
:param x: new cursor x position :type x: :param y: new cursor y position :type y:
getFileDialogDirectory ¶
Returns starting directory for QFileDialog file open/save
getFileDialogFilter ¶
Returns str standard file open/save filter for QFileDialog
onBeforeSaveAs ¶
Event triggered after choosing filename and before actual fileSave(). We are passing current_nodeeditor because we will loose focus after asking with QFileDialog and therefore getCurrentNodeEditorWidget will return None