KDEUI
kstartupinfo.cpp
Go to the documentation of this file.
104 silent( KStartupInfoData::Unknown ), timestamp( ~0U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
190 QObject::connect( KWindowSystem::self(), SIGNAL(windowAdded(WId)), q, SLOT(slot_window_added(WId)));
194 //QObject::connect( KWindowSystem::self(), SIGNAL(systemTrayWindowAdded(WId)), q, SLOT(slot_window_added(WId)));
479 QString KStartupInfo::Private::check_required_startup_fields( const QString& msg, const KStartupInfoData& data_P,
591 kapp->clearStartupId(); // reset the id, no longer valid (must use clearStartupId() to avoid infinite loop)
694 KStartupInfo::startup_t KStartupInfo::Private::check_startup_internal( WId w_P, KStartupInfoId* id_O,
802 bool KStartupInfo::Private::find_wclass( const QByteArray &_res_name, const QByteArray &_res_class,
1029 kDebug( 172 ) << "creating: " << id << ":" << (qApp ? qAppName() : QString("unnamed app") /* e.g. kdeinit */);
1199 .arg( desktop == NET::OnAllDesktops ? NET::OnAllDesktops : desktop - 1 ); // spec counts from 0
const QString & findIcon() const
Returns the icon of the startup notification, and if it's not available, tries to get it from the bin...
Definition: kstartupinfo.cpp:1388
static void resetStartupEnv()
Unsets the startup notification environment variable.
Definition: kstartupinfo.cpp:1101
static void disableAutoAppStartedSending(bool disable=true)
By default, the startup notification is ended for the application after it shows its first toplevel w...
Definition: kstartupinfo.cpp:621
ulong toULong(bool *ok, int base) const
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
static void setNewStartupId(QWidget *window, const QByteArray &startup_id)
Use this function if the application got a request with startup notification from outside (for exampl...
Definition: kstartupinfo.cpp:643
static bool sendStartupX(Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendStartup , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:461
Definition: netwm_def.h:394
Type type() const
const QString & description() const
Returns the name of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1371
Type
const QString & findDescription() const
Returns the description of the startup notification.
Definition: kstartupinfo.cpp:1376
const QByteArray findWMClass() const
Returns the WM_CLASS value for the startup notification, or binary name if not available.
Definition: kstartupinfo.cpp:1415
Class for manipulating the application startup notification.
Definition: kstartupinfo.h:64
QByteArray toLower() const
Definition: netwm_def.h:386
void broadcastMessage(const char *msg_type, const QString &message, int screen, bool obsolete)
Broadcasts the given message with the given message type.
Definition: kxmessages.cpp:96
Sending string messages to other applications using the X Client Messages.
Definition: kxmessages.h:46
Definition: netwm_def.h:393
static void setOnDesktop(WId win, int desktop)
Moves window win to desktop desktop.
Definition: kwindowsystem_mac.cpp:406
static void handleAutoAppStartedSending()
Definition: kstartupinfo.cpp:637
void update(const KStartupInfoData &data)
Updates the notification data from the given data.
Definition: kstartupinfo.cpp:1296
int timeout
static bool sendFinishX(Display *dpy, const KStartupInfoId &id)
Like sendFinish , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:540
Qt::HANDLE appRootWindow(int screen)
Display * display()
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
void setTimeout(unsigned int secs)
Sets the timeout for notifications, after this timeout a notification is removed. ...
Definition: kstartupinfo.cpp:910
int screen() const
bool isNull() const
bool isEmpty() const
KStartupInfo(int flags, QObject *parent=0)
Creates an instance that will receive the startup notifications.
Definition: kstartupinfo.cpp:203
QString simplified() const
Definition: netwm_def.h:614
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
Definition: netwm_def.h:677
Definition: netwm_def.h:385
Class representing an identification of application startup notification.
Definition: kstartupinfo.h:368
QByteArray WMClass() const
Returns the WM_CLASS value for the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1422
int length() const
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
Definition: kwindowsystem_mac.cpp:366
void setBin(const QString &bin)
Sets the binary name of the application ( e.g.
Definition: kstartupinfo.cpp:1339
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KStartupInfoId & operator=(const KStartupInfoId &data)
Definition: kstartupinfo.cpp:1119
Definition: netwm_def.h:639
void setName(const QString &name)
Sets the name for the notification (e.g.
Definition: kstartupinfo.cpp:1349
void setTimestamp(unsigned long time)
Definition: kstartupinfo.cpp:1477
static KApplication * kApplication()
Returns the current application object.
Definition: kapplication.cpp:603
startup_t checkStartup(WId w)
Checks if the given windows matches any existing startup notification.
Definition: kstartupinfo.cpp:689
void setXinerama(int xinerama)
Sets the Xinerama screen for the startup notification ( i.e.
Definition: kstartupinfo.cpp:1497
static void setWindowStartupId(WId window, const QByteArray &id)
Sets the startup notification window property on the given window.
Definition: kstartupinfo.cpp:874
Definition: netwm_def.h:390
Definition: kstandardguiitem.h:50
int desktop() const
Returns the desktop for the startup notification.
Definition: kstartupinfo.cpp:1405
static bool sendChange(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition: kstartupinfo.cpp:496
static int currentDesktop()
Returns the current virtual desktop.
Definition: kwindowsystem_mac.cpp:384
QString applicationId() const
The .desktop file used to initiate this startup notification, or empty.
Definition: kstartupinfo.cpp:1533
static QByteArray read_startup_id_property(WId w_P)
Definition: kstartupinfo.cpp:831
int count(const T &value) const
bool operator!=(const KStartupInfoId &id) const
Overloaded operator.
Definition: kstartupinfo.cpp:1132
void append(const T &value)
void setDescription(const QString &descr)
Sets the description for the notification (e.g.
Definition: kstartupinfo.cpp:1366
static bool sendStartup(const KStartupInfoId &id, const KStartupInfoData &data)
Sends given notification data about started application with the given startup identification.
Definition: kstartupinfo.cpp:445
QByteArray hostname() const
Returns the hostname for the startup notification.
Definition: kstartupinfo.cpp:1441
Definition: netwm_def.h:388
Definition: netwm_def.h:340
Class representing data about an application startup notification.
Definition: kstartupinfo.h:439
void setIcon(const QString &icon)
Sets the icon for the startup notification ( e.g.
Definition: kstartupinfo.cpp:1383
unsigned long appUserTime()
int screen() const
The X11 screen on which the startup notification is happening, -1 if unknown.
Definition: kstartupinfo.cpp:1492
const QString & name() const
Returns the name of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1354
bool isEmpty() const
void setSilent(TriState state)
Sets whether the visual feedback for this startup notification should be silenced (temporarily suspen...
Definition: kstartupinfo.cpp:1467
QString trimmed() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
int xinerama() const
The Xinerama screen for the startup notification, -1 if unknown.
Definition: kstartupinfo.cpp:1502
WId winId() const
void setHostname(const QByteArray &hostname=QByteArray())
Sets the hostname on which the application is starting.
Definition: kstartupinfo.cpp:1427
T & first()
bool operator<(const KStartupInfoId &id) const
Definition: kstartupinfo.cpp:1138
Definition: kstartupinfo.h:568
iterator begin()
const QString & findName() const
Returns the name of the startup notification.
Definition: kstartupinfo.cpp:1359
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition: netwm.cpp:2640
void setApplicationId(const QString &desktop)
Sets the .desktop file that was used to initiate the startup notification.
Definition: kstartupinfo.cpp:1517
QList< pid_t > pids() const
Returns all PIDs for the startup notification.
Definition: kstartupinfo.cpp:1457
static QByteArray windowStartupId(WId w)
Returns startup notification identification of the given window.
Definition: kstartupinfo.cpp:852
iterator end()
unsigned long timestamp() const
Return the user timestamp for the startup notification, or 0 if no timestamp is set.
Definition: kstartupinfo.cpp:1149
Definition: netwm_def.h:634
static bool sendFinish(const KStartupInfoId &id)
Ends startup notification with the given identification.
Definition: kstartupinfo.cpp:527
bool setupStartupEnv() const
Sets the startup notification environment variable to this identification.
Definition: kstartupinfo.cpp:1080
static KWindowSystem * self()
Access to the singleton instance.
Definition: kwindowsystem_mac.cpp:308
bool is_pid(pid_t pid) const
Checks whether the given pid is in the list of PIDs for starup notification.
Definition: kstartupinfo.cpp:1462
long toLong(bool *ok, int base) const
virtual void customEvent(QEvent *event)
const QByteArray & id() const
Returns the notification identifier as string.
Definition: kstartupinfo.cpp:1034
WId launchedBy() const
The toplevel window of the application that caused this startup notification, 0 if unknown...
Definition: kstartupinfo.cpp:1512
void setWMClass(const QByteArray &wmclass)
Sets a WM_CLASS value for the startup notification, it may be used for increasing the chance that the...
Definition: kstartupinfo.cpp:1410
QString mid(int position, int n) const
static KStartupInfoId currentStartupIdEnv()
Returns the current startup notification identification for the current startup notification environm...
Definition: kstartupinfo.cpp:1090
void setScreen(int screen)
Sets the X11 screen on which the startup notification should happen.
Definition: kstartupinfo.cpp:1487
const QString & bin() const
Returns the binary name of the starting application.
Definition: kstartupinfo.cpp:1344
static void appStarted()
Manual notification that the application has started.
Definition: kstartupinfo.cpp:586
KStartupInfoData & operator=(const KStartupInfoData &data)
Definition: kstartupinfo.cpp:1288
static QByteArray createNewStartupId()
Creates and returns new startup id.
Definition: kstartupinfo.cpp:1012
static bool sendChangeX(Display *dpy, const KStartupInfoId &id, const KStartupInfoData &data)
Like sendChange , uses dpy instead of qt_x11display() for sending the info.
Definition: kstartupinfo.cpp:510
Definition: kstandardguiitem.h:50
bool operator==(const KStartupInfoId &id) const
Overloaded operator.
Definition: kstartupinfo.cpp:1127
Definition: netwm_def.h:387
const QChar at(int position) const
typedef ConstIterator
int length() const
char * data()
QString left(int n) const
QString fromLatin1(const char *str, int size)
Definition: netwm_def.h:391
Definition: netwm_def.h:392
Definition: kstartupinfo.h:568
const_iterator constEnd() const
const_iterator constBegin() const
const QString & icon() const
Returns the icon of the startup notification, or empty if not available.
Definition: kstartupinfo.cpp:1395
static void silenceStartup(bool silence)
If your application shows temporarily some window during its startup, for example a dialog...
Definition: kstartupinfo.cpp:626
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setDesktop(int desktop)
Sets the desktop for the startup notification ( i.e.
Definition: kstartupinfo.cpp:1400
Definition: netwm_def.h:389
void initId(const QByteArray &id="")
Initializes this object with the given identification ( which may be also "0" for no notification )...
Definition: kstartupinfo.cpp:1058
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void addPid(pid_t pid)
Adds a PID to the list of processes that belong to the startup notification.
Definition: kstartupinfo.cpp:1446
static QDebug kFatal(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
iterator begin()
Definition: netwm_def.h:635
TriState silent() const
Return the silence status for the startup notification.
Definition: kstartupinfo.cpp:1472
Definition: kstartupinfo.h:568
static bool broadcastMessageX(Display *disp, const char *msg_type, const QString &message, int screen, bool obsolete)
Broadcasts the given message with the given message type.
Definition: kxmessages.cpp:125
Definition: netwm_def.h:704
void setLaunchedBy(WId window)
Sets the toplevel window of the application that caused this startup notification.
Definition: kstartupinfo.cpp:1507
singleShot
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.