Messagelib

imagecollector.h
1/* -*- c++ -*-
2 * imagecollector.h
3 *
4 * This file is part of KMail, the KDE mail client.
5 * SPDX-FileCopyrightText: 2004 Marc Mutz <mutz@kde.org>
6 * SPDX-FileCopyrightText: 2011 Torgny Nyblom <nyblom@kde.org>
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#pragma once
12
13#include "messagecore_export.h"
14
15#include <QObject>
16#include <memory>
17#include <vector>
18namespace KMime
19{
20class Content;
21}
22
23namespace MessageCore
24{
25/**
26 * @short A helper class to collect the embedded images of a email.
27 *
28 * @author Marc Mutz <mutz@kde.org>
29 * @author Torgny Nyblom <nyblom@kde.org>
30 * @todo: Make it a simple static method?!?
31 */
32class MESSAGECORE_EXPORT ImageCollector
33{
34public:
35 /**
36 * Creates a new image collector.
37 */
39
40 /**
41 * Destroys the image collector.
42 */
44
45 /**
46 * Starts collecting the images.
47 *
48 * @param content The email content that contains the images.
49 */
50 void collectImagesFrom(KMime::Content *content);
51
52 /**
53 * Returns the collected images.
54 */
55 [[nodiscard]] const std::vector<KMime::Content *> &images() const;
56
57private:
58 //@cond PRIVATE
59 class ImageCollectorPrivate;
60 std::unique_ptr<ImageCollectorPrivate> const d;
61
62 Q_DISABLE_COPY(ImageCollector)
63 //@endcond
64};
65}
A helper class to collect the embedded images of a email.
~ImageCollector()
Destroys the image collector.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.