libQuotient
A Qt library for building matrix clients
Quotient::EventContent::TextContent Class Reference

Rich text content for m.text, m.emote, m.notice. More...

#include <eventcontent.h>

Inheritance diagram for Quotient::EventContent::TextContent:
Collaboration diagram for Quotient::EventContent::TextContent:

Public Member Functions

 TextContent (QString text, const QString &contentType)
 
 TextContent (const QJsonObject &json)
 
QMimeType type () const override
 
- Public Member Functions inherited from Quotient::EventContent::Base
 Base (QJsonObject o={})
 
virtual ~Base ()=default
 
QJsonObject toJson () const
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&)=delete
 

Public Attributes

QMimeType mimeType
 
QString body
 
- Public Attributes inherited from Quotient::EventContent::Base
QJsonObject originalJson
 

Protected Member Functions

void fillJson (QJsonObject &json) const override
 
- Protected Member Functions inherited from Quotient::EventContent::Base
 Base (const Base &)=default
 
 Base (Base &&) noexcept=default
 

Detailed Description

Rich text content for m.text, m.emote, m.notice.

Available fields: mimeType, body. The body can be either rich text or plain text, depending on what mimeType specifies.

Definition at line 185 of file eventcontent.h.

Constructor & Destructor Documentation

◆ TextContent() [1/2]

Quotient::EventContent::TextContent::TextContent ( QString  text,
const QString &  contentType 
)

◆ TextContent() [2/2]

Quotient::EventContent::TextContent::TextContent ( const QJsonObject &  json)
explicit

Member Function Documentation

◆ fillJson()

void Quotient::EventContent::TextContent::fillJson ( QJsonObject &  json) const
overrideprotectedvirtual

◆ type()

QMimeType Quotient::EventContent::TextContent::type ( ) const
inlineoverridevirtual

Implements Quotient::EventContent::Base.

Definition at line 190 of file eventcontent.h.

Member Data Documentation

◆ body

QString Quotient::EventContent::TextContent::body

Definition at line 193 of file eventcontent.h.

◆ mimeType

QMimeType Quotient::EventContent::TextContent::mimeType

Definition at line 192 of file eventcontent.h.


The documentation for this class was generated from the following file: