emit userLocationReady(user);
emit friendsLocationsReady(friendsList);
- qWarning() << "USER IMAGE URL: " << user->profileImageUrl();
- qWarning() << "USER IMAGE URL BIG: " << user->profileImageUrlBig();
}
// Situare PHP scripts
const QString UPDATE_LOCATION = "updateLocation.php";
const QString REVERSE_GEO = "reversegeo.php";
-const QString GET_LOCATIONS = "getLocations.php?extra_user_data=pic_big"; //use pic_big or pic
+const QString GET_LOCATIONS = "getLocations.php?extra_user_data=pic_big";
// Cookies
const QString COOKIE = "Cookie";
QPointF coordinates(userMap["longitude"].toReal(), userMap["latitude"].toReal());
QUrl imageUrl = userMap["profile_pic"].toUrl();
- qWarning() << "JOOO1" << imageUrl;
QUrl imageUrlBig = userMap["pic_big"].toUrl();
- qWarning() << "JOOO2" << imageUrlBig;
if(imageUrl.isEmpty()) {
// user doesn't have profile image, so we need to get him a silhouette image
if(m_user->profileImageUrlBig() == url) {
m_user->setProfileImageBig(AvatarImage::create(image));
- qWarning() << "OTETTIIN VASTAAN SUURI PROFIILIKUVA";
}
for(int i=0;i<m_friendsList.count();i++) {
emit fetchImage(QUrl(SILHOUETTE_URL));
}
- if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid()) {
+ if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid())
emit fetchImage(m_user->profileImageUrl());
- qWarning() << "PROFILE IMAGE URL: " << m_user->profileImageUrl();
- }
if(!m_user->profileImageUrlBig().isEmpty() && m_user->profileImageUrlBig().isValid()) {
emit fetchImage(m_user->profileImageUrlBig());
- qWarning() << "PROFILE IMAGE URL BIG: " << m_user->profileImageUrlBig();
}
for(int i=0;i<m_friendsList.count();i++) {
#include "avatarimage.h"
#include <QPainter>
-#include <QPen>
#include <QDebug>
// constants for normal images
this, SLOT(findButtonClicked()));
setFixedWidth(BACKGROUND_WIDTH);
- //setFixedWidth(500);
this->setFont(NOKIA_FONT_SMALL);
m_nameLabel->setFont(NOKIA_FONT_NORMAL);
}
}
}
+
void UserInfo::paintEvent(QPaintEvent *aPaintEvent)
{
qDebug() << __PRETTY_FUNCTION__ << " " << aPaintEvent->rect();
if(user) {
m_userInfo->setUserName(user->name());
-// m_userInfo->setProfileImage(user->profileImage());
m_userInfo->setProfileImage(user->profileImageBig());
m_userInfo->setMessageText(user->note());
m_userInfo->setAddress(user->address());
* @param image Image
*/
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
+ * @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);
/**
* @return QPixmap image
*/
const QPixmap &profileImage() const;
+
+ /**
+ * @brief Get big profile image
+ *
+ * @return QPixmap big profile image
+ */
const QPixmap &profileImageBig() const;
/**
* @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;
/**