KDEUI
KStartupInfoData Class Reference
#include <kstartupinfo.h>
Inherited by KStartupInfo::Data.
Detailed Description
Class representing data about an application startup notification.Such data include the icon of the starting application, the desktop on which the application should start, the binary name of the application, etc.
- See also:
- KStartupInfo
Definition at line 439 of file kstartupinfo.h.
Public Types | |
enum | TriState { Yes, No, Unknown } |
Public Member Functions | |
void | addPid (pid_t pid) |
const QString & | bin () const |
const QString & | description () const |
int | desktop () const |
const QString & | findDescription () const |
const QString & | findIcon () const |
const QString & | findName () const |
const QByteArray | findWMClass () const |
QByteArray | hostname () const |
const QString & | icon () const |
bool | is_pid (pid_t pid) const |
KStartupInfoData (const KStartupInfoData &data) | |
KStartupInfoData () | |
WId | launchedBy () const |
const QString & | name () const |
KStartupInfoData & | operator= (const KStartupInfoData &data) |
QList< pid_t > | pids () const |
int | screen () const |
void | setBin (const QString &bin) |
void | setDescription (const QString &descr) |
void | setDesktop (int desktop) |
void | setHostname (const QByteArray &hostname=QByteArray()) |
void | setIcon (const QString &icon) |
void | setLaunchedBy (WId window) |
void | setName (const QString &name) |
void | setScreen (int screen) |
void | setSilent (TriState state) |
void | setTimestamp (unsigned long time) |
void | setWMClass (const QByteArray &wmclass) |
void | setXinerama (int xinerama) |
TriState | silent () const |
unsigned long | timestamp () const |
void | update (const KStartupInfoData &data) |
QByteArray | WMClass () const |
int | xinerama () const |
~KStartupInfoData () |
Member Enumeration Documentation
Constructor & Destructor Documentation
KStartupInfoData::KStartupInfoData | ( | ) |
Constructor.
Initializes all the data to their default empty values.
Definition at line 1312 of file kstartupinfo.cpp.
KStartupInfoData::KStartupInfoData | ( | const KStartupInfoData & | data | ) |
KStartupInfoData::~KStartupInfoData | ( | ) |
Definition at line 1316 of file kstartupinfo.cpp.
Member Function Documentation
void KStartupInfoData::addPid | ( | pid_t | pid | ) |
Adds a PID to the list of processes that belong to the startup notification.
It may be used to increase the chance that the windows created by the starting application will be detected correctly, and also for detecting if the application has quit without creating any window.
- Parameters:
-
pid the PID to add
Definition at line 1428 of file kstartupinfo.cpp.
const QString & KStartupInfoData::bin | ( | ) | const |
Returns the binary name of the starting application.
- Returns:
- the new binary name of the application
Definition at line 1326 of file kstartupinfo.cpp.
const QString & KStartupInfoData::description | ( | ) | const |
Returns the name of the startup notification, or empty if not available.
- Returns:
- the name of the startup notificaiton, or an empty string if not set.
Definition at line 1353 of file kstartupinfo.cpp.
int KStartupInfoData::desktop | ( | ) | const |
Returns the desktop for the startup notification.
- Returns:
- the desktop for the startup notification
Definition at line 1387 of file kstartupinfo.cpp.
const QString & KStartupInfoData::findDescription | ( | ) | const |
Returns the description of the startup notification.
If it's not available, it returns name().
- Returns:
- the description of the startup notification
Definition at line 1358 of file kstartupinfo.cpp.
const QString & KStartupInfoData::findIcon | ( | ) | const |
Returns the icon of the startup notification, and if it's not available, tries to get it from the binary name.
- Returns:
- the name of the startup notification's icon, or the name of the binary if not set
Definition at line 1370 of file kstartupinfo.cpp.
const QString & KStartupInfoData::findName | ( | ) | const |
Returns the name of the startup notification.
If it's not available, it tries to use other information (binary name).
- Returns:
- the name of the startup notification
Definition at line 1341 of file kstartupinfo.cpp.
const QByteArray KStartupInfoData::findWMClass | ( | ) | const |
Returns the WM_CLASS value for the startup notification, or binary name if not available.
- Returns:
- the WM_CLASS value for the startup notification, or the binary name if not set
Definition at line 1397 of file kstartupinfo.cpp.
QByteArray KStartupInfoData::hostname | ( | ) | const |
Returns the hostname for the startup notification.
- Returns:
- the hostname
Definition at line 1423 of file kstartupinfo.cpp.
const QString & KStartupInfoData::icon | ( | ) | const |
Returns the icon of the startup notification, or empty if not available.
- Returns:
- the name of the icon, or an empty string if not set.
Definition at line 1377 of file kstartupinfo.cpp.
bool KStartupInfoData::is_pid | ( | pid_t | pid | ) | const |
Checks whether the given pid
is in the list of PIDs for starup notification.
- Returns:
- true if the given
pid
is in the list of PIDs for the startup notification
Definition at line 1444 of file kstartupinfo.cpp.
WId KStartupInfoData::launchedBy | ( | ) | const |
The toplevel window of the application that caused this startup notification, 0 if unknown.
Definition at line 1494 of file kstartupinfo.cpp.
const QString & KStartupInfoData::name | ( | ) | const |
Returns the name of the startup notification, or empty if not available.
- Returns:
- the name of the startup notification, or an empty string if not set.
Definition at line 1336 of file kstartupinfo.cpp.
KStartupInfoData & KStartupInfoData::operator= | ( | const KStartupInfoData & | data | ) |
Definition at line 1272 of file kstartupinfo.cpp.
QList< pid_t > KStartupInfoData::pids | ( | ) | const |
Returns all PIDs for the startup notification.
- Returns:
- the list of all PIDs
Definition at line 1439 of file kstartupinfo.cpp.
int KStartupInfoData::screen | ( | ) | const |
The X11 screen on which the startup notification is happening, -1 if unknown.
Definition at line 1474 of file kstartupinfo.cpp.
void KStartupInfoData::setBin | ( | const QString & | bin | ) |
Sets the binary name of the application ( e.g.
'kcontrol' ).
- Parameters:
-
bin the new binary name of the application
Definition at line 1321 of file kstartupinfo.cpp.
void KStartupInfoData::setDescription | ( | const QString & | descr | ) |
Sets the description for the notification (e.g.
'Launching Control Center'). I.e. name() describes what is being started, while description() is the actual action performed by the starting.
Definition at line 1348 of file kstartupinfo.cpp.
void KStartupInfoData::setDesktop | ( | int | desktop | ) |
Sets the desktop for the startup notification ( i.e.
the desktop on which the starting application should appear ).
- Parameters:
-
desktop the desktop for the startup notification
Definition at line 1382 of file kstartupinfo.cpp.
void KStartupInfoData::setHostname | ( | const QByteArray & | hostname = QByteArray() |
) |
Sets the hostname on which the application is starting.
It's necessary to set it if PIDs are set.
- Parameters:
-
hostname the application's hostname. If it's a null string, the current hostname is used
Definition at line 1409 of file kstartupinfo.cpp.
void KStartupInfoData::setIcon | ( | const QString & | icon | ) |
Sets the icon for the startup notification ( e.g.
'kcontrol' )
- Parameters:
-
icon the name of the icon
Definition at line 1365 of file kstartupinfo.cpp.
void KStartupInfoData::setLaunchedBy | ( | WId | window | ) |
Sets the toplevel window of the application that caused this startup notification.
- Parameters:
-
window window ID of the toplevel window that is responsible for this startup
Definition at line 1489 of file kstartupinfo.cpp.
void KStartupInfoData::setName | ( | const QString & | name | ) |
Sets the name for the notification (e.g.
'Control Center')
Definition at line 1331 of file kstartupinfo.cpp.
void KStartupInfoData::setScreen | ( | int | screen | ) |
Sets the X11 screen on which the startup notification should happen.
This is usually not necessary to set, as it's set by default to QX11Info::screen().
Definition at line 1469 of file kstartupinfo.cpp.
void KStartupInfoData::setSilent | ( | TriState | state | ) |
Sets whether the visual feedback for this startup notification should be silenced (temporarily suspended).
Definition at line 1449 of file kstartupinfo.cpp.
void KStartupInfoData::setTimestamp | ( | unsigned long | time | ) |
- Deprecated:
- Timestamp is already assigned in KStartupInfoId::initId(). Sets timestamp for the startup notification. The timestamp is expressed as XServer time, and is used to prevent activation of the matching window if user interaction took place after this timestamp. Value -1 means no timestamp set, value 0 means that the window should not be activated.
Definition at line 1459 of file kstartupinfo.cpp.
void KStartupInfoData::setWMClass | ( | const QByteArray & | wmclass | ) |
Sets a WM_CLASS value for the startup notification, it may be used for increasing the chance that the windows created by the starting application will be detected correctly.
- Parameters:
-
wmclass the WM_CLASS value for the startup notification
Definition at line 1392 of file kstartupinfo.cpp.
void KStartupInfoData::setXinerama | ( | int | xinerama | ) |
Sets the Xinerama screen for the startup notification ( i.e.
the screeen on which the starting application should appear ).
- Parameters:
-
xinerama the Xinerama screen for the startup notification
Definition at line 1479 of file kstartupinfo.cpp.
KStartupInfoData::TriState KStartupInfoData::silent | ( | ) | const |
Return the silence status for the startup notification.
- Returns:
- KStartupInfoData::Yes if visual feedback is silenced
Definition at line 1454 of file kstartupinfo.cpp.
unsigned long KStartupInfoData::timestamp | ( | ) | const |
- Deprecated:
- Use KStartupInfoId::timestamp(). Return the timestamp for the startup notification, or -1 if no timestamp is set.
Definition at line 1464 of file kstartupinfo.cpp.
void KStartupInfoData::update | ( | const KStartupInfoData & | data | ) |
Updates the notification data from the given data.
Some data, such as the desktop or the name, won't be rewritten if already set.
- Parameters:
-
data the data to update
Definition at line 1280 of file kstartupinfo.cpp.
QByteArray KStartupInfoData::WMClass | ( | ) | const |
Returns the WM_CLASS value for the startup notification, or empty if not available.
- Returns:
- the WM_CLASS value for the startup notification, or empty if not set
Definition at line 1404 of file kstartupinfo.cpp.
int KStartupInfoData::xinerama | ( | ) | const |
The Xinerama screen for the startup notification, -1 if unknown.
Definition at line 1484 of file kstartupinfo.cpp.
The documentation for this class was generated from the following files: