KStartupInfoData

Search for usage in LXR

KStartupInfoData Class Reference

#include <kstartupinfo.h>

Public Types

enum  TriState { Yes , No , Unknown }
 

Public Member Functions

 KStartupInfoData ()
 
 KStartupInfoData (const KStartupInfoData &data)
 
void addPid (pid_t pid)
 
QString applicationId () const
 
const QStringbin () const
 
const QStringdescription () const
 
int desktop () const
 
const QStringfindDescription () const
 
const QStringfindIcon () const
 
const QStringfindName () const
 
const QByteArray findWMClass () const
 
QByteArray hostname () const
 
const QStringicon () const
 
bool is_pid (pid_t pid) const
 
const QStringname () const
 
KStartupInfoDataoperator= (const KStartupInfoData &data)
 
QList< pid_t > pids () const
 
int screen () const
 
void setApplicationId (const QString &desktop)
 
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 setName (const QString &name)
 
void setScreen (int screen)
 
void setSilent (TriState state)
 
void setWMClass (const QByteArray &wmclass)
 
void setXinerama (int xinerama)
 
TriState silent () const
 
void update (const KStartupInfoData &data)
 
QByteArray WMClass () const
 
int xinerama () const
 

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
KStartupInfoId
Author
Lubos Lunak l.lun.nosp@m.ak@k.nosp@m.de.or.nosp@m.g

Definition at line 405 of file kstartupinfo.h.

Member Enumeration Documentation

◆ TriState

enum KStartupInfoData::TriState

Definition at line 534 of file kstartupinfo.h.

Constructor & Destructor Documentation

◆ KStartupInfoData() [1/2]

KStartupInfoData::KStartupInfoData ( )

Constructor.

Initializes all the data to their default empty values.

Definition at line 1094 of file kstartupinfo.cpp.

◆ KStartupInfoData() [2/2]

KStartupInfoData::KStartupInfoData ( const KStartupInfoData & data)

Copy constructor.

Definition at line 1040 of file kstartupinfo.cpp.

◆ ~KStartupInfoData()

KStartupInfoData::~KStartupInfoData ( )

Definition at line 1099 of file kstartupinfo.cpp.

Member Function Documentation

◆ addPid()

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
pidthe PID to add

Definition at line 1215 of file kstartupinfo.cpp.

◆ applicationId()

QString KStartupInfoData::applicationId ( ) const

The .desktop file used to initiate this startup notification, or empty.

This information should be used only to identify the application, not to read any additional information.

Since
4.5

Definition at line 1281 of file kstartupinfo.cpp.

◆ bin()

const QString & KStartupInfoData::bin ( ) const

Returns the binary name of the starting application.

Returns
the new binary name of the application

Definition at line 1109 of file kstartupinfo.cpp.

◆ description()

const QString & KStartupInfoData::description ( ) 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 1137 of file kstartupinfo.cpp.

◆ desktop()

int KStartupInfoData::desktop ( ) const

Returns the desktop for the startup notification.

Returns
the desktop for the startup notification

Definition at line 1173 of file kstartupinfo.cpp.

◆ findDescription()

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 1142 of file kstartupinfo.cpp.

◆ findIcon()

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 1155 of file kstartupinfo.cpp.

◆ findName()

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 1124 of file kstartupinfo.cpp.

◆ findWMClass()

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 1183 of file kstartupinfo.cpp.

◆ hostname()

QByteArray KStartupInfoData::hostname ( ) const

Returns the hostname for the startup notification.

Returns
the hostname

Definition at line 1210 of file kstartupinfo.cpp.

◆ icon()

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 1163 of file kstartupinfo.cpp.

◆ is_pid()

bool KStartupInfoData::is_pid ( pid_t pid) const

Checks whether the given pid is in the list of PIDs for startup notification.

Returns
true if the given pid is in the list of PIDs for the startup notification

Definition at line 1232 of file kstartupinfo.cpp.

◆ name()

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 1119 of file kstartupinfo.cpp.

◆ operator=()

KStartupInfoData & KStartupInfoData::operator= ( const KStartupInfoData & data)

Definition at line 1045 of file kstartupinfo.cpp.

◆ pids()

QList< pid_t > KStartupInfoData::pids ( ) const

Returns all PIDs for the startup notification.

Returns
the list of all PIDs

Definition at line 1227 of file kstartupinfo.cpp.

◆ screen()

int KStartupInfoData::screen ( ) const

The X11 screen on which the startup notification is happening, -1 if unknown.

Definition at line 1252 of file kstartupinfo.cpp.

◆ setApplicationId()

void KStartupInfoData::setApplicationId ( const QString & desktop)

Sets the .desktop file that was used to initiate the startup notification.

Since
4.5

Definition at line 1267 of file kstartupinfo.cpp.

◆ setBin()

void KStartupInfoData::setBin ( const QString & bin)

Sets the binary name of the application (e.g. 'kcontrol').

Parameters
binthe new binary name of the application

Definition at line 1104 of file kstartupinfo.cpp.

◆ setDescription()

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 1132 of file kstartupinfo.cpp.

◆ setDesktop()

void KStartupInfoData::setDesktop ( int desktop)

Sets the desktop for the startup notification (i.e. the desktop on which the starting application should appear ).

Parameters
desktopthe desktop for the startup notification

Definition at line 1168 of file kstartupinfo.cpp.

◆ setHostname()

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
hostnamethe application's hostname. If it's a null string, the current hostname is used

Definition at line 1196 of file kstartupinfo.cpp.

◆ setIcon()

void KStartupInfoData::setIcon ( const QString & icon)

Sets the icon for the startup notification (e.g. 'kcontrol').

Parameters
iconthe name of the icon

Definition at line 1150 of file kstartupinfo.cpp.

◆ setName()

void KStartupInfoData::setName ( const QString & name)

Sets the name for the notification (e.g. 'Control Center').

Definition at line 1114 of file kstartupinfo.cpp.

◆ setScreen()

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 1247 of file kstartupinfo.cpp.

◆ setSilent()

void KStartupInfoData::setSilent ( TriState state)

Sets whether the visual feedback for this startup notification should be silenced (temporarily suspended).

Definition at line 1237 of file kstartupinfo.cpp.

◆ setWMClass()

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
wmclassthe WM_CLASS value for the startup notification

Definition at line 1178 of file kstartupinfo.cpp.

◆ setXinerama()

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
xineramathe Xinerama screen for the startup notification

Definition at line 1257 of file kstartupinfo.cpp.

◆ silent()

KStartupInfoData::TriState KStartupInfoData::silent ( ) const

Return the silence status for the startup notification.

Returns
KStartupInfoData::Yes if visual feedback is silenced

Definition at line 1242 of file kstartupinfo.cpp.

◆ update()

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
datathe data to update

Definition at line 1054 of file kstartupinfo.cpp.

◆ WMClass()

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 1191 of file kstartupinfo.cpp.

◆ xinerama()

int KStartupInfoData::xinerama ( ) const

The Xinerama screen for the startup notification, -1 if unknown.

Definition at line 1262 of file kstartupinfo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.