• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkworkspace

KWorkSpace Namespace Reference

Classes

class  KRequestShutdownHelper

Enumerations

enum  ShutdownConfirm { ShutdownConfirmDefault = -1, ShutdownConfirmNo = 0, ShutdownConfirmYes = 1 }
enum  ShutdownMode {
  ShutdownModeDefault = -1, ShutdownModeSchedule = 0, ShutdownModeTryNow = 1, ShutdownModeForceNow = 2,
  ShutdownModeInteractive = 3
}
enum  ShutdownType {
  ShutdownTypeDefault = -1, ShutdownTypeNone = 0, ShutdownTypeReboot = 1, ShutdownTypeHalt = 2,
  ShutdownTypeLogout = 3
}

Functions

bool canShutDown (ShutdownConfirm confirm=ShutdownConfirmDefault, ShutdownType sdtype=ShutdownTypeDefault, ShutdownMode sdmode=ShutdownModeDefault)
void propagateSessionManager ()
bool requestShutDown (ShutdownConfirm confirm=ShutdownConfirmDefault, ShutdownType sdtype=ShutdownTypeDefault, ShutdownMode sdmode=ShutdownModeDefault)

Variables

static QTime smModificationTime

Enumeration Type Documentation

enum KWorkSpace::ShutdownConfirm

The possible values for the confirm parameter of requestShutDown().

Enumerator:
ShutdownConfirmDefault 

Obey the user's confirmation setting.

ShutdownConfirmNo 

Don't confirm, shutdown without asking.

ShutdownConfirmYes 

Always confirm, ask even if the user turned it off.

Definition at line 31 of file kworkspace.h.

enum KWorkSpace::ShutdownMode

The possible values for the sdmode parameter of requestShutDown().

Enumerator:
ShutdownModeDefault 

Select previous mode or the default if it's the first time.

ShutdownModeSchedule 

Schedule a shutdown (halt or reboot) for the time all active sessions have exited.

ShutdownModeTryNow 

Shut down, if no sessions are active.

Otherwise do nothing.

ShutdownModeForceNow 

Force shutdown.

Kill any possibly active sessions.

ShutdownModeInteractive 

Pop up a dialog asking the user what to do if sessions are still active.

Definition at line 77 of file kworkspace.h.

enum KWorkSpace::ShutdownType

The possible values for the sdtype parameter of requestShutDown().

Enumerator:
ShutdownTypeDefault 

Select previous action or the default if it's the first time.

ShutdownTypeNone 

Only log out.

ShutdownTypeReboot 

Log out and reboot the machine.

ShutdownTypeHalt 

Log out and halt the machine.

ShutdownTypeLogout 

Temporary brain damage.

Don't use. Same as ShutdownTypeNone

Definition at line 49 of file kworkspace.h.


Function Documentation

KDE_EXPORT bool KWorkSpace::canShutDown ( ShutdownConfirm  confirm = ShutdownConfirmDefault,
ShutdownType  sdtype = ShutdownTypeDefault,
ShutdownMode  sdmode = ShutdownModeDefault 
)

Used to check whether a requestShutDown call with the same arguments has any chance of succeeding.

For example, if KDE's own session manager cannot be contacted, we can't demand that the computer be shutdown, or force a confirmation dialog.

Even if we can access the KDE session manager, the system or user configuration may prevent the user from requesting a shutdown or reboot.

KDE_EXPORT void KWorkSpace::propagateSessionManager (  ) 

Propagates the network address of the session manager in the SESSION_MANAGER environment variable so that child processes can pick it up.

If SESSION_MANAGER isn't defined yet, the address is searched in $HOME/.KSMserver.

This function is called by clients that are started outside the session ( i.e. before ksmserver is started), but want to launch other processes that should participate in the session. Examples are kdesktop or kicker.

KDE_EXPORT bool KWorkSpace::requestShutDown ( ShutdownConfirm  confirm = ShutdownConfirmDefault,
ShutdownType  sdtype = ShutdownTypeDefault,
ShutdownMode  sdmode = ShutdownModeDefault 
)

Asks the session manager to shut the session down.

Using confirm == ShutdownConfirmYes or sdtype != ShutdownTypeDefault or sdmode != ShutdownModeDefault causes the use of ksmserver's DCOP interface. The remaining two combinations use the standard XSMP and will work with any session manager compliant with it.

Parameters:
confirm Whether to ask the user if he really wants to log out. ShutdownConfirm
sdtype The action to take after logging out. ShutdownType
sdmode If/When the action should be taken. ShutdownMode
Returns:
true on success, false if the session manager could not be contacted.

Variable Documentation

QTime KWorkSpace::smModificationTime [static]

Definition at line 217 of file kworkspace.cpp.

libkworkspace

Skip menu "libkworkspace"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •     Animators
  •     Applets
  •     Engines
  • Solid Modules
  • System Settings
  •   SystemSettingsView
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal