ui/listitemdelegate.cpp \
ui/friendlistitemdelegate.cpp \
ui/searchdialog.cpp \
- ui/paneltab.cpp \
- ui/tabbedpanel.cpp \
+ ui/panelbase.cpp \
ui/panelbar.cpp \
ui/panelcontent.cpp \
- ui/panelbase.cpp \
+ ui/paneltab.cpp \
+ ui/paneltabbar.cpp \
+ ui/tabbedpanel.cpp \
user/user.cpp
HEADERS += application.h \
common.h \
+ coordinates/geocoordinate.h \
+ coordinates/scenecoordinate.h \
engine/engine.h \
+ engine/mce.h \
error.h \
facebookservice/facebookauthentication.h \
facebookservice/facebookcommon.h \
map/mapcommon.h \
map/mapengine.h \
map/mapfetcher.h \
+ map/maprouteitem.h \
map/mapscene.h \
map/mapscroller.h \
map/maptile.h \
map/maptilerequest.h \
map/mapview.h \
+ map/osm.h \
map/ownlocationitem.h \
network/networkaccessmanager.h \
network/networkcookiejar.h \
network/networkhandler.h \
network/networkreply.h \
+ routing/geocodingservice.h \
+ routing/location.h \
+ routing/route.h \
+ routing/routesegment.h \
+ routing/routingcommon.h \
+ routing/routingservice.h \
situareservice/imagefetcher.h \
situareservice/situarecommon.h \
situareservice/situareservice.h \
ui/updatelocation/updatelocationdialog.h \
ui/avatarimage.h \
ui/friendlistitem.h \
+ ui/friendlistitemdelegate.h \
ui/friendlistpanel.h \
+ ui/fullscreenbutton.h \
ui/imagebutton.h \
+ ui/indicatorbutton.h \
+ ui/indicatorbuttonpanel.h \
ui/logindialog.h \
ui/mainwindow.h \
ui/mapscale.h \
- ui/panelcommon.h \
ui/settingsdialog.h \
ui/userinfo.h \
ui/userinfopanel.h \
ui/zoombutton.h \
ui/zoombuttonpanel.h \
- user/user.h \
- ui/fullscreenbutton.h \
- engine/mce.h \
- ui/indicatorbutton.h \
- ui/indicatorbuttonpanel.h \
- routing/geocodingservice.h \
- routing/routingservice.h \
- routing/routingcommon.h \
- routing/routesegment.h \
- routing/route.h \
- routing/location.h \
- map/maprouteitem.h \
- map/osm.h \
- coordinates/scenecoordinate.h \
- coordinates/geocoordinate.h \
+ ui/listcommon.h \
ui/listview.h \
ui/listitem.h \
ui/listitemdelegate.h \
- ui/friendlistitemdelegate.h \
- ui/listcommon.h \
ui/searchdialog.h \
- ui/paneltab.h \
- ui/tabbedpanel.h \
+ ui/panelbase.h \
ui/panelbar.h \
ui/panelcontent.h \
- ui/panelbase.h
+ ui/panelcommon.h \
+ ui/paneltab.h \
+ ui/paneltabbar.h \
+ ui/tabbedpanel.h \
+ user/user.h
QT += network \
webkit
m_friendListHeaderWidget->show();
m_friendListView->filter(userIDs);
+
+ emit showPanelRequested(this);
}
private slots:
/**
- * @brief Slot to clear friend list filter.
+ * @brief Slot to clear friend list filter
*/
void clearFriendListFilter();
/**
- * @brief Slot to show friends in list.
+ * @brief Slot to show friends in list
*
- * Shows only friends that are on userIDs list.
+ * Shows only friends that are on userIDs list
* @param userIDs list of user ID's
*/
void showFriendsInList(const QList<QString> &userIDs);
******************************************************************************/
signals:
/**
- * @brief Signal for friend finding.
+ * @brief Signal for friend finding
*
* @param coordinates Target coordinate
*/
void findFriend(const GeoCoordinate &coordinates);
+ /**
+ * @brief Signal for requesting a panel to be opened
+ *
+ * @param widget Pointer to the widget that emitted the signal
+ */
+ void showPanelRequested(QWidget *widget);
+
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
connect(m_mapView, SIGNAL(viewResized(QSize)),
m_tabbedPanel, SLOT(resizePanel(QSize)));
+
+ connect(m_friendsListPanel, SIGNAL(showPanelRequested(QWidget*)),
+ m_tabbedPanel, SLOT(showPanel(QWidget*)));
}
void MainWindow::buildUserInfoPanel()
}
}
+void PanelTabBar::selectTab(int index)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (!m_tabButtonGroup->button(index)->isChecked())
+ m_tabButtonGroup->button(index)->click();
+}
+
void PanelTabBar::setCurrentIndex(int index)
{
qDebug() << __PRETTY_FUNCTION__;
void deselectTabs();
/**
+ * @brief This slot selects a tab at given index
+ */
+ void selectTab(int index);
+
+private slots:
+ /**
* @brief Sets the tab at current index active
*
* @param index Index of the tab
m_panelTabBar = new PanelTabBar(this);
connect(m_panelTabBar, SIGNAL(currentChanged(int)),
- this, SLOT(showTab(int)));
+ this, SLOT(setCurrentIndex(int)));
connect(m_panelTabBar, SIGNAL(tabCloseRequested(int)),
this, SLOT(closePanel()));
emit toggleState();
}
-void TabbedPanel::openPanel()
+void TabbedPanel::showPanel(QWidget *widget)
{
qDebug() << __PRETTY_FUNCTION__;
- if(!m_isOpen)
- emit toggleState();
+ m_panelTabBar->selectTab(m_panelWidgetStack->indexOf(widget));
}
-void TabbedPanel::showTab(int index)
+void TabbedPanel::setCurrentIndex(int index)
{
qDebug() << __PRETTY_FUNCTION__;
if (index < m_panelWidgetStack->count() && index >= 0) {
m_panelWidgetStack->setCurrentIndex(index);
- openPanel();
+
+ if(!m_isOpen)
+ emit toggleState();
+
emit currentChanged(index);
}
}
public slots:
/**
- * @brief Public slot that will close the panel unless already closed
+ * @brief Slot that closes the panel
*/
void closePanel();
/**
- * @brief Public slot that will open the panel unless already open
+ * @brief Slot that shows the tab (and opens it if closed) with the desired widget
+ *
+ * @param widget Widget
*/
- void openPanel();
+ void showPanel(QWidget *widget);
/**
* @brief Slot to redraw the panel after window resize event
*/
void resizePanel(const QSize &size);
+private slots:
/**
- * @brief Shows the tab at given index active
+ * @brief Sets the panel at current index active
*
- * @param index Index of the tab
+ * @param index Index of the panel
*/
- void showTab(int index);
+ void setCurrentIndex(int index);
-private slots:
/**
* @brief Internal slot used to track statemachine state
*/