Akonadi

specialcollectionattribute.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadicore_export.h"
10#include "attribute.h"
11
12#include <QByteArray>
13
14#include <memory>
15
16namespace Akonadi
17{
18class SpecialCollectionAttributePrivate;
19
20/**
21 * @short An Attribute that stores the special collection type of a collection.
22 *
23 * All collections registered with SpecialCollections must have this attribute set.
24 *
25 * @author Constantin Berzan <exit3219@gmail.com>
26 * @since 4.4
27 */
28class AKONADICORE_EXPORT SpecialCollectionAttribute : public Akonadi::Attribute
29{
30public:
31 /**
32 * Creates a new special collection attribute.
33 */
34 explicit SpecialCollectionAttribute(const QByteArray &type = QByteArray());
35
36 /**
37 * Destroys the special collection attribute.
38 */
40
41 /**
42 * Sets the special collections @p type of the collection.
43 */
44 void setCollectionType(const QByteArray &type);
45
46 /**
47 * Returns the special collections type of the collection.
48 */
49 [[nodiscard]] QByteArray collectionType() const;
50
51 /* reimpl */
52 SpecialCollectionAttribute *clone() const override;
53 [[nodiscard]] QByteArray type() const override;
54 [[nodiscard]] QByteArray serialized() const override;
55 void deserialize(const QByteArray &data) override;
56
57private:
58 /// @cond PRIVATE
59 const std::unique_ptr<SpecialCollectionAttributePrivate> d;
60 /// @endcond
61};
62
63} // namespace Akonadi
Provides interface for custom attributes for Entity.
Definition attribute.h:132
An Attribute that stores the special collection type of a collection.
~SpecialCollectionAttribute() override
Destroys the special collection attribute.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.