KTnef

ktnefmessage.h
Go to the documentation of this file.
1/*
2 ktnefmessage.h
3
4 SPDX-FileCopyrightText: 2002 Michael Goffioul <kdeprint@swing.be>
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 */
10/**
11 * @file
12 * This file is part of the API for handling TNEF data and
13 * defines the KTNEFMessage class.
14 *
15 * @author Michael Goffioul
16 */
17
18#pragma once
19
20#include <QList>
21
22#include "ktnef_export.h"
23#include "ktnefpropertyset.h"
24#include <memory>
25namespace KTnef
26{
27class KTNEFAttach;
28}
29
30namespace KTnef
31{
32/**
33 * @brief
34 * Represents a @acronym TNEF message.
35 */
36class KTNEF_EXPORT KTNEFMessage : public KTNEFPropertySet
37{
38public:
39 /**
40 * Creates a KTNEFMessage message object.
41 */
43
44 /**
45 * Destroys a KTNEFMessage message object.
46 */
48
49 /**
50 * Return a QList containing all the message's attachments.
51 */
53
54 /**
55 * Find the attachment associated to the specified file name.
56 *
57 * @param filename is a QString containing the file to search for in the
58 * list of message attachments.
59 *
60 * @return A pointer to KTNEFAttach object, or 0 if the search fails.
61 */
62 KTNEFAttach *attachment(const QString &filename) const;
63
64 /**
65 * Append an attachment to the message.
66 * @param attach is a pointer to a KTNEFAttach object to be attached.
67 */
68 void addAttachment(KTNEFAttach *attach);
69
70 /**
71 * Clear the attachments list.
72 */
73 void clearAttachments();
74
75 /**
76 * Returns the Rich Text Format (@acronym RTF) data contained in the message.
77 * @return A QString containing the @acronym RTF data.
78 */
79 [[nodiscard]] QString rtfString() const;
80
81private:
82 //@cond PRIVATE
83 class MessagePrivate;
84 std::unique_ptr<MessagePrivate> const d;
85 //@endcond
86
87 Q_DISABLE_COPY(KTNEFMessage)
88};
89
90}
Represents a TNEF attachment.
Definition ktnefattach.h:38
void clearAttachments()
Clear the attachments list.
QString rtfString() const
Returns the Rich Text Format (RTF) data contained in the message.
void addAttachment(KTNEFAttach *attach)
Append an attachment to the message.
~KTNEFMessage()
Destroys a KTNEFMessage message object.
const QList< KTNEFAttach * > & attachmentList() const
Return a QList containing all the message's attachments.
KTNEFAttach * attachment(const QString &filename) const
Find the attachment associated to the specified file name.
KTNEFMessage()
Creates a KTNEFMessage message object.
This file is part of the API for handling TNEF data and defines the KTNEFPropertySet class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:02:08 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.