Akonadi::TagAttribute

Search for usage in LXR

Akonadi::TagAttribute Class Reference

#include <tagattribute.h>

Inheritance diagram for Akonadi::TagAttribute:

Public Member Functions

QColor backgroundColor () const
 
TagAttributeclone () const override
 
void deserialize (const QByteArray &data) override
 
QString displayName () const
 
QString font () const
 
QString iconName () const
 
bool inToolbar () const
 
int priority () const
 
QByteArray serialized () const override
 
void setBackgroundColor (const QColor &color)
 
void setDisplayName (const QString &name)
 
void setFont (const QString &fontKey)
 
void setIconName (const QString &name)
 
void setInToolbar (bool inToolbar)
 
void setPriority (int priority)
 
void setShortcut (const QString &shortcut)
 
void setTextColor (const QColor &color)
 
QString shortcut () const
 
QColor textColor () const
 
QByteArray type () const override
 
- Public Member Functions inherited from Akonadi::Attribute
virtual ~Attribute ()
 

Additional Inherited Members

- Public Types inherited from Akonadi::Attribute
using List = QList< Attribute * >
 
- Protected Member Functions inherited from Akonadi::Attribute
 Attribute (const Attribute &)=default
 

Detailed Description

Attribute that stores the properties that are used to display a tag.

Since
4.13

Definition at line 26 of file tagattribute.h.

Member Function Documentation

◆ clone()

TagAttribute * TagAttribute::clone ( ) const
overridevirtual

Creates a copy of this attribute.

Implements Akonadi::Attribute.

Definition at line 59 of file tagattribute.cpp.

◆ deserialize()

void TagAttribute::deserialize ( const QByteArray data)
overridevirtual

Sets the data of this attribute, using the same encoding as returned by toByteArray().

Parameters
dataThe encoded attribute data.

Implements Akonadi::Attribute.

Definition at line 121 of file tagattribute.cpp.

◆ displayName()

QString TagAttribute::displayName ( ) const

Returns the name that should be used for display.

Users of this should fall back to Collection::name() if this is empty.

Definition at line 33 of file tagattribute.cpp.

◆ iconName()

QString TagAttribute::iconName ( ) const

Returns the icon name of the icon returned by icon().

Definition at line 43 of file tagattribute.cpp.

◆ priority()

int TagAttribute::priority ( ) const

Returns the priority of the tag.

The default value is -1

Definition at line 198 of file tagattribute.cpp.

◆ serialized()

QByteArray TagAttribute::serialized ( ) const
overridevirtual

Returns a QByteArray representation of the attribute which will be storaged.

This can be raw binary data, no encoding needs to be applied.

Implements Akonadi::Attribute.

Definition at line 73 of file tagattribute.cpp.

◆ setDisplayName()

void TagAttribute::setDisplayName ( const QString name)

Sets the name that should be used for display.

Definition at line 38 of file tagattribute.cpp.

◆ setIconName()

void TagAttribute::setIconName ( const QString name)

Sets the icon name for the default icon.

Definition at line 48 of file tagattribute.cpp.

◆ setPriority()

void TagAttribute::setPriority ( int  priority)

Sets the priority of the tag.

The priority is primarily used for presentation, e.g. for sorting. If only one tag can be displayed for a given item, the one with the highest priority should be shown.

Definition at line 193 of file tagattribute.cpp.

◆ type()

QByteArray Akonadi::TagAttribute::type ( ) const
overridevirtual

Returns the type of the attribute.

Implements Akonadi::Attribute.

Definition at line 53 of file tagattribute.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 03:57:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.