KStartupInfoId Class

Class representing an identification of application startup notification. More...

Header: #include <KStartupInfo>
CMake: find_package(KF6 REQUIRED COMPONENTS KWindowSystem)
target_link_libraries(mytarget PRIVATE KF6::KWindowSystem)

Public Functions

KStartupInfoId()
KStartupInfoId(const KStartupInfoId &data)
const QByteArray &id() const
void initId(const QByteArray &id = "")
bool isNull() const
bool setupStartupEnv() const
unsigned long timestamp() const
bool operator!=(const KStartupInfoId &id) const
bool operator==(const KStartupInfoId &id) const

Detailed Description

Every existing notification about a starting application has its own unique identification, that's used to identify and manipulate the notification.

See also KStartupInfo and KStartupInfoData.

Member Function Documentation

KStartupInfoId::KStartupInfoId()

Creates an empty identification

KStartupInfoId::KStartupInfoId(const KStartupInfoId &data)

Copy constructor.

const QByteArray &KStartupInfoId::id() const

Returns the notification identifier as string.

void KStartupInfoId::initId(const QByteArray &id = "")

Initializes this object with the given identification (which may be also "0" for no notification), or if "" is given, tries to read it from the startup notification environment variable, and if it's not set, creates a new one.

id The new identification, "0" for no notification or "" to read the environment variable.

bool KStartupInfoId::isNull() const

Checks whether the identifier is valid.

Returns true if this object doesn't represent a valid notification identification.

bool KStartupInfoId::setupStartupEnv() const

Sets the startup notification environment variable to this identification.

Returns true if successful, false otherwise.

unsigned long KStartupInfoId::timestamp() const

Returns the user timestamp for the startup notification, or 0 if no timestamp is set.

bool KStartupInfoId::operator!=(const KStartupInfoId &id) const

Overloaded operator.

Returns true if the given notification id is different.

bool KStartupInfoId::operator==(const KStartupInfoId &id) const

Overloaded operator.

Returns true if the given notification id is the same.