KContacts

note.h
1/*
2 This file is part of the KContacts framework.
3 SPDX-FileCopyrightText: 2016-2019 Laurent Montel <montel@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef NOTE_H
9#define NOTE_H
10
11#include "kcontacts_export.h"
12
13#include <QMap>
14#include <QSharedDataPointer>
15#include <QString>
16
17namespace KContacts
18{
19class ParameterMap;
20
21/** @short Class that holds a Note for a contact.
22 * @since 5.3
23 */
24class KCONTACTS_EXPORT Note
25{
26 friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Note &);
27 friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Note &);
28 friend class VCardTool;
29
30public:
31 Note();
32 Note(const Note &other);
33 Note(const QString &note);
34
35 ~Note();
36
37 typedef QList<Note> List;
38
39 void setNote(const QString &note);
40 Q_REQUIRED_RESULT QString note() const;
41
42 Q_REQUIRED_RESULT bool isValid() const;
43
44 Q_REQUIRED_RESULT bool operator==(const Note &other) const;
45 Q_REQUIRED_RESULT bool operator!=(const Note &other) const;
46
47 Note &operator=(const Note &other);
48
49 Q_REQUIRED_RESULT QString toString() const;
50
51private:
52 KCONTACTS_NO_EXPORT void setParams(const ParameterMap &params);
53 Q_REQUIRED_RESULT KCONTACTS_NO_EXPORT ParameterMap params() const;
54
55 class Private;
57};
58KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Note &object);
59
60KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Note &object);
61}
62Q_DECLARE_TYPEINFO(KContacts::Note, Q_RELOCATABLE_TYPE);
63#endif // NOTE_H
Class that holds a Note for a contact.
Definition note.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.