Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
ca549b83
Commit
ca549b83
authored
Dec 05, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): add a `AvatarProvider` class, in progress
parent
30c92d55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
CMakeLists.txt
tests/CMakeLists.txt
+2
-0
AvatarProvider.cpp
tests/src/app/AvatarProvider.cpp
+22
-0
AvatarProvider.hpp
tests/src/app/AvatarProvider.hpp
+23
-0
No files found.
tests/CMakeLists.txt
View file @
ca549b83
...
...
@@ -50,6 +50,7 @@ list(APPEND LIBS "${CMAKE_SOURCE_DIR}/../OUTPUT/desktop/lib64/libbelcard.so")
set
(
SOURCES
src/app/App.cpp
src/app/AvatarProvider.cpp
src/app/Database.cpp
src/app/DefaultTranslator.cpp
src/app/Logger.cpp
...
...
@@ -70,6 +71,7 @@ set(SOURCES
set
(
HEADERS
src/app/App.hpp
src/app/AvatarProvider.hpp
src/app/Database.hpp
src/app/DefaultTranslator.hpp
src/app/Logger.hpp
...
...
tests/src/app/AvatarProvider.cpp
0 → 100644
View file @
ca549b83
#include "Database.hpp"
#include "../utils.hpp"
#include "AvatarProvider.hpp"
// ===================================================================
AvatarProvider
::
AvatarProvider
()
:
QQuickImageProvider
(
QQmlImageProviderBase
::
Image
,
QQmlImageProviderBase
::
ForceAsynchronousImageLoading
)
{
m_avatars_path
=
Utils
::
linphoneStringToQString
(
Database
::
getAvatarsPath
());
}
QImage
AvatarProvider
::
requestImage
(
const
QString
&
id
,
QSize
*
size
,
const
QSize
&
requested_size
)
{
// TODO: use a shared image from contact.
}
tests/src/app/AvatarProvider.hpp
0 → 100644
View file @
ca549b83
#ifndef AVATAR_PROVIDER_H_
#define AVATAR_PROVIDER_H_
#include <QQuickImageProvider>
// ===================================================================
class
AvatarProvider
:
public
QQuickImageProvider
{
public:
AvatarProvider
();
~
AvatarProvider
()
=
default
;
QImage
requestImage
(
const
QString
&
id
,
QSize
*
size
,
const
QSize
&
requested_size
)
override
;
private:
QString
m_avatars_path
;
};
#endif // AVATAR_PROVIDER_H_
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment