MailCommon::Tag Class
class MailCommon::TagThe Tag class. More...
| Header: | #include <MailCommon/Tag> |
| CMake: | find_package(KPim6MailCommon REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MailCommon) |
Public Functions
| qint64 | id() const |
| QString | name() const |
| Akonadi::Tag | saveToAkonadi(MailCommon::Tag::SaveFlags saveFlags = SaveFlags(TextColor | BackgroundColor | Font)) const |
| Akonadi::Tag | tag() const |
| bool | operator!=(const MailCommon::Tag &other) const |
| bool | operator==(const MailCommon::Tag &other) const |
Static Public Members
| bool | compare(const MailCommon::Tag::Ptr &tag1, const MailCommon::Tag::Ptr &tag2) |
| bool | compareName(const MailCommon::Tag::Ptr &tag1, const MailCommon::Tag::Ptr &tag2) |
| MailCommon::Tag::Ptr | createDefaultTag(const QString &name) |
| MailCommon::Tag::Ptr | fromAkonadi(const Akonadi::Tag &tag) |
Detailed Description
Member Function Documentation
[static] bool Tag::compare(const MailCommon::Tag::Ptr &tag1, const MailCommon::Tag::Ptr &tag2)
Compares two tags based on their priority.
tag1 The first tag to compare tag2 The second tag to compare Returns True if tag1 has higher priority than tag2
[static] bool Tag::compareName(const MailCommon::Tag::Ptr &tag1, const MailCommon::Tag::Ptr &tag2)
Compares two tags alphabetically by name.
tag1 The first tag to compare tag2 The second tag to compare Returns True if tag1's name comes before tag2's name alphabetically
[static] MailCommon::Tag::Ptr Tag::createDefaultTag(const QString &name)
Creates a default tag with the specified name.
name The name of the new tag Returns A shared pointer to the newly created tag
[static] MailCommon::Tag::Ptr Tag::fromAkonadi(const Akonadi::Tag &tag)
Creates a Tag from an Akonadi::Tag object.
tag The Akonadi tag to convert Returns A shared pointer to the newly created Tag
qint64 Tag::id() const
Returns the unique identifier for this tag.
Returns The tag's ID
QString Tag::name() const
Returns the human-readable name of this tag.
Returns The tag's name
Akonadi::Tag Tag::saveToAkonadi(MailCommon::Tag::SaveFlags saveFlags = SaveFlags(TextColor | BackgroundColor | Font)) const
Converts this tag to an Akonadi::Tag object.
saveFlags Flags indicating which attributes to save Returns An Akonadi::Tag containing the tag's data
Akonadi::Tag Tag::tag() const
Returns the underlying Akonadi::Tag object.
Returns The Akonadi tag
bool Tag::operator!=(const MailCommon::Tag &other) const
Compares this tag with another tag for inequality.
other The other tag to compare with Returns True if the tags are not equal, false otherwise
bool Tag::operator==(const MailCommon::Tag &other) const
Compares this tag with another tag for equality.
other The other tag to compare with Returns True if the tags are equal, false otherwise