Akonadi

tagfetchscope.h
1 /*
2  Copyright (c) 2014 Christian Mollekopf <[email protected]>
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 TAGFETCHSCOPE_H
21 #define TAGFETCHSCOPE_H
22 
23 #include "akonadicore_export.h"
24 
25 #include <QSharedPointer>
26 
27 namespace Akonadi
28 {
29 
35 class AKONADICORE_EXPORT TagFetchScope
36 {
37 public:
38 
45  TagFetchScope();
46 
50  TagFetchScope(const TagFetchScope &other);
51 
55  ~TagFetchScope();
56 
60  TagFetchScope &operator=(const TagFetchScope &other);
61 
69  QSet<QByteArray> attributes() const;
70 
76  void setFetchRemoteId(bool fetchRemoteId);
77 
81  bool fetchRemoteId() const;
82 
86  void setFetchAllAttributes(bool fetchAllAttributes);
87 
91  bool fetchAllAttributes() const;
92 
99  void fetchAttribute(const QByteArray &type, bool fetch = true);
100 
106  template <typename T> inline void fetchAttribute(bool fetch = true)
107  {
108  T dummy;
109  fetchAttribute(dummy.type(), fetch);
110  }
111 
119  void setFetchIdOnly(bool fetchIdOnly);
120 
127  bool fetchIdOnly() const;
128 
129 private:
130  struct Private;
131  //@cond PRIVATE
133  //@endcond
134 };
135 
136 }
137 
138 // Q_DECLARE_METATYPE(Akonadi::TagFetchScope)
139 
140 #endif
Specifies which parts of a tag should be fetched from the Akonadi storage.
Definition: tagfetchscope.h:35
void fetchAttribute(bool fetch=true)
Sets whether the attribute of the requested type should be fetched.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 23 2020 22:45:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.