Akonadi

collectioncolorattribute.h
1 /*
2  * SPDX-FileCopyrightText: 2015 Sandro Knauß <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 #pragma once
8 
9 #include "akonadicore_export.h"
10 
11 #include "attribute.h"
12 
13 #include <QColor>
14 
15 namespace Akonadi
16 {
17 /**
18  * @short Attribute that stores colors of a collection.
19  *
20  * Storing color in Akonadi makes it possible to sync them between client and server.
21  *
22  * @author Sandro Knauß <[email protected]>
23  * @since 5.3
24  */
25 
26 class AKONADICORE_EXPORT CollectionColorAttribute : public Akonadi::Attribute
27 {
28 public:
29  explicit CollectionColorAttribute() = default;
30  explicit CollectionColorAttribute(const QColor &color);
31 
32  ~CollectionColorAttribute() override = default;
33 
34  void setColor(const QColor &color);
35  QColor color() const;
36 
37  QByteArray type() const override;
38  CollectionColorAttribute *clone() const override;
39  QByteArray serialized() const override;
40  void deserialize(const QByteArray &data) override;
41 
42 private:
43  QColor mColor;
44 };
45 
46 } // namespace Akonadi
47 
Provides interface for custom attributes for Entity.
Definition: attribute.h:124
Attribute that stores colors of a collection.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.