|
|
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 |
parent | the parent of this QObject (can be 0 for no parent) |
name | the 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:
id | the id of the application |
data | the 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:
dpy | the display of the application. |
id | the id of the application |
data | the 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:
id | the id of the application |
data | the 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:
dpy | the display of the application. |
id | the id of the application |
data | the application's data |
Returns: true if successful, false otherwise
bool sendFinish ( const KStartupInfoId& id )
| sendFinish |
[static]
Ends startup notification with the given identification.
Parameters:
id | the 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:
dpy | the display of the application. |
id | the 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:
id | the id of the application |
data | the 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:
dpy | the display of the application. |
id | the id of the application |
data | the 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:
w | the 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:
w | the window id to check |
id | if 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:
w | the window id to check |
data | if 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:
w | the window id to check |
id | if found, the id of the startup notification will be written here |
data | if 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:
secs | the new timeout in seconds |
void setWindowStartupId ( WId window, const QCString& id )
| setWindowStartupId |
[static]
Sets the startup notification window property on the given window.
Parameters:
windows | the id of the window |
id | the startup notification id |
QCString windowStartupId ( WId w )
| windowStartupId |
[static]
Returns startup notification identification of the given window.
Parameters:
windows | the 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:
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 |
void customEvent ( QCustomEvent* e_P )
| customEvent |
[protected virtual]
Reimplemented from QObject.