KIdentityManagementWidgets::IdentityCombo Class

class KIdentityManagementWidgets::IdentityCombo

A combo box that always shows the up-to-date identity list. More...

Header: #include <KIdentityManagementWidgets/IdentityCombo>
CMake: find_package(KPim6IdentityManagementWidgets REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::IdentityManagementWidgets)
Inherits: QComboBox

Public Functions

IdentityCombo(KIdentityManagementCore::IdentityManager *manager, QWidget *parent = nullptr)
virtual ~IdentityCombo() override
KIdentityManagementCore::Identity::Id currentIdentity() const
QString currentIdentityName() const
(since 6.3) bool enablePlasmaActivities() const
(since 6.1) KIdentityManagementCore::IdentityActivitiesAbstract *identityActivitiesAbstract() const
KIdentityManagementCore::IdentityManager *identityManager() const
bool isDefaultIdentity() const
void setCurrentIdentity(KIdentityManagementCore::Identity::Id uoid)
void setCurrentIdentity(const KIdentityManagementCore::Identity &identity)
void setCurrentIdentity(const QString &identityName)
(since 6.3) void setEnablePlasmaActivities(bool newEnablePlasmaActivities)
(since 6.1) void setIdentityActivitiesAbstract(KIdentityManagementCore::IdentityActivitiesAbstract *newIdentityActivitiesAbstract)
void setShowDefault(bool showDefault)

Public Slots

Signals

void identityChanged(KIdentityManagementCore::Identity::Id uoid)
void identityDeleted(KIdentityManagementCore::Identity::Id uoid)
void invalidIdentity()

Protected Slots

void slotEmitChanged(int index)
void slotUpdateTooltip(uint uoid)

Detailed Description

Author: Marc Mutz <mutz@kde.org>

Member Function Documentation

[explicit] IdentityCombo::IdentityCombo(KIdentityManagementCore::IdentityManager *manager, QWidget *parent = nullptr)

IdentityCombo constructor manager parent

[override virtual noexcept] IdentityCombo::~IdentityCombo()

Destroys the identity combo box.

KIdentityManagementCore::Identity::Id IdentityCombo::currentIdentity() const

currentIdentity Returns the current identity id.

See also setCurrentIdentity().

QString IdentityCombo::currentIdentityName() const

currentIdentityName Returns the current identity name.

[since 6.3] bool IdentityCombo::enablePlasmaActivities() const

enablePlasmaActivities Returns

This function was introduced in 6.3.

See also setEnablePlasmaActivities().

[since 6.1] KIdentityManagementCore::IdentityActivitiesAbstract *IdentityCombo::identityActivitiesAbstract() const

identityActivitiesAbstract Returns

This function was introduced in 6.1.

See also setIdentityActivitiesAbstract().

[signal] void IdentityCombo::identityChanged(KIdentityManagementCore::Identity::Id uoid)

Emitted whenever the current identity changes

This signal is emitted whenever the current identity changes, either by user intervention, on setCurrentIdentity() call, or if the current identity disappears.

You might also want to listen to IdentityManager::changed, IdentityManager::deleted and IdentityManager::added.

uoid the unique object identifier of the new current identity

[signal] void IdentityCombo::identityDeleted(KIdentityManagementCore::Identity::Id uoid)

identityDeleted uoid the unique object identifier of the deleted identity

KIdentityManagementCore::IdentityManager *IdentityCombo::identityManager() const

identityManager Returns the IdentityManager used in this combo box

[signal] void IdentityCombo::invalidIdentity()

invalidIdentity Emitted when the current identity becomes invalid

bool IdentityCombo::isDefaultIdentity() const

isDefaultIdentity Returns whether the current identity is the default identity.

void IdentityCombo::setCurrentIdentity(KIdentityManagementCore::Identity::Id uoid)

Set the current identity by Id uoid

See also currentIdentity().

void IdentityCombo::setCurrentIdentity(const KIdentityManagementCore::Identity &identity)

Set the current identity identity

void IdentityCombo::setCurrentIdentity(const QString &identityName)

Set the current identity by name. identityName

[since 6.3] void IdentityCombo::setEnablePlasmaActivities(bool newEnablePlasmaActivities)

setEnablePlasmaActivities newEnablePlasmaActivities

This function was introduced in 6.3.

See also enablePlasmaActivities().

[since 6.1] void IdentityCombo::setIdentityActivitiesAbstract(KIdentityManagementCore::IdentityActivitiesAbstract *newIdentityActivitiesAbstract)

Sets newIdentityActivitiesAbstract as the activities handler used for filtering.

This function was introduced in 6.1.

See also identityActivitiesAbstract().

void IdentityCombo::setShowDefault(bool showDefault)

Show (default) on the default identity. By default this behavior is disabled. showDefault

[protected slot] void IdentityCombo::slotEmitChanged(int index)

Internal slot to emit the identity changed signal index the index of the combo box that changed

[slot] void IdentityCombo::slotIdentityManagerChanged()

Connected to IdentityManager::changed() Reloads the list of identities.

[protected slot] void IdentityCombo::slotUpdateTooltip(uint uoid)

Internal slot to update the tooltip uoid the unique object identifier of the identity