SIGNAL(locationItemClicked(const GeoCoordinate&, const GeoCoordinate&)));
connect(m_locationListView, SIGNAL(listItemSelectionChanged()),
- this, SLOT(setRouteButtonDisabled()));
+ this, SLOT(onListItemSelectionChanged()));
QVBoxLayout *resultsListViewLayout = new QVBoxLayout;
resultsListViewLayout->setContentsMargins(PANEL_MARGIN_LEFT, PANEL_MARGIN_TOP,
panelLayout->addLayout(resultsListViewLayout);
// --- CONTEXT BUTTONS ---
- m_routeButton = new ImageButton(":res/images/compass.png", "", "", this);
- m_routeButton->setDisabled(true);
+ m_routeButton = new ImageButton(":res/images/routing.png", "", "", this);
connect(m_routeButton, SIGNAL(clicked()),
this, SLOT(routeToSelectedLocation()));
connect(m_clearLocationListButton, SIGNAL(clicked()),
this, SLOT(showSearchHistoryListView()));
- m_contextButtonLayout->addWidget(m_routeButton);
- m_contextButtonLayout->addWidget(searchLocationButton);
- m_contextButtonLayout->addWidget(m_clearLocationListButton);
+ m_itemButtonsLayout->addWidget(m_routeButton);
+ m_genericButtonsLayout->addWidget(searchLocationButton);
+ m_genericButtonsLayout->addWidget(m_clearLocationListButton);
readSettings();
showSearchHistoryListView();
m_locationListView->clearItemSelection();
m_searchHistoryListView->clearItemSelection();
-
- setRouteButtonDisabled();
}
void LocationSearchPanel::hideEvent(QHideEvent *event)
m_resultsLabel->setText(tr("Search results: %1").arg(count));
}
-void LocationSearchPanel::setRouteButtonDisabled()
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_routeButton->setDisabled(m_locationListView->selectedItems().isEmpty());
-}
-
void LocationSearchPanel::showLocationListView(int locationItemsCount)
{
qDebug() << __PRETTY_FUNCTION__;