• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.13.3 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
tag.h
1 /*
2  Copyright (c) 2014 Christian Mollekopf <mollekopf@kolabsys.com>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_TAG_H
21 #define AKONADI_TAG_H
22 
23 #include "akonadi_export.h"
24 #include <QString>
25 
26 namespace Akonadi {
27 class Tag;
28 }
29 
30 AKONADI_EXPORT uint qHash( const Akonadi::Tag & );
31 
32 
33 #include <akonadi/attributeentity.h>
34 #include <QVector>
35 #include <QSharedPointer>
36 #include <KUrl>
37 #include <QDebug>
38 
39 namespace Akonadi {
40 
44 class AKONADI_EXPORT Tag : public AttributeEntity
45 {
46 public:
47  typedef QList<Tag> List;
48  typedef qint64 Id;
49 
58  static const char* PLAIN;
59 
60  Tag();
61  explicit Tag(Id id);
65  explicit Tag(const QString &name);
66 
67  Tag(const Tag &other);
68 
69  ~Tag();
70 
71  Tag &operator=(const Tag &);
72  //Avoid slicing
73  AttributeEntity &operator=(const AttributeEntity &);
74  bool operator==(const Tag &) const;
75 
76  static Tag fromUrl( const KUrl &url );
77 
81  KUrl url() const;
82 
86  void setId(Id identifier);
87 
91  Id id() const;
92 
93  void setGid(const QByteArray &gid) const;
94  QByteArray gid() const;
95 
96  void setRemoteId(const QByteArray &remoteId) const;
97  QByteArray remoteId() const;
98 
99  void setType(const QByteArray &type) const;
100  QByteArray type() const;
101 
102  void setName(const QString &name);
103  QString name() const;
104 
105  void setParent(const Tag &parent);
106  Tag parent() const;
107 
108  bool isValid() const;
109 
114  bool isImmutable() const;
115 
116 private:
117  class Private;
118  QSharedPointer<Private> d;
119 };
120 
121 }
122 
123 AKONADI_EXPORT QDebug &operator<<(QDebug &debug, const Akonadi::Tag &tag);
124 
125 Q_DECLARE_METATYPE(Akonadi::Tag)
126 Q_DECLARE_METATYPE(Akonadi::Tag::List)
127 Q_DECLARE_METATYPE(QSet<Akonadi::Tag>)
128 
129 #endif
Akonadi::AttributeEntity
Parent class for entities that can have attributes.
Definition: attributeentity.h:40
Akonadi::Tag::PLAIN
static const char * PLAIN
The PLAIN type has the following properties:
Definition: tag.h:58
Akonadi::Tag
An Akonadi Tag.
Definition: tag.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon Jul 21 2014 08:03:56 by doxygen 1.8.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.13.3 API Reference

Skip menu "kdepimlibs-4.13.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal