#include "map/mapcommon.h"
#include "map/mapview.h"
#include "mapscale.h"
+#include "meetpeoplepanel.h"
+#include "notificationpanel.h"
#include "panelcommon.h"
#include "routingpanel.h"
#include "searchdialog.h"
connect(m_friendsListPanel, SIGNAL(findFriend(GeoCoordinate)),
this, SIGNAL(centerToCoordinates(GeoCoordinate)));
- connect(this, SIGNAL(friendImageReady(User*)),
- m_friendsListPanel, SLOT(friendImageReady(User*)));
+ connect(this, SIGNAL(friendImageReady(QString,QPixmap)),
+ m_friendsListPanel, SLOT(friendImageReady(QString,QPixmap)));
connect(m_friendsListPanel, SIGNAL(routeToFriend(const GeoCoordinate&)),
this, SIGNAL(routeTo(const GeoCoordinate&)));
m_mapScale, SLOT(updateMapResolution(qreal)));
}
+void MainWindow::buildMeetPeoplePanel()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_meetPeoplePanel = new MeetPeoplePanel(this);
+
+ connect(this, SIGNAL(friendImageReady(QString,QPixmap)),
+ m_meetPeoplePanel, SLOT(setImage(QString,QPixmap)));
+
+ connect(this, SIGNAL(interestingPeopleReceived(QList<User>&)),
+ m_meetPeoplePanel, SLOT(populateInterestingPeopleListView(QList<User>&)));
+
+ connect(m_meetPeoplePanel, SIGNAL(requestInterestingPeople()),
+ this, SIGNAL(requestInterestingPeople()));
+
+ connect(m_meetPeoplePanel, SIGNAL(requestInterestingPeopleSearch()),
+ this, SLOT(startPeopleSearch()));
+
+ connect(m_meetPeoplePanel, SIGNAL(findPerson(GeoCoordinate)),
+ this, SIGNAL(centerToCoordinates(GeoCoordinate)));
+}
+
+void MainWindow::buildNotificationPanel()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_notificationPanel = new NotificationPanel(this);
+
+ connect(this, SIGNAL(notificationsReceived(QList<Notification>&)),
+ m_notificationPanel, SLOT(populateNotificationListView(QList<Notification>&)));
+
+ connect(m_notificationPanel, SIGNAL(requestNotifications()),
+ this, SIGNAL(requestNotifications()));
+
+ connect(this, SIGNAL(friendImageReady(QString,QPixmap)),
+ m_notificationPanel, SLOT(setImage(QString,QPixmap)));
+}
+
void MainWindow::buildOsmLicense()
{
qDebug() << __PRETTY_FUNCTION__;
buildFriendListPanel();
buildLocationSearchPanel();
buildRoutingPanel();
+ buildMeetPeoplePanel();
+ buildNotificationPanel();
m_tabbedPanel = new TabbedPanel(this);
m_situareTabsIndexes.append(
m_tabbedPanel->addTab(m_friendsListPanel, QIcon(":/res/images/friend_list.png")));
- m_tabbedPanel->addTab(m_locationSearchPanel, QIcon(":/res/images/location_search.png"));
- m_tabbedPanel->addTab(m_routingPanel, QIcon(":/res/images/routing.png"));
+// m_tabbedPanel->addTab(m_locationSearchPanel, QIcon(":/res/images/location_search.png"));
+// m_tabbedPanel->addTab(m_routingPanel, QIcon(":/res/images/routing.png"));
+ m_situareTabsIndexes.append(
+ m_tabbedPanel->addTab(m_meetPeoplePanel, QIcon(":/res/images/meet_people.png")));
+ m_situareTabsIndexes.append(
+ m_tabbedPanel->addTab(m_notificationPanel, QIcon(":/res/images/notification.png")));
connect(m_mapView, SIGNAL(viewResized(QSize)),
m_tabbedPanel, SLOT(resizePanel(QSize)));
connect(m_tabbedPanel, SIGNAL(currentChanged(int)),
m_userInfoPanel, SIGNAL(collapse()));
+ connect(m_tabbedPanel, SIGNAL(panelClosed()),
+ m_meetPeoplePanel, SLOT(anyPanelClosed()));
+
+ connect(m_tabbedPanel, SIGNAL(panelClosed()),
+ m_notificationPanel, SLOT(anyPanelClosed()));
+
// signals for showing and hiding list item context buttons
+ connect(m_userInfoPanel, SIGNAL(listItemSelectionChanged(bool)),
+ m_tabbedPanel, SIGNAL(listItemSelectionChanged(bool)));
+
connect(m_friendsListPanel, SIGNAL(listItemSelectionChanged(bool)),
m_tabbedPanel, SIGNAL(listItemSelectionChanged(bool)));
connect(m_routingPanel, SIGNAL(listItemSelectionChanged(bool)),
m_tabbedPanel, SIGNAL(listItemSelectionChanged(bool)));
+
+ connect(m_meetPeoplePanel, SIGNAL(listItemSelectionChanged(bool)),
+ m_tabbedPanel, SIGNAL(listItemSelectionChanged(bool)));
+
+ connect(m_notificationPanel, SIGNAL(listItemSelectionChanged(bool)),
+ m_tabbedPanel, SIGNAL(listItemSelectionChanged(bool)));
}
void MainWindow::buildRoutingPanel()
connect(m_userInfoPanel, SIGNAL(notificateUpdateFailing(QString, bool)),
this, SLOT(buildInformationBox(QString, bool)));
+
+ connect(this, SIGNAL(userImageReady(QString,QPixmap)),
+ m_userInfoPanel, SLOT(setImage(QString,QPixmap)));
}
void MainWindow::buildWebView()
{
qDebug() << __PRETTY_FUNCTION__;
- SearchDialog *searchDialog = new SearchDialog();
+ SearchDialog *searchDialog = new SearchDialog(SearchDialog::Location);
+ queueDialog(searchDialog);
+}
+
+void MainWindow::startPeopleSearch()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ SearchDialog *searchDialog = new SearchDialog(SearchDialog::People);
queueDialog(searchDialog);
}