# class KSessionManager

###

Module | kdeui
Namespace |
Class | KSessionManager
Inherits |

Provides highlevel access to session management on a per-object base.

KSessionManager makes it possible to provide implementations for QApplication.commitData() and QApplication.saveState(), without subclassing KApplication. KMainWindow internally makes use of this.

You don't need to do anything with this class when using KMainWindow. Instead, use KMainWindow.saveProperties(), KMainWindow.readProperties(), KMainWindow.queryClose(), KMainWindow.queryExit() and friends.

Highlevel access to session management. Author Matthias Ettrich <ettrich@kde.org>

### methods

- KSessionManager ( )

  returns ctor

- KSessionManager (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KSessionManager |

- commitData (sm)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  sm | QSessionManager |

  See QApplication.commitData() for documentation.

  This function is just a convenience version to avoid subclassing KApplication.

  Return true to indicate a successful commit of data or false to indicate a problem and to halt the shutdown process (will implicitly call sm.cancel() ).

- saveState (sm)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  sm | QSessionManager |

  See QApplication.saveState() for documentation.

  This function is just a convenience version to avoid subclassing KApplication.

  Return true to indicate a successful state save or false to indicate a problem and to halt the shutdown process (will implicitly call sm.cancel() ).

- sessionClients ( )

  returns QList<KSessionManager
  static

- virtual_hook (id, data)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  id | int |
  data | void |

  Virtual hook, used to add new "virtual" functions while maintaining binary compatibility. Unused in this class.