mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
24 lines
585 B
C++
24 lines
585 B
C++
#include "Database.hpp"
|
|
#include "../utils.hpp"
|
|
|
|
#include "AvatarProvider.hpp"
|
|
|
|
// =============================================================================
|
|
|
|
const QString AvatarProvider::PROVIDER_ID = "avatar";
|
|
|
|
AvatarProvider::AvatarProvider () :
|
|
QQuickImageProvider(
|
|
QQmlImageProviderBase::Image,
|
|
QQmlImageProviderBase::ForceAsynchronousImageLoading
|
|
) {
|
|
m_avatars_path = Utils::linphoneStringToQString(Database::getAvatarsPath());
|
|
}
|
|
|
|
QImage AvatarProvider::requestImage (
|
|
const QString &id,
|
|
QSize *,
|
|
const QSize &
|
|
) {
|
|
return QImage(m_avatars_path + id);
|
|
}
|