QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppThumbnail.h
1// SPDX-FileCopyrightText: 2022 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPTHUMBNAIL_H
6#define QXMPPTHUMBNAIL_H
7
8#include "QXmppGlobal.h"
9
10#include <optional>
11
12#include <QSharedDataPointer>
13
14class QDomElement;
15class QMimeType;
16class QXmlStreamWriter;
17class QXmppThumbnailPrivate;
18
19class QXMPP_EXPORT QXmppThumbnail
20{
21public:
26
27 QXmppThumbnail &operator=(const QXmppThumbnail &);
28 QXmppThumbnail &operator=(QXmppThumbnail &&) noexcept;
29
30 const QString &uri() const;
31 void setUri(const QString &newUri);
32
33 const QMimeType &mediaType() const;
34 void setMediaType(const QMimeType &);
35
36 std::optional<uint32_t> width() const;
37 void setWidth(std::optional<uint32_t>);
38
39 std::optional<uint32_t> height() const;
40 void setHeight(std::optional<uint32_t>);
41
43 bool parse(const QDomElement &);
44 void toXml(QXmlStreamWriter *writer) const;
46
47private:
48 QSharedDataPointer<QXmppThumbnailPrivate> d;
49};
50
51#endif // QXMPPTHUMBNAIL_H
Definition QXmppThumbnail.h:20
QXmppThumbnail(const QXmppThumbnail &)
Default copy-constructor.
QXmppThumbnail(QXmppThumbnail &&) noexcept
Default move-constructor.