kdecore Library API Documentation

KStartupInfoData Class Reference

Class representing data about an application startup notification. More...

#include <kstartupinfo.h>

List of all members.

Public Types

enum  TriState { Yes, No, Unknown }

Public Member Functions

void setBin (const QString &bin)
const QStringbin () const
void setName (const QString &name)
const QStringfindName () const
const QStringname () const
void setDescription (const QString &descr)
const QStringfindDescription () const
const QStringdescription () const
void setIcon (const QString &icon)
const QStringfindIcon () const
const QStringicon () const
void setDesktop (int desktop)
int desktop () const
void setWMClass (const QCString &wmclass)
const QCString findWMClass () const
const QCStringWMClass () const
void addPid (pid_t pid)
const QValueList< pid_t > & pids () const
bool is_pid (pid_t pid) const
void setHostname (const QCString &hostname=QCString())
const QCStringhostname () const
void setSilent (TriState state)
TriState silent () const
void setTimestamp (unsigned long time)
unsigned long timestamp () const
int screen () const
void setScreen (int screen)
void update (const KStartupInfoData &data)
 KStartupInfoData ()
 KStartupInfoData (const KStartupInfoData &data)
KStartupInfoDataoperator= (const KStartupInfoData &data)

Friends

class KStartupInfo
class 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

KStartupInfoId

Author:
Lubos Lunak <l.lunak@kde.org>

Definition at line 463 of file kstartupinfo.h.


Constructor & Destructor Documentation

KStartupInfoData::KStartupInfoData  ) 
 

Constructor.

Initializes all the data to their default empty values.

Definition at line 1239 of file kstartupinfo.cpp.

KStartupInfoData::KStartupInfoData const KStartupInfoData data  ) 
 

Copy constructor.

Definition at line 1197 of file kstartupinfo.cpp.

References d.


Member Function Documentation

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

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

Referenced by findIcon(), findName(), findWMClass(), setBin(), and update().

void KStartupInfoData::setName const QString name  ) 
 

Sets the name for the notification (e.g.

'Control Center')

Definition at line 1259 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 1269 of file kstartupinfo.cpp.

References bin(), and 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 1264 of file kstartupinfo.cpp.

Referenced by findDescription(), findName(), and update().

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.

Since:
3.2

Definition at line 1276 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
Since:
3.2

Definition at line 1286 of file kstartupinfo.cpp.

References description(), and name().

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.
Since:
3.2

Definition at line 1281 of file kstartupinfo.cpp.

Referenced by findDescription(), and update().

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

References bin(), and 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 1305 of file kstartupinfo.cpp.

Referenced by findIcon(), and update().

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

Referenced by update().

void KStartupInfoData::setWMClass const QCString 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 1320 of file kstartupinfo.cpp.

const QCString 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 1325 of file kstartupinfo.cpp.

References bin(), and WMClass().

const QCString & 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 1332 of file kstartupinfo.cpp.

Referenced by findWMClass().

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

Referenced by KUniqueApplication::start(), and update().

const QValueList< pid_t > & KStartupInfoData::pids  )  const
 

Returns all PIDs for the startup notification.

Returns:
the list of all PIDs

Definition at line 1367 of file kstartupinfo.cpp.

Referenced by update().

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

void KStartupInfoData::setHostname const QCString hostname = QCString()  ) 
 

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

const QCString & KStartupInfoData::hostname  )  const
 

Returns the hostname for the startup notification.

Returns:
the hostname

Definition at line 1351 of file kstartupinfo.cpp.

Referenced by update().

void KStartupInfoData::setSilent TriState  state  ) 
 

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

Since:
3.1.1

Definition at line 1377 of file kstartupinfo.cpp.

Referenced by KStartupInfo::silenceStartup().

KStartupInfoData::TriState KStartupInfoData::silent  )  const
 

Return the silence status for the startup notification.

Returns:
KStartupInfoData::Yes if visual feedback is silenced
Since:
3.1.1

Definition at line 1382 of file kstartupinfo.cpp.

Referenced by update().

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

Referenced by update().

int KStartupInfoData::screen  )  const
 

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

Definition at line 1402 of file kstartupinfo.cpp.

Referenced by update().

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 qt_xscreen().

Definition at line 1397 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 1211 of file kstartupinfo.cpp.

References addPid(), bin(), d, description(), desktop(), hostname(), icon(), name(), pids(), screen(), silent(), and timestamp().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Apr 22 16:01:03 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003