libQuotient
A Qt library for building matrix clients
Quotient::EventContent::ImageInfo Struct Reference

A content info class for image/video content types and thumbnails. More...

#include <eventcontent.h>

Inheritance diagram for Quotient::EventContent::ImageInfo:
Collaboration diagram for Quotient::EventContent::ImageInfo:

Public Member Functions

 ImageInfo ()=default
 
 ImageInfo (const QFileInfo &fi, QSize imageSize={})
 
 ImageInfo (FileSourceInfo sourceInfo, qint64 fileSize=-1, const QMimeType &type={}, QSize imageSize={}, const QString &originalFilename={})
 
 ImageInfo (FileSourceInfo sourceInfo, const QJsonObject &infoJson, const QString &originalFilename={})
 
- Public Member Functions inherited from Quotient::EventContent::FileInfo
 FileInfo ()=default
 
 FileInfo (const QFileInfo &fi)
 Construct from a QFileInfo object. More...
 
 FileInfo (FileSourceInfo sourceInfo, qint64 payloadSize=-1, const QMimeType &mimeType={}, QString originalFilename={})
 
 FileInfo (FileSourceInfo sourceInfo, const QJsonObject &infoJson, QString originalFilename={})
 Construct from a JSON info payload. More...
 
bool isValid () const
 
QUrl url () const
 
QString mediaId () const
 Extract media id from the URL. More...
 

Public Attributes

QSize imageSize
 
- Public Attributes inherited from Quotient::EventContent::FileInfo
FileSourceInfo source
 
QJsonObject originalInfoJson
 
QMimeType mimeType
 
qint64 payloadSize = 0
 
QString originalName
 

Detailed Description

A content info class for image/video content types and thumbnails.

Definition at line 127 of file eventcontent.h.

Constructor & Destructor Documentation

◆ ImageInfo() [1/4]

Quotient::EventContent::ImageInfo::ImageInfo ( )
default

◆ ImageInfo() [2/4]

Quotient::EventContent::ImageInfo::ImageInfo ( const QFileInfo &  fi,
QSize  imageSize = {} 
)
explicit

◆ ImageInfo() [3/4]

Quotient::EventContent::ImageInfo::ImageInfo ( FileSourceInfo  sourceInfo,
qint64  fileSize = -1,
const QMimeType &  type = {},
QSize  imageSize = {},
const QString &  originalFilename = {} 
)
explicit

◆ ImageInfo() [4/4]

Quotient::EventContent::ImageInfo::ImageInfo ( FileSourceInfo  sourceInfo,
const QJsonObject &  infoJson,
const QString &  originalFilename = {} 
)

Member Data Documentation

◆ imageSize

QSize Quotient::EventContent::ImageInfo::imageSize

Definition at line 136 of file eventcontent.h.


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