Akonadi::EntityHiddenAttribute

Search for usage in LXR

Akonadi::EntityHiddenAttribute Class Reference

#include <entityhiddenattribute.h>

Inheritance diagram for Akonadi::EntityHiddenAttribute:

Public Member Functions

 EntityHiddenAttribute ()
 
 ~EntityHiddenAttribute () override
 
EntityHiddenAttributeclone () const override
 
void deserialize (const QByteArray &data) override
 
QByteArray serialized () const override
 
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

An Attribute that marks that an entity should be hidden in the UI.

This class represents the attribute of all hidden items. The hidden items shouldn't be displayed in UI applications (unless in some kind of "debug" mode).

Example:

using namespace Akonadi;
...
// hide a collection by setting the hidden attribute
Collection collection = collectionFetchJob->collections().at(0);
new CollectionModifyJob( collection, this ); // save back to storage
// check if the collection is hidden
if ( collection.hasAttribute<EntityHiddenAttribute>() )
qDebug() << "collection is hidden";
else
qDebug() << "collection is visible";
Author
Szymon Stefanek s.ste[email protected]fane[email protected][email protected][email protected]il.c[email protected]om
See also
Akonadi::Attribute
Since
4.4

Definition at line 57 of file entityhiddenattribute.h.

Constructor & Destructor Documentation

◆ EntityHiddenAttribute()

EntityHiddenAttribute::EntityHiddenAttribute ( )
explicitdefault

Creates a new entity hidden attribute.

◆ ~EntityHiddenAttribute()

EntityHiddenAttribute::~EntityHiddenAttribute ( )
overridedefault

Destroys the entity hidden attribute.

Member Function Documentation

◆ clone()

EntityHiddenAttribute * EntityHiddenAttribute::clone ( ) const
overridevirtual

Reimplemented from Attribute.

Implements Akonadi::Attribute.

Definition at line 28 of file entityhiddenattribute.cpp.

◆ deserialize()

void EntityHiddenAttribute::deserialize ( const QByteArray data)
overridevirtual

Reimplemented from Attribute.

Implements Akonadi::Attribute.

Definition at line 38 of file entityhiddenattribute.cpp.

◆ serialized()

QByteArray EntityHiddenAttribute::serialized ( ) const
overridevirtual

Reimplemented from Attribute.

Implements Akonadi::Attribute.

Definition at line 33 of file entityhiddenattribute.cpp.

◆ type()

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

Reimplemented from Attribute.

Implements Akonadi::Attribute.

Definition at line 23 of file entityhiddenattribute.cpp.


The documentation for this class was generated from the following files:
Job that modifies a collection in the Akonadi storage.
Represents a collection of PIM items.
Definition: collection.h:61
Attribute * attribute(const QByteArray &name)
Returns the attribute of the given type name if available, 0 otherwise.
Definition: collection.cpp:176
An Attribute that marks that an entity should be hidden in the UI.
bool hasAttribute(const QByteArray &name) const
Returns true if the collection has an attribute of the given type name, false otherwise.
Definition: collection.cpp:161
@ AddIfMissing
Creates the attribute if it is missing.
Definition: collection.h:281
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 16 2022 04:00:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.