listViewLayout->setContentsMargins(PANEL_MARGIN_LEFT, PANEL_MARGIN_TOP,
PANEL_MARGIN_RIGHT, PANEL_MARGIN_BOTTOM);
- ImageButton *searchLocationButton = new ImageButton(0, ":/res/images/search.png",
- ":/res/images/search_s.png");
+ ImageButton *searchLocationButton = new ImageButton(":/res/images/search.png",
+ ":/res/images/search_s.png",
+ "", this);
- m_contextButtonList.append(searchLocationButton);
+ m_contextButtonLayout->addWidget(searchLocationButton, 0, 0);
- m_routeButton = new ImageButton(this, ":res/images/route_to_location.png",
- ":res/images/route_to_location_s.png");
+ m_routeButton = new ImageButton(":res/images/route_to_location.png",
+ ":res/images/route_to_location_s.png", "", this);
m_routeButton->setDisabled(true);
- m_routeButton->hide();
m_locationListHeaderWidget = new QWidget();
m_locationListHeaderWidget->setLayout(headerLayout);
listViewLayout->addWidget(m_locationListView);
listViewLayout->addWidget(m_routeWaypointListView);
- routingLayout->addWidget(m_routeButton);
routingLayout->addWidget(m_locationListHeaderWidget);
routingLayout->addLayout(listViewLayout);
this, SIGNAL(requestSearchLocation()));
// CONTEXT BUTTONS
- m_contextButtonList.append(m_routeButton);
+ m_contextButtonLayout->addWidget(m_routeButton, 1, 0);
}
void RoutingPanel::clearListsSelections()
{
qDebug() << __PRETTY_FUNCTION__;
- m_routeButton->show();
-
m_locationListHeaderWidget->show();
m_locationListLabel->setText(tr("Search results: %1").arg(locations.count()));
{
qDebug() << __PRETTY_FUNCTION__;
- m_routeButton->hide();
-
m_locationListHeaderWidget->hide();
m_locationListView->hide();
m_routeWaypointListView->show();