Akonadi::EntityDisplayAttribute

Search for usage in LXR

Akonadi::EntityDisplayAttribute Class Reference

#include <entitydisplayattribute.h>

Inheritance diagram for Akonadi::EntityDisplayAttribute:

Public Member Functions

 EntityDisplayAttribute ()
 
 ~EntityDisplayAttribute () override
 
QIcon activeIcon () const
 
QString activeIconName () const
 
QColor backgroundColor () const
 
EntityDisplayAttributeclone () const override
 
void deserialize (const QByteArray &data) override
 
QString displayName () const
 
QIcon icon () const
 
QString iconName () const
 
QByteArray serialized () const override
 
void setActiveIconName (const QString &name)
 
void setBackgroundColor (const QColor &color)
 
void setDisplayName (const QString &name)
 
void setIconName (const QString &name)
 
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 an entity.

Display properties of a collection or item, such as translated names and icons.

Author
Volker Krause vkrau[email protected][email protected][email protected]de.or[email protected]g
Since
4.2

Definition at line 29 of file entitydisplayattribute.h.

Constructor & Destructor Documentation

◆ EntityDisplayAttribute()

EntityDisplayAttribute::EntityDisplayAttribute ( )
explicit

Creates a new entity display attribute.

Definition at line 22 of file entitydisplayattribute.cpp.

◆ ~EntityDisplayAttribute()

EntityDisplayAttribute::~EntityDisplayAttribute ( )
overridedefault

Destroys the entity display attribute.

Member Function Documentation

◆ activeIcon()

QIcon EntityDisplayAttribute::activeIcon ( ) const

Returns the icon that should be used for this collection or item when active.

Since
4.4

Definition at line 124 of file entitydisplayattribute.cpp.

◆ activeIconName()

QString EntityDisplayAttribute::activeIconName ( ) const

Returns the icon name of an active item.

Since
4.4

Definition at line 129 of file entitydisplayattribute.cpp.

◆ backgroundColor()

QColor EntityDisplayAttribute::backgroundColor ( ) const

Returns the backgroundColor or an invalid color if none is set.

Since
4.4

Definition at line 134 of file entitydisplayattribute.cpp.

◆ clone()

EntityDisplayAttribute * EntityDisplayAttribute::clone ( ) const
overridevirtual

Creates a copy of this attribute.

Implements Akonadi::Attribute.

Definition at line 60 of file entitydisplayattribute.cpp.

◆ deserialize()

void EntityDisplayAttribute::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 86 of file entitydisplayattribute.cpp.

◆ displayName()

QString EntityDisplayAttribute::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 29 of file entitydisplayattribute.cpp.

◆ icon()

QIcon EntityDisplayAttribute::icon ( ) const

Returns the icon that should be used for this collection or item.

Definition at line 39 of file entitydisplayattribute.cpp.

◆ iconName()

QString EntityDisplayAttribute::iconName ( ) const

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

Definition at line 44 of file entitydisplayattribute.cpp.

◆ serialized()

QByteArray EntityDisplayAttribute::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 70 of file entitydisplayattribute.cpp.

◆ setActiveIconName()

void EntityDisplayAttribute::setActiveIconName ( const QString name)

Sets the icon name for the active icon.

Parameters
namethe icon name to use
Since
4.4

Definition at line 119 of file entitydisplayattribute.cpp.

◆ setBackgroundColor()

void EntityDisplayAttribute::setBackgroundColor ( const QColor color)

Sets the backgroundColor to color.

Parameters
colorthe background color to use
Since
4.4

Definition at line 139 of file entitydisplayattribute.cpp.

◆ setDisplayName()

void EntityDisplayAttribute::setDisplayName ( const QString name)

Sets the name that should be used for display.

Definition at line 34 of file entitydisplayattribute.cpp.

◆ setIconName()

void EntityDisplayAttribute::setIconName ( const QString name)

Sets the icon name for the default icon.

Definition at line 49 of file entitydisplayattribute.cpp.

◆ type()

QByteArray EntityDisplayAttribute::type ( ) const
overridevirtual

Returns the type of the attribute.

Implements Akonadi::Attribute.

Definition at line 54 of file entitydisplayattribute.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 Thu Dec 8 2022 03:54:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.