setLayout(friendListPanelLayout);
m_noFriendsLabel = new QLabel();
- m_noFriendsLabel->setText("No Friends");
+ m_noFriendsLabel->setText("No friends");
m_noFriendsLabel->setAlignment(Qt::AlignCenter);
QPalette noFriendsPalette = palette();
void FriendListPanel::showEmptyPanel(bool show)
{
- if (show){
+ if (show) {
m_noFriendsLabel->show();
m_friendListView->hide();
}
panelLayout->setContentsMargins(MARGIN_LEFT, PANEL_MARGIN_TOP,
PANEL_MARGIN_RIGHT, PANEL_MARGIN_BOTTOM);
m_noSearchLabel = new QLabel();
- m_noSearchLabel->setText("No Search Results");
+ m_noSearchLabel->setText("No search results");
m_noSearchLabel->setAlignment(Qt::AlignCenter);
QPalette m_noSearchPalette = palette();
void LocationSearchPanel::showEmptyPanel(bool show)
{
- if (show){
+ if (show) {
m_noSearchLabel->show();
m_searchHistoryListView->hide();
}
PANEL_MARGIN_RIGHT, PANEL_MARGIN_BOTTOM);
m_noRouteLabel = new QLabel();
- m_noRouteLabel->setText("No Route");
+ m_noRouteLabel->setText("No route");
m_noRouteLabel->setAlignment(Qt::AlignCenter);
QPalette noRoutePalette = palette();
panelLayout->addWidget(m_routeWaypointListView);
panelLayout->addWidget(m_noRouteLabel, Qt::AlignCenter);
- m_routeWaypointListView->hide();
setLayout(panelLayout);
// --- CONTEXT BUTTONS ---
m_genericButtonsLayout->addWidget(routeToCursorButton);
m_genericButtonsLayout->addWidget(m_clearRouteButton);
+
+ showEmptyPanel(true);
}
void RoutingPanel::clearListsSelections()
m_clearRouteButton->setDisabled(true);
m_routeWaypointListView->clearList();
m_routeWaypointListView->hide();
- m_noRouteLabel->show();
+ showEmptyPanel(true);
emit clearRoute();
}
qDebug() << __PRETTY_FUNCTION__;
m_routeWaypointListView->clearList();
- m_noRouteLabel->hide();
+ showEmptyPanel(false);
QList<RouteSegment> segments = route.segments();
QList<GeoCoordinate> geometryPoints = route.geometryPoints();
emit openPanelRequested(this);
}
+
+void RoutingPanel::showEmptyPanel(bool show)
+{
+ if (show) {
+ m_noRouteLabel->show();
+ m_routeWaypointListView->hide();
+ }
+ else {
+ m_noRouteLabel->hide();
+ }
+}
*/
void setRoute(Route &route);
+ /**
+ * @brief show / hide empty panel label
+ *
+ * @param show true if empty panel should be shown
+ */
+ void showEmptyPanel(bool show);
+
/*******************************************************************************
* SIGNALS
******************************************************************************/