StatefulWindow

Search for usage in LXR

StatefulWindow Class Reference

Properties

StatefulAppAbstractKirigamiApplication application
 
alias windowName
 

Detailed Description

StatefulWindow takes care of providing standard functionalities for your application main window.

This includes:

  • Restoration of the window size accross restarts
  • Handling some of the standard actions defined in your KirigamiAbstractApplication (AboutKDE and AboutApp)
  • A command bar to access all the defined actions
  • A shortcut editor
import org.kde.kirigamiaddons.statefulapp as StatefulApp
import org.kde.kirigamiaddons.settings as Settings
StatefulApp.StatefulWindow {
id: root
windowName: 'Main'
application: MyApplication {
configurationView: Settings.ConfigurationView { ... }
}
}
Since
KirigamiAddons 1.4.0

Definition at line 40 of file StatefulWindow.qml.

Property Documentation

◆ application

StatefulAppAbstractKirigamiApplication StatefulWindow::application
read

This property holds the AbstractKirigamiApplication of your application.

The default AbstractKirigamiApplication provides the following actions:

  • KStandardActions::quit
  • KStandardActions::keyBindings
  • "Open Command Bar"
  • "About App"
  • "About KDE" (if your application id starts with org.kde.)

If you need more actions provide your own AbstractKirigamiApplication and overwrite AbstractKirigamiApplication::setupActions.

See also
AbstractKirigamiApplication

Definition at line 64 of file StatefulWindow.qml.

◆ windowName

alias StatefulWindow::windowName
read

This property holds the window's name.

This needs to be an unique identifier for your application and will be used to store the state of the window in your application config.

Definition at line 48 of file StatefulWindow.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Aug 30 2024 11:47:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.