<file>res/images/large_profile_pic_border_left.png</file>
<file>res/images/large_profile_pic_border_middle.png</file>
<file>res/images/large_profile_pic_border_right.png</file>
- <file>res/images/large_profile_pic_border_bottom_filler.png</file>
- <file>res/images/large_profile_pic_border_side_filler.png</file>
- <file>res/images/large_profile_pic_border_top_filler.png</file>
- <file>res/images/large_profile_pic_border_top_left.png</file>
- <file>res/images/large_profile_pic_border_top_right.png</file>
- <file>res/images/large_profile_pic_border_bottom_left.png</file>
- <file>res/images/large_profile_pic_border_bottom_right.png</file>
+ <file>res/images/big_profile_image.gif</file>
</qresource>
</RCC>
QPointF coordinates(userMap["longitude"].toReal(), userMap["latitude"].toReal());
- QUrl imageUrl = userMap["profile_pic"].toUrl();
- QUrl imageUrlBig = userMap["pic_big"].toUrl();
+ QUrl imageUrl = userMap["pic_big"].toUrl();
+ qWarning() << "IMAGE URL: " << imageUrl;
+
if(imageUrl.isEmpty()) {
// user doesn't have profile image, so we need to get him a silhouette image
}
m_user = new User(userMap["address"].toString(), coordinates, userMap["name"].toString(),
- userMap["note"].toString(), imageUrl, imageUrlBig, userMap["timestamp"].toString(),
+ userMap["note"].toString(), imageUrl, userMap["timestamp"].toString(),
true, userMap["uid"].toString());
foreach (QVariant friendsVariant, result["friends"].toList()) {
QPointF coordinates(friendMap["longitude"].toReal(), friendMap["latitude"].toReal());
QUrl imageUrl = friendMap["profile_pic"].toUrl();
- QUrl imageUrlBig = friendMap["pic_big"].toUrl();
if(imageUrl.isEmpty()) {
// friend doesn't have profile image, so we need to get him a silhouette image
User *user = new User(friendMap["address"].toString(), coordinates,
friendMap["name"].toString(),
- friendMap["note"].toString(), imageUrl, imageUrlBig,
+ friendMap["note"].toString(), imageUrl,
friendMap["timestamp"].toString(),
false, friendMap["uid"].toString(),
distanceMap["units"].toString(),
// assign facebook silhouette image to all who doesn't have a profile image
if(url == QUrl(SILHOUETTE_URL)) {
- if(m_user->profileImageUrl().isEmpty()) {
- m_user->setProfileImage(AvatarImage::create(image));
+ if(m_user->profileImageUrl().isEmpty()) { ;
+ m_user->setProfileImage(AvatarImage::create(QPixmap(
+ ":res/images/big_profile_image.gif")));
}
for(int i=0;i < m_friendsList.count();i++) {
if(m_friendsList.at(i)->profileImageUrl().isEmpty()) {
m_user->setProfileImage(AvatarImage::create(image));
}
- if (m_user->profileImageUrlBig() == url) {
- m_user->setProfileImageBig(AvatarImage::create(image));
- }
-
for(int i=0;i<m_friendsList.count();i++) {
if(m_friendsList.at(i)->profileImageUrl() == url) {
m_friendsList.at(i)->setProfileImage(AvatarImage::create(image));
emit fetchImage(QUrl(SILHOUETTE_URL));
}
- // dont download small profile image because not needed.
-// if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid())
-// emit fetchImage(m_user->profileImageUrl());
-
- if(!m_user->profileImageUrlBig().isEmpty() && m_user->profileImageUrlBig().isValid()) {
- emit fetchImage(m_user->profileImageUrlBig());
- }
+ if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid())
+ emit fetchImage(m_user->profileImageUrl());
for(int i=0;i<m_friendsList.count();i++) {
if(!m_friendsList.at(i)->profileImageUrl().isEmpty() &&
if(user) {
m_userInfo->setUserName(user->name());
- m_userInfo->setProfileImage(user->profileImageBig());
+ m_userInfo->setProfileImage(user->profileImage());
m_userInfo->setMessageText(user->note());
m_userInfo->setAddress(user->address());
m_userInfo->setTime(user->timestamp());
#include "user.h"
User::User(const QString &address, const QPointF &coordinates, const QString &name,
- const QString ¬e, const QUrl &imageUrl, const QUrl &imageUrlBig,
- const QString ×tamp, const bool &type, const QString &userId,
- const QString &units, const double &value)
+ const QString ¬e, const QUrl &imageUrl, const QString ×tamp, const bool &type,
+ const QString &userId, const QString &units, const double &value)
: m_address(address)
, m_coordinates(coordinates)
, m_name(name)
, m_note(note)
- , m_profileImageUrl(imageUrl)
- , m_profileImageUrlBig(imageUrlBig)
+ , m_profileImageUrl(imageUrl)
, m_timestamp(timestamp)
, m_type(type)
, m_units(units)
m_profileImage = image;
}
-void User::setProfileImageBig(const QPixmap &image)
-{
- m_profileImageBig = image;
-}
-
void User::setProfileImageUrl(const QUrl &imageUrl)
{
m_profileImageUrl = imageUrl;
}
-void User::setProfileImageUrlBig(const QUrl &imageUrl)
-{
- m_profileImageUrlBig = imageUrl;
-}
-
void User::setTimestamp(const QString ×tamp)
{
m_timestamp = timestamp;
return m_profileImage;
}
-const QPixmap& User::profileImageBig() const
-{
- return m_profileImageBig;
-}
-
const QUrl& User::profileImageUrl() const
{
return m_profileImageUrl;
}
-const QUrl& User::profileImageUrlBig() const
-{
- return m_profileImageUrlBig;
-}
-
const QString& User::timestamp() const
{
return m_timestamp;
*
*/
User(const QString &address, const QPointF &coordinates, const QString &name,
- const QString ¬e, const QUrl &imageUrl, const QUrl &imageUrlBig,
- const QString ×tamp, const bool &type, const QString &userId,
- const QString &units = 0, const double &value = 0);
+ const QString ¬e, const QUrl &imageUrl, const QString ×tamp,
+ const bool &type, const QString &userId, const QString &units = 0,
+ const double &value = 0);
/**
* @brief Default constructor, initializes member data as NULL/0
void setProfileImage(const QPixmap &image);
/**
- * @brief Set big profile image
- *
- * @param image big profile Image
- */
- void setProfileImageBig(const QPixmap &image);
-
- /**
* @brief Set download address for profile image
*
* @param imageUrl image url of big image
void setProfileImageUrl(const QUrl &imageUrl);
/**
- * @brief Set download address for big profile image
- *
- * @param imageUrl image url
- */
- void setProfileImageUrlBig(const QUrl &imageUrl);
-
- /**
* @brief Set timestamp for last status update, timestamp is in literal mode
*
* @param timestamp timestamp
const QPixmap &profileImage() const;
/**
- * @brief Get big profile image
- *
- * @return QPixmap big profile image
- */
- const QPixmap &profileImageBig() const;
-
- /**
* @brief Get download address for profile image
*
* @return QString url
const QUrl &profileImageUrl() const;
/**
- * @brief Get download address for big profile image
- *
- * @return QString url of big profile image
- */
- const QUrl &profileImageUrlBig() const;
-
- /**
* @brief Get timestamp of last status update
*
* @return QString timestamp
******************************************************************************/
private:
- QString m_address; ///< placeholder for address information
+ bool m_type; ///< placeholder for user type
+ double m_value; ///< placeholder for distance value
+
QPointF m_coordinates; ///< placeholder for coordinates
+ QString m_address; ///< placeholder for address information
QString m_name; ///< placeholder for name
- QString m_note; ///< placeholder for note
- QUrl m_profileImageUrl; ///< placeholder for image url
- QUrl m_profileImageUrlBig; ///< placeholder for big profile image url
- QString m_timestamp; ///< placeholer for timestamp
- bool m_type; ///< placeholder for user type
+ QString m_note; ///< placeholder for note
+ QString m_timestamp; ///< placeholer for timestamp
QString m_units; ///< placeholder for distance unit type
QString m_userId; ///< placeholder for userId
- double m_value; ///< placeholder for distance value
-
+ QUrl m_profileImageUrl; ///< placeholder for image url
QPixmap m_profileImage; ///< placeholder for image
- QPixmap m_profileImageBig; ///< placeholder for big image
};