KTnef

ktnefpropertyset.h
Go to the documentation of this file.
1 /*
2  ktnefpropertyset.h
3 
4  SPDX-FileCopyrightText: 2002 Michael Goffioul <[email protected]>
5 
6  This file is part of KTNEF, the KDE TNEF support library/program.
7 
8  SPDX-License-Identifier: LGPL-2.0-or-later
9  */
18 #ifndef KTNEFPROPERTYSET_H
19 #define KTNEFPROPERTYSET_H
20 
21 #include <QMap>
22 #include <QVariant>
23 class KTNEFPropertySetPrivate;
24 #include "ktnef_export.h"
25 
26 namespace KTnef
27 {
28 class KTNEFProperty;
29 }
30 
31 namespace KTnef
32 {
33 
38 class KTNEF_EXPORT KTNEFPropertySet
39 {
40 public:
45 
50 
60  void addProperty(int key, int type, const QVariant &value,
61  const QVariant &name = QVariant(), bool overwrite = false);
62 
74  Q_REQUIRED_RESULT QString findProp(int key, const QString &fallback = QString(),
75  bool convertToUpper = false) const;
76 
88  Q_REQUIRED_RESULT QString findNamedProp(const QString &name,
89  const QString &fallback = QString(),
90  bool convertToUpper = false) const;
91 
95  QMap<int, KTNEFProperty *> &properties();
96 
100  const QMap<int, KTNEFProperty *> &properties() const; //krazy:exclude=constref
101 
109  Q_REQUIRED_RESULT QVariant property(int key) const;
110 
119  void addAttribute(int key, int type, const QVariant &value,
120  bool overwrite = false);
121 
125  Q_REQUIRED_RESULT QMap<int, KTNEFProperty *> &attributes();
126 
130  const QMap<int, KTNEFProperty *> &attributes() const; //krazy:exclude=constref
131 
139  Q_REQUIRED_RESULT QVariant attribute(int key) const;
140 
146  void clear(bool deleteAll = false);
147 
148 private:
149  //@cond PRIVATE
150  KTNEFPropertySetPrivate *const d;
151  //@endcond
152 
153  Q_DISABLE_COPY(KTNEFPropertySet)
154 };
155 
156 }
157 #endif
Interface for setting MAPI properties and TNEF attributes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Oct 28 2020 23:21:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.