KStartupInfo Class Reference
Class for manipulating the application startup notification. More...
#include <kstartupinfo.h>
Inheritance diagram for KStartupInfo:

Public Types | |
enum | { CleanOnCantDetect = 1 << 0, DisableKWinModule = 1 << 1, AnnounceSilenceChanges = 1 << 2 } |
enum | startup_t { NoMatch, Match, CantDetect } |
Signals | |
void | gotNewStartup (const KStartupInfoId &id, const KStartupInfoData &data) |
void | gotStartupChange (const KStartupInfoId &id, const KStartupInfoData &data) |
void | gotRemoveStartup (const KStartupInfoId &id, const KStartupInfoData &data) |
Public Member Functions | |
KStartupInfo (int flags, QObject *parent=NULL, const char *name=NULL) | |
KStartupInfo (bool clean_on_cantdetect, QObject *parent=0, const char *name=0) | |
startup_t | checkStartup (WId w) |
startup_t | checkStartup (WId w, KStartupInfoId &id) |
startup_t | checkStartup (WId w, KStartupInfoData &data) |
startup_t | checkStartup (WId w, KStartupInfoId &id, KStartupInfoData &data) |
void | setTimeout (unsigned int secs) |
Static Public Member Functions | |
void | disableAutoAppStartedSending (bool disable=true) |
void | appStarted () |
void | appStarted (const QCString &startup_id) |
void | setNewStartupId (QWidget *window, const QCString &startup_id) |
void | silenceStartup (bool silence) |
QCString | createNewStartupId () |
bool | sendStartup (const KStartupInfoId &id, const KStartupInfoData &data) |
bool | sendStartupX (Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data) |
bool | sendChange (const KStartupInfoId &id, const KStartupInfoData &data) |
bool | sendChangeX (Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data) |
bool | sendFinish (const KStartupInfoId &id) |
bool | sendFinishX (Display *dpy, const KStartupInfoId &id) |
bool | sendFinish (const KStartupInfoId &id, const KStartupInfoData &data) |
bool | sendFinishX (Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data) |
KStartupInfoId | currentStartupIdEnv () |
void | resetStartupEnv () |
void | setWindowStartupId (WId window, const QCString &id) |
QCString | windowStartupId (WId w) |
void | handleAutoAppStartedSending () |
Protected Member Functions | |
virtual void | customEvent (QCustomEvent *e_P) |
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
- Author:
- Lubos Lunak <l.lunak@kde.org>
- Version:
- Id
- kstartupinfo.h,v 1.30 2004/05/26 09:22:40 lunakl Exp
Definition at line 64 of file kstartupinfo.h.
Member Enumeration Documentation
|
Definition at line 262 of file kstartupinfo.h. Referenced by checkStartup(). |
Constructor & Destructor Documentation
|
Creates an instance that will receive the startup notifications. The various flags passed may be
Definition at line 114 of file kstartupinfo.cpp. |
|
Creates an instance that will receive the startup notifications.
Definition at line 121 of file kstartupinfo.cpp. |
Member Function Documentation
|
By default, the startup notification is ended for the application after it shows its first toplevel window. If you app e.g. has several toplevel windows after its startup, you can disable the automatic handling, and call appStarted() manually after all toplevel windows have been shown.
Definition at line 523 of file kstartupinfo.cpp. |
|
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. Definition at line 494 of file kstartupinfo.cpp. References currentStartupIdEnv(). Referenced by KWin::appStarted(). |
|
Sends explicit notification that the startup notification with id startup_id should end.
Definition at line 502 of file kstartupinfo.cpp. References sendFinish(), and sendFinishX(). |
|
Use this function if the application got a request with startup notification from outside (for example, when KUniqueApplication::newInstance() is called, or e.g. when khelpcenter opens new URL in its window). The window can be either an already existing and visible window, or a new one, before being shown. Note that this function is usually needed only when a window is reused.
Definition at line 545 of file kstartupinfo.cpp. References KWin::forceActiveWindow(), NETRootInfo::isSupported(), and setWindowStartupId(). Referenced by KUniqueApplication::newInstance(). |
|
If your application shows temporarily some window during its startup, for example a dialog, and only after closing it shows the main window, startup notification would normally be shown while the dialog is visible. To temporarily suspend and resume the notification, use this function. Note that this is cumulative, i.e. after suspending twice, you have to resume twice.
Definition at line 528 of file kstartupinfo.cpp. References sendChange(), and KStartupInfoData::setSilent(). |
|
Creates and returns new startup id. The id includes properly setup user timestamp.
Definition at line 926 of file kstartupinfo.cpp. Referenced by KStartupInfoId::initId(). |
|
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. Note that the name field in data is required.
Definition at line 378 of file kstartupinfo.cpp. References KXMessages::broadcastMessage(), KStartupInfoId::none(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). |
|
Like sendStartup , uses dpy instead of qt_x11display() for sending the info.
Definition at line 391 of file kstartupinfo.cpp. References KXMessages::broadcastMessageX(), KStartupInfoId::none(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). |
|
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.
Definition at line 422 of file kstartupinfo.cpp. References KXMessages::broadcastMessage(), KStartupInfoId::none(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). Referenced by silenceStartup(). |
|
Like sendChange , uses dpy instead of qt_x11display() for sending the info.
Definition at line 434 of file kstartupinfo.cpp. References KXMessages::broadcastMessageX(), KStartupInfoId::none(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). Referenced by KUniqueApplication::start(). |
|
Ends startup notification with the given identification.
Definition at line 447 of file kstartupinfo.cpp. References KXMessages::broadcastMessage(), KStartupInfoId::none(), and KStartupInfoId::to_text(). Referenced by appStarted(). |
|
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
Definition at line 458 of file kstartupinfo.cpp. References KXMessages::broadcastMessageX(), KStartupInfoId::none(), and KStartupInfoId::to_text(). Referenced by appStarted(), and KUniqueApplication::start(). |
|
Ends startup notification with the given identification and the given data ( e.g. PIDs of processes for this startup notification that exited ).
Definition at line 469 of file kstartupinfo.cpp. References KXMessages::broadcastMessage(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). |
|
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
Definition at line 481 of file kstartupinfo.cpp. References KXMessages::broadcastMessageX(), KStartupInfoData::to_text(), and KStartupInfoId::to_text(). |
|
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 .
Definition at line 1011 of file kstartupinfo.cpp. Referenced by appStarted(), and KUniqueApplication::start(). |
|
Unsets the startup notification environment variable.
Definition at line 1022 of file kstartupinfo.cpp. |
|
Checks if the given windows matches any existing startup notification.
Definition at line 586 of file kstartupinfo.cpp. References startup_t. |
|
Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id.
Definition at line 576 of file kstartupinfo.cpp. References startup_t. |
|
Checks if the given windows matches any existing startup notification, and if yes, returns the notification data in data.
Definition at line 581 of file kstartupinfo.cpp. References startup_t. |
|
Checks if the given windows matches any existing startup notification, and if yes, returns the identification in id and notification data in data.
Definition at line 570 of file kstartupinfo.cpp. References startup_t. |
|
Sets the timeout for notifications, after this timeout a notification is removed.
Definition at line 818 of file kstartupinfo.cpp. |
|
Sets the startup notification window property on the given window.
Definition at line 782 of file kstartupinfo.cpp. Referenced by setNewStartupId(), and KApplication::setTopWidget(). |
|
Returns startup notification identification of the given window.
Definition at line 760 of file kstartupinfo.cpp. |
|
Emitted when a new startup notification is created (i.e. a new application is being started).
|
|
Emitted when a startup notification changes.
|
|
Emitted when a startup notification is removed (either because it was detected that the application is ready or because of a timeout).
|
The documentation for this class was generated from the following files: