|
|
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_cantdetect | if true, and a new unknown window appears, removes all notification for applications that are not compliant with the app startup protocol |
~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.
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.
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.
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.
bool sendFinish ( const KStartupInfoId& id )
| sendFinish |
[static]
Ends startup notification with the given identification.
bool sendFinishX ( Display* dpy, const KStartupInfoId& id )
| sendFinishX |
[static]
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
bool sendFinish ( const KStartupInfoId& id, const KStartupInfoData& data )
| sendFinish |
[static]
Ends startup notification with the given indentification and the given data ( e.g. PIDs of processes for this startup notification that exited ).
bool sendFinishX ( Display* dpy, const KStartupInfoId& id,
const KStartupInfoData& data )
| sendFinishX |
[static]
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
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 .
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.
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.
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.
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.
void setTimeout ( unsigned int secs )
| setTimeout |
Sets the timeout for notifications, after this timeout a notification is removed.
void setWindowStartupId ( WId window, const QCString& id )
| setWindowStartupId |
[static]
Sets the startup notification window property on the given window.
QCString windowStartupId ( WId w )
| windowStartupId |
[static]
Returns startup notification identification of the given window.
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:
id | the notification identification |
data | the notification data |
void gotStartupChange ( const KStartupInfoId& id, const KStartupInfoData& data )
| gotStartupChange |
[signal]
Emitted when a startup notification changes.
Parameters:
id | the notification identification |
data | the 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:
id | the notification identification |
data | the notification data |