[Marble-commits] KDE/kdeedu/marble/src
Dennis Nienhüser
earthwings at gentoo.org
Thu Oct 14 23:01:46 CEST 2010
SVN commit 1185975 by nienhueser:
Sync 'work offline' state with the routing widget on small screen devices
M +8 -3 QtMainWindow.cpp
M +3 -0 QtMainWindow.h
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1185974:1185975
@@ -80,7 +80,8 @@
m_downloadRegionAction( 0 ),
m_osmEditAction( 0 ),
m_mapViewDialog( 0 ),
- m_routingDialog( 0 )
+ m_routingDialog( 0 ),
+ m_routingWidget( 0 )
{
setUpdatesEnabled( false );
@@ -668,7 +669,10 @@
m_controlView->marbleControl()->setWorkOffline( offline );
m_workOfflineAct->setChecked( offline ); // Sync state with the GUI
+ if ( m_routingWidget ) {
+ m_routingWidget->setWorkOffline( offline );
}
+}
void MainWindow::showAtmosphere( bool isChecked )
{
@@ -1204,13 +1208,14 @@
if( !m_routingDialog ) {
m_routingDialog = new QDialog( this );
m_routingDialog->setWindowTitle( tr( "Routing - Marble" ) );
- RoutingWidget *routingWidget = new RoutingWidget( m_controlView->marbleWidget(), m_routingDialog );
+ m_routingWidget = new RoutingWidget( m_controlView->marbleWidget(), m_routingDialog );
+ m_routingWidget->setWorkOffline( m_workOfflineAct->isChecked() );
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok, Qt::Vertical, m_routingDialog );
connect(buttonBox, SIGNAL( accepted() ), m_routingDialog, SLOT( accept() ) );
QHBoxLayout* layout = new QHBoxLayout;
- layout->addWidget( routingWidget );
+ layout->addWidget( m_routingWidget );
layout->addWidget( buttonBox );
m_routingDialog->setLayout( layout );
m_routingDialog->resize( 640, 420 );
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.h #1185974:1185975
@@ -32,6 +32,7 @@
class TimeControlWidget;
class QtMarbleConfigDialog;
class DownloadRegionDialog;
+class RoutingWidget;
class MainWindow : public QMainWindow
{
@@ -194,6 +195,8 @@
QDialog *m_mapViewDialog;
QDialog *m_routingDialog;
+
+ RoutingWidget *m_routingWidget;
};
} // namespace Marble
More information about the Marble-commits
mailing list