#include "friendlistitemdelegate.h"
#include "panelcommon.h"
#include "sidepanel.h"
+#include "../routing/location.h"
+#include "locationlistitem.h"
+#include "locationlistview.h"
+#include "extendedlistitemdelegate.h"
#include "friendlistpanel.h"
m_friendListView->viewport()->setAutoFillBackground(false);
m_friendListItemDelegate = new FriendListItemDelegate();
m_friendListView->setItemDelegate(m_friendListItemDelegate);
+ //REMOVE
+ m_friendListView->hide();
- friendListLayout->addWidget(m_friendListView);
+ m_locationListView = new LocationListView(this);
+ m_locationListView->setAutoFillBackground(false);
+ m_locationListView->viewport()->setAutoFillBackground(false);
+ m_locationListView->setItemDelegate(new ExtendedListItemDelegate());
+
+ //friendListLayout->addWidget(m_friendListView);
+ friendListLayout->addWidget(m_locationListView);
m_panelVBox->addLayout(friendListLayout);
connect(m_friendListView, SIGNAL(listItemClicked(GeoCoordinate)),
this, SLOT(clearFriendListFilter()));
connect(this, SIGNAL(panelOpened()),
this, SLOT(clearFriendListFilter()));
+
+ connect(m_locationListView, SIGNAL(locationItemClicked(GeoCoordinate&,GeoCoordinate&)),
+ this, SIGNAL(locationItemClicked(GeoCoordinate&,GeoCoordinate&)));
}
void FriendListPanel::friendImageReady(User *user)
m_friendListView->clearFilter();
}
+void FriendListPanel::locationDataReady(QList<Location> &result)
+{
+ qWarning() << __PRETTY_FUNCTION__;
+
+ m_locationListView->clearList();
+
+ for (int i = 0; i < result.size(); ++i) {
+ LocationListItem *item = new LocationListItem();
+ item->setLocationData(result.at(i));
+ m_locationListView->addListItem(QString::number(i), item);
+ }
+
+
+}
+
void FriendListPanel::showFriendsInList(const QList<QString> &userIDs)
{
qDebug() << __PRETTY_FUNCTION__;