const QString SITUARE_TEST_URL = "http://emmerichgn.facebook.joyent.us/";
const QString TEST_API_KEY = "cf77865a5070f2c2ba3b52cbf3371579";
+// Situare JSON callback data
+const QString NORMAL_SIZE_PROFILE_IMAGE = "pic";
+
// 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";
+const QString GET_LOCATIONS =
+ QString("getLocations.php?extra_user_data=%1").arg(NORMAL_SIZE_PROFILE_IMAGE);
// Cookies
const QString COOKIE = "Cookie";
QPointF coordinates(userMap["longitude"].toReal(), userMap["latitude"].toReal());
- QUrl imageUrl = userMap["pic_big"].toUrl();
- qWarning() << "IMAGE URL: " << imageUrl;
-
+ QUrl imageUrl = userMap[NORMAL_SIZE_PROFILE_IMAGE].toUrl();
if(imageUrl.isEmpty()) {
// user doesn't have profile image, so we need to get him a silhouette image
// 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(QPixmap(
- ":res/images/big_profile_image.gif")));
+ if(m_user->profileImageUrl().isEmpty()) { //;
+// m_user->setProfileImage(AvatarImage::create(QPixmap(
+// ":res/images/big_profile_image.gif")));
+ m_user->setProfileImage(AvatarImage::create(image));
}
for(int i=0;i < m_friendsList.count();i++) {
if(m_friendsList.at(i)->profileImageUrl().isEmpty()) {
return avatarImage;
} else {
- qWarning() << "Avatarimage original size: " << image.width() << image.height();
+ qDebug() << "Avatarimage original size: " << image.width() << image.height();
QPixmap scaledProfileImage = image.scaledToHeight(FORCED_IMAGE_HEIGHT,
Qt::SmoothTransformation);
- qWarning() << "Avatarimage scaled size: "
+ qDebug() << "Avatarimage scaled size: "
<< scaledProfileImage.width() << scaledProfileImage.height();
// unsupported image size ratios are drawn without borders.
QPainter painter(&avatarImage);
QPainterPath roundedRect;
- roundedRect.addRoundedRect(BORDER_OFFSET-1, BORDER_OFFSET-1, scaledProfileImage.width()+1,
- FORCED_IMAGE_HEIGHT+1, ROUNDNESS, ROUNDNESS);
+ roundedRect.addRoundedRect(BORDER_OFFSET, BORDER_OFFSET, scaledProfileImage.width(),
+ FORCED_IMAGE_HEIGHT, ROUNDNESS, ROUNDNESS);
painter.save();
painter.setClipPath(roundedRect);
painter.drawPixmap(QPointF(BORDER_OFFSET, BORDER_OFFSET), scaledProfileImage);
USA.
*/
-
#ifndef SIDEPANEL_H
#define SIDEPANEL_H
******************************************************************************/
private:
- bool m_type; ///< placeholder for user type
- double m_value; ///< placeholder for distance value
-
+ QString m_address; ///< placeholder for address information
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
- QString m_timestamp; ///< placeholer for timestamp
+ QString m_note; ///< placeholder for note
+ QUrl m_profileImageUrl; ///< placeholder for image url
+ QString m_timestamp; ///< placeholer for timestamp
+ bool m_type; ///< placeholder for user type
QString m_units; ///< placeholder for distance unit type
QString m_userId; ///< placeholder for userId
- QUrl m_profileImageUrl; ///< placeholder for image url
+ double m_value; ///< placeholder for distance value
QPixmap m_profileImage; ///< placeholder for image
};