Class Window
Build from Window.h
Krita 4.0.0Krita 5.2.0

Window represents one Krita mainwindow. A window can have any number of views open on any number of documents.

Methods

activate() activeView()View addView(document: Document)View close() createAction(id: str, text: str = "", menuLocation: str = "tools/scripts")QAction dockers()list[QDockWidget] qwindow()QMainWindow showView(view: View) views()list[View]

Signals

activeViewChanged() themeChanged() windowClosed()

Member documentation

Krita 4.0.0

activates this Window.

Krita 4.0.0

Return

the currently active view or 0 if no view is active

Krita 4.4.0

Emitted when the active view changes

addView(document: Document)View
Krita 4.0.0

Open a new view on the given document in this window

Parameters

document(no description provided)

Return

(no description provided)

close()
Krita 4.0.0

the active window and all its Views. If there are no Views left for a given Document, that Document will also be closed.

createAction(id: str, text: str = "", menuLocation: str = "tools/scripts")QAction
Krita 4.0.0Krita 4.2.0

creates a QAction object and adds it to the action manager for this Window.

Parameters

id

The unique id for the action. This will be used to

propertize the action if any .action file is present

text

The user-visible text of the action. If empty, the text from the

.action file is used.

menuLocation

a /-separated string that describes which menu the action should

be places in. Default is "tools/scripts"

Return

the new action.

dockers()list[QDockWidget]
Krita 5.2.0

Return

a list of all the dockers belonging to this window

qwindow()QMainWindow
Krita 4.0.0

Return a handle to the QMainWindow widget. This is useful to e.g. parent dialog boxes and message box.

Return

(no description provided)

showView(view: View)
Krita 4.0.0

Make the given view active in this window. If the view does not belong to this window, nothing happens.

Parameters

view(no description provided)
Krita 4.4.0

Emitted when we change the color theme

views()list[View]
Krita 4.0.0

Return

a list of open views in this window

Krita 4.0.0

Emitted when the window is closed.