X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fui%2Froutingpanel.cpp;fp=src%2Fui%2Froutingpanel.cpp;h=966250646ff423222175fa7d53ea3d4ca0b344f2;hb=b03cf0737bfc0d371e49bd52ccba073b23b76476;hp=1455ff628e7b2e582d2559381628a90a0f229e4e;hpb=6dd7b2002e600d4b2964d51a75e50a13f3b63e80;p=situare diff --git a/src/ui/routingpanel.cpp b/src/ui/routingpanel.cpp index 1455ff6..9662506 100644 --- a/src/ui/routingpanel.cpp +++ b/src/ui/routingpanel.cpp @@ -29,15 +29,15 @@ RoutingPanel::RoutingPanel(QWidget *parent) 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); @@ -62,7 +62,6 @@ RoutingPanel::RoutingPanel(QWidget *parent) listViewLayout->addWidget(m_locationListView); listViewLayout->addWidget(m_routeWaypointListView); - routingLayout->addWidget(m_routeButton); routingLayout->addWidget(m_locationListHeaderWidget); routingLayout->addLayout(listViewLayout); @@ -84,7 +83,7 @@ RoutingPanel::RoutingPanel(QWidget *parent) this, SIGNAL(requestSearchLocation())); // CONTEXT BUTTONS - m_contextButtonList.append(m_routeButton); + m_contextButtonLayout->addWidget(m_routeButton, 1, 0); } void RoutingPanel::clearListsSelections() @@ -110,8 +109,6 @@ void RoutingPanel::populateLocationListView(const QList &locations) { qDebug() << __PRETTY_FUNCTION__; - m_routeButton->show(); - m_locationListHeaderWidget->show(); m_locationListLabel->setText(tr("Search results: %1").arg(locations.count())); @@ -153,8 +150,6 @@ void RoutingPanel::setRoute(Route &route) { qDebug() << __PRETTY_FUNCTION__; - m_routeButton->hide(); - m_locationListHeaderWidget->hide(); m_locationListView->hide(); m_routeWaypointListView->show();