mainwindow — Main window of the UI. Fills main menu.¶
Module contains enki.core.mainwindow.MainWindow implementation
-
class
enki.core.mainwindow.MainWindow¶ Bases:
QMainWindowMain UI window
Class creates window elements, fills main menu with items.
If you need to access to some existing menu items - check action path in the class constructor, than use next code:
core.actionManager().action("mFile/aOpen").setEnabled(True) core.actionManager().action("mFile/aOpen").triggered.connect(self.myCoolMethod)
MainWindow instance is accessible as:
from enki.core.core import core core.mainwindow()
Created by the core
-
hideAllWindows¶ hideAllWindows()
Signal emitted, when user toggled “Hide all” . Dock widgets are closed automatically, but other widgets, i.e. search widget, must catch this signal and close themselves.
-
directoryDropt¶ directoryDropt()
Signal emitted, when user drag-n-dropt directory to main windowd. FileBrowser shows directory
-
del_()¶ Explicitly called destructor
-
menuBar()¶ Reference to menuBar
-
topToolBar()¶ Top tool bar. Contains main menu, position indicator, etc
-
statusBar()¶ Return main window status bar. It is located on the top tool bar
-
setWorkspace(workspace)¶ Set central widget of the main window. Normally called only by core when initializing system
-
defaultTitle()¶ Default title. Contains name and version
-
centralLayout()¶ Layout of the central widget. Contains Workspace and search widget
-
appendMessage(text, timeoutMs=10000)¶ Append message to the queue. It will be shown as non-modal at the bottom of the window. Use such notifications, which are too long or too important for status bar but, not so important, to interrupt an user with QMessageBox
-
closeEvent(event)¶ NOT A PUBLIC API Close event handler. Shows save files dialog. Cancels close, if dialog was rejected
-
loadState()¶ Restore window state from main_window_state.bin and config. Called by the core after all plugins had been initialized
-
sizeHint()¶
-
dragEnterEvent(event)¶ QMainWindow method reimplementation. Say, that we are ready to accept dragged urls
-
dropEvent(event)¶ QMainWindow method reimplementation. Open dropt files
-
addDockWidget(area, dock)¶
-
removeDockWidget(dock)¶
-
restoreState(state)¶
-