class KStartupInfo

Class for manipulating the application startup notification. More...

Definition#include <kstartupinfo.h>
InheritsQObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Signals

Public Static Methods

Public Members

Protected Methods


Detailed Description

Class for manipulating the application startup notification.

This class can be used to send information about started application, change the information and receive this information. For detailed description, see kdelibs/kdecore/README.kstartupinfo.

You usually don't need to use this class for sending the notification information, as KDE libraries should do this when an application is started ( e.g. KRun class ).

For receiving the startup notification info, create an instance and connect to its slots. It will automatically detect started applications and when they are ready.

See also: KStartupInfoId, KStartupInfoData

 KStartupInfo ( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 )

KStartupInfo

Creates an instance that will receive the startup notifications.

Parameters:
clean_on_cantdetectif true, and a new unknown window appears, removes all notification for applications that are not compliant with the app startup protocol
parentthe parent of this QObject (can be 0 for no parent)
namethe name of the QObject (can be 0 for no name)

 ~KStartupInfo ()

~KStartupInfo

[virtual]

bool  sendStartup ( const KStartupInfoId& id, const KStartupInfoData& data )

sendStartup

[static]

Sends given notification data about started application with the given startup identification. If no notification for this identification exists yet, it is created, otherwise it's updated.

Parameters:
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

See also: KStartupInfoId, KStartupInfoData

bool  sendStartupX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )

sendStartupX

[static]

Like sendStartup , uses dpy instead of qt_x11display() for sending the info.

Parameters:
dpythe display of the application.
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

bool  sendChange ( const KStartupInfoId& id, const KStartupInfoData& data )

sendChange

[static]

Sends given notification data about started application with the given startup identification. This is used for updating the notification info, if no notification for this identification exists, it's ignored.

Parameters:
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

See also: KStartupInfoId, KStartupInfoData

bool  sendChangeX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )

sendChangeX

[static]

Like sendChange , uses dpy instead of qt_x11display() for sending the info.

Parameters:
dpythe display of the application.
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

bool  sendFinish ( const KStartupInfoId& id )

sendFinish

[static]

Ends startup notification with the given identification.

Parameters:
idthe id of the application

Returns: true if successful, false otherwise

bool  sendFinishX ( Display* dpy, const KStartupInfoId& id )

sendFinishX

[static]

Like sendFinish , uses dpy instead of qt_x11display() for sending the info.

Parameters:
dpythe display of the application.
idthe id of the application

Returns: true if successful, false otherwise

bool  sendFinish ( const KStartupInfoId& id, const KStartupInfoData& data )

sendFinish

[static]

Ends startup notification with the given identification and the given data ( e.g. PIDs of processes for this startup notification that exited ).

Parameters:
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

bool  sendFinishX ( Display* dpy, const KStartupInfoId& id, const KStartupInfoData& data )

sendFinishX

[static]

Like sendFinish , uses dpy instead of qt_x11display() for sending the info.

Parameters:
dpythe display of the application.
idthe id of the application
datathe application's data

Returns: true if successful, false otherwise

KStartupInfoId  currentStartupIdEnv ()

currentStartupIdEnv

[static]

Returns the current startup notification identification for the current startup notification environment variable. Note that KApplication constructor unsets the variable and you have to use KApplication::startupId .

Returns: the current startup notification identification

void  resetStartupEnv ()

resetStartupEnv

[static]

Unsets the startup notification environment variable.

void  appStarted ()

appStarted

[static]

Manual notification that the application has started. If you do not map a (toplevel) window, then startup notification will not disappear for the application until a timeout. You can use this as an alternative method in this case.

enum startup_t { NoMatch, Match, CantDetect }

startup_t

startup_t  checkStartup ( WId w )

checkStartup

Checks if the given windows matches any existing startup notification. If yes, the startup notification is removed.

Parameters:
wthe window id to check

Returns: the result of the operation

startup_t  checkStartup ( WId w, KStartupInfoId& id )

checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id, and removes the startup notification.

Parameters:
wthe window id to check
idif found, the id of the startup notification will be written here

Returns: the result of the operation

startup_t  checkStartup ( WId w, KStartupInfoData& data )

checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the notification data in data, and removes the startup notification.

Parameters:
wthe window id to check
dataif found, the data of the startup notification will be written here

Returns: the result of the operation

startup_t  checkStartup ( WId w, KStartupInfoId& id, KStartupInfoData& data )

checkStartup

Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id and notification data in data, and removes the startup notification.

Parameters:
wthe window id to check
idif found, the id of the startup notification will be written here
dataif found, the data of the startup notification will be written here

Returns: the result of the operation

void  setTimeout ( unsigned int secs )

setTimeout

Sets the timeout for notifications, after this timeout a notification is removed.

Parameters:
secsthe new timeout in seconds

void  setWindowStartupId ( WId window, const QCString& id )

setWindowStartupId

[static]

Sets the startup notification window property on the given window.

Parameters:
windowsthe id of the window
idthe startup notification id

QCString  windowStartupId ( WId w )

windowStartupId

[static]

Returns startup notification identification of the given window.

Parameters:
windowsthe id of the window

Returns: the startup notification id. Can be null if not found.

void  gotNewStartup ( const KStartupInfoId& id, const KStartupInfoData& data )

gotNewStartup

[signal]

Emitted when a new startup notification is created ( i.e. a new application is being started ).

Parameters:
idthe notification identification
datathe notification data

void  gotStartupChange ( const KStartupInfoId& id, const KStartupInfoData& data )

gotStartupChange

[signal]

Emitted when a startup notification changes.

Parameters:
idthe notification identification
datathe notification data

void  gotRemoveStartup ( const KStartupInfoId& id, const KStartupInfoData& data )

gotRemoveStartup

[signal]

Emitted when a startup notification is removed ( either because it was detected that the application is ready or because of a timeout ).

Parameters:
idthe notification identification
datathe notification data

void  customEvent ( QCustomEvent* e_P )

customEvent

[protected virtual]

Reimplemented from QObject.