QUrl imageUrl = userMap["profile_pic"].toUrl();
+// if (imageUrl.isEmpty())
+// imageUrl = QUrl("http://static.ak.fbcdn.net/pics/q_silhouette.gif");
+
m_user = new User(userMap["address"].toString(), coordinates, userMap["name"].toString(),
userMap["note"].toString(), imageUrl, userMap["timestamp"].toString(),
true, userMap["uid"].toString());
void SituareService::addProfileImages()
{
- qDebug() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__ << m_user->profileImageUrl();
- if(!m_user->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid()) {
+ if(!m_user->profileImageUrl().isEmpty()) {
emit fetchImage(m_user->profileImageUrl());
}
for(int i=0;i<m_friendsList.count();i++) {
- if(!m_friendsList.at(i)->profileImageUrl().isEmpty() && m_user->profileImageUrl().isValid()) {
+ if(!m_friendsList.at(i)->profileImageUrl().isEmpty()) {
m_visited++; // indicates how many friends that have profile image
emit fetchImage(m_friendsList.at(i)->profileImageUrl());
}
*/
#include <QVBoxLayout>
+#include <QDebug>
#include "friendlistview.h"
void FriendListView::clear()
{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ qDebug() << __PRETTY_FUNCTION__ << " Count: " << m_friendListLayout->count();
+
foreach (QWidget *widget, widgets) {
m_friendListLayout->removeWidget(widget);
widgets.removeOne(widget);
+ delete widget;
}
+
+ qDebug() << __PRETTY_FUNCTION__ << " Count: " << m_friendListLayout->count();
}
m_widgetProxy->setWidget(m_personalInfo);
QGraphicsScene *scene= new QGraphicsScene(this);
-// scene->setBackgroundBrush(Qt::white);
+ scene->setBackgroundBrush(Qt::black);
scene->addItem(m_personalInfoBackGround);
scene->addItem(m_widgetProxy);
scene->addItem(m_leftSideBar);
QGraphicsProxyWidget *scrollProxy = new QGraphicsProxyWidget();
scrollProxy->setWidget(friendListScroll);
scrollProxy->setZValue(m_personalInfoBackGround->zValue() - 3);
- scrollProxy->setMinimumSize(790 - 300, 480);
+ scrollProxy->setMinimumSize(790 - 400, 480 - 56);
scene->addItem(scrollProxy);
- scrollProxy->setPos(300, 0);
+ scrollProxy->setPos(410, 0);
//DEBUG
m_leftSideBar->setPos(0,0);
view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-// view->setBackgroundBrush(Qt::white);
+ view->setBackgroundBrush(Qt::black);
QStateMachine *machine = new QStateMachine(this);
//m_vbox->addWidget(friendListScroll);
m_vbox->setMargin(0);
- connect(m_personalInfo,SIGNAL(launchMessageUpdate()),this,SLOT(updateMessage()));
+// connect(m_personalInfo,SIGNAL(launchMessageUpdate()),this,SLOT(updateMessage()));
setObjectName("List view");
}
void ListViewScreen::updateMessage()
{
qDebug() << __PRETTY_FUNCTION__;
+
m_locationDialog->exec();
}
void ListViewScreen::userDataChanged(User *user, QList<User *> &friends)
{
+ qDebug() << __PRETTY_FUNCTION__;
+
m_friendListView->clear();
+
foreach (User *user, friends) {
FriendListItem *item = new FriendListItem(m_friendListView);
item->setData(*user);
m_friendListView->addWidget(item);
}
+
+ FriendListItem *item = new FriendListItem(m_friendListView);
+ item->setData(*user);
+ m_friendListView->addWidget(item);
}