[Marble-commits] KDE/kdeedu/marble/src/lib/routing
Dennis Nienhüser
earthwings at gentoo.org
Sun May 2 09:43:30 CEST 2010
SVN commit 1121799 by nienhueser:
Use the order indicating icon (A,B,C...) for the pick button as well. Always show the remove button.
M +4 -7 RoutingInputWidget.cpp
M +0 -5 RoutingInputWidget.h
M +0 -2 RoutingWidget.cpp
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.cpp #1121798:1121799
@@ -91,7 +91,7 @@
m_removeButton->setMaximumWidth( 12 );
m_pickButton = new QPushButton( parent );
- m_pickButton->setIcon( QIcon( ":/data/bitmaps/routing_select.png" ) );
+ m_pickButton->setIcon( QIcon( m_route->pixmap( m_index ) ) );
m_pickButton->setToolTip( "Choose position from the map" );
m_pickButton->setCheckable( true );
m_pickButton->setFlat( true );
@@ -240,12 +240,6 @@
emit removalRequest( this );
}
-void RoutingInputWidget::setSimple( bool simple )
-{
- d->m_removeButton->setVisible( !simple );
- //d->m_pickButton->setVisible( !simple );
-}
-
bool RoutingInputWidget::hasInput() const
{
return !d->m_lineEdit->text().isEmpty();
@@ -267,6 +261,7 @@
{
d->m_progressTimer.stop();
d->m_stateButton->setIcon( QIcon( d->m_route->pixmap( d->m_index ) ) );
+ d->m_pickButton->setIcon( QIcon( d->m_route->pixmap( d->m_index ) ) );
d->m_pickButton->setVisible( false );
d->m_stateButton->setVisible( true );
emit searchFinished( this );
@@ -289,6 +284,7 @@
d->m_index = index;
d->m_stateButton->setVisible( hasTargetPosition() );
d->m_stateButton->setIcon( QIcon( d->m_route->pixmap( d->m_index ) ) );
+ d->m_pickButton->setIcon( QIcon( d->m_route->pixmap( d->m_index ) ) );
}
void RoutingInputWidget::updatePosition( int index, const GeoDataCoordinates &position )
@@ -297,6 +293,7 @@
d->m_lineEdit->setText( position.toString() );
d->m_stateButton->setVisible( hasTargetPosition() );
d->m_stateButton->setIcon( d->m_route->pixmap( d->m_index ) );
+ d->m_pickButton->setIcon( d->m_route->pixmap( d->m_index ) );
emit targetValidityChanged( hasTargetPosition() );
d->adjustText();
}
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingInputWidget.h #1121798:1121799
@@ -61,11 +61,6 @@
MarblePlacemarkModel *searchResultModel();
/**
- * @brief Hide all buttons iff simple is true
- */
- void setSimple( bool simple );
-
- /**
* Returns false iff the input text is empty
*/
bool hasInput() const;
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingWidget.cpp #1121798:1121799
@@ -88,9 +88,7 @@
void RoutingWidgetPrivate::adjustInputWidgets()
{
- bool simple = m_inputWidgets.size() <= 2;
for ( int i = 0; i < m_inputWidgets.size(); ++i ) {
- m_inputWidgets[i]->setSimple( simple );
m_inputWidgets[i]->setIndex( i );
}
More information about the Marble-commits
mailing list