libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
stickerevent.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020 Carl Schwan <carlschwan@kde.org>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "roomevent.h"
7#include "eventcontent.h"
8
9namespace Quotient {
10
11/// Sticker messages are specialised image messages that are displayed without
12/// controls (e.g. no "download" link, or light-box view on click, as would be
13/// displayed for for m.image events).
16{
17public:
18 QUO_EVENT(StickerEvent, "m.sticker")
19
22 {
24 }
25
26 /// \brief A textual representation or associated description of the
27 /// sticker image.
28 ///
29 /// This could be the alt text of the original image, or a message to
30 /// accompany and further describe the sticker.
32
33 /// \brief Metadata about the image referred to in url including a
34 /// thumbnail representation.
36 {
37 if (!m_imageContent)
39 return *m_imageContent;
40 }
41
42 /// \brief The URL to the sticker image. This must be a valid mxc:// URI.
43 QUrl url() const
44 {
45 return image().url();
46 }
47
48protected:
50
51private:
53};
54} // namespace Quotient
#define QUO_CONTENT_GETTER(PartType_, PartName_)
Define an inline method obtaining a content part.
Definition event.h:452
#define QUO_EVENT(CppType_, MatrixType_)
Supply event metatype information in (specific) event types.
Definition event.h:428
#define QUOTIENT_API