libQuotient
A Qt library for building matrix clients
|
#include <avatar.h>
Public Types | |
using | get_callback_t = std::function< void()> |
using | upload_callback_t = std::function< void(QUrl)> |
Public Member Functions | |
Avatar (Connection *parent, const QUrl &url={}) | |
QImage | get (int dimension, get_callback_t callback) const |
QImage | get (int width, int height, get_callback_t callback) const |
bool | upload (const QString &fileName, upload_callback_t callback) const |
bool | upload (QIODevice *source, upload_callback_t callback) const |
QFuture< QUrl > | upload (const QString &fileName) const |
QFuture< QUrl > | upload (QIODevice *source) const |
bool | isEmpty () const |
QString | mediaId () const |
QUrl | url () const |
bool | updateUrl (const QUrl &newUrl) |
Static Public Member Functions | |
static bool | isUrlValid (const QUrl &u) |
using Quotient::Avatar::get_callback_t = std::function<void()> |
using Quotient::Avatar::upload_callback_t = std::function<void(QUrl)> |
|
explicit |
QImage Quotient::Avatar::get | ( | int | dimension, |
get_callback_t | callback | ||
) | const |
QImage Quotient::Avatar::get | ( | int | width, |
int | height, | ||
get_callback_t | callback | ||
) | const |
bool Quotient::Avatar::isEmpty | ( | ) | const |
QString Quotient::Avatar::mediaId | ( | ) | const |
bool Quotient::Avatar::upload | ( | const QString & | fileName, |
upload_callback_t | callback | ||
) | const |
QFuture< QUrl > Quotient::Avatar::upload | ( | QIODevice * | source | ) | const |
bool Quotient::Avatar::upload | ( | QIODevice * | source, |
upload_callback_t | callback | ||
) | const |
QUrl Quotient::Avatar::url | ( | ) | const |