ControlView::ControlView( QWidget *parent ) : QWidget( parent ), m_mapThemeManager( new MapThemeManager( this ) ), m_searchDock( 0 ), m_locationWidget( 0 ), m_conflictDialog( 0 ), m_togglePanelVisibilityAction( 0 ), m_isPanelVisible( true ), m_tourWidget( 0 ), m_annotationDock( 0 ), m_annotationPlugin( 0 ) { setWindowTitle( tr( "Marble - Virtual Globe" ) ); resize( 680, 640 ); m_marbleWidget = new MarbleWidget( this ); m_marbleWidget->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); QVBoxLayout* layout = new QVBoxLayout; layout->addWidget( m_marbleWidget ); layout->setMargin( 0 ); setLayout( layout ); m_cloudSyncManager = new CloudSyncManager( this ); m_cloudSyncManager->routeSyncManager()->setRoutingManager( m_marbleWidget->model()->routingManager() ); BookmarkSyncManager* bookmarkSyncManager = m_cloudSyncManager->bookmarkSyncManager(); bookmarkSyncManager->setBookmarkManager( m_marbleWidget->model()->bookmarkManager() ); m_conflictDialog = new ConflictDialog( m_marbleWidget ); connect( bookmarkSyncManager, SIGNAL(mergeConflict(MergeItem*)), this, SLOT(showConflictDialog(MergeItem*)) ); connect( bookmarkSyncManager, SIGNAL(syncComplete()), m_conflictDialog, SLOT(stopAutoResolve()) ); connect( m_conflictDialog, SIGNAL(resolveConflict(MergeItem*)), bookmarkSyncManager, SLOT(resolveConflict(MergeItem*)) ); }
ControlView::ControlView( QWidget *parent ) : QWidget( parent ), m_mapThemeManager( new MapThemeManager( this ) ), m_searchDock( 0 ), m_locationWidget( 0 ), m_conflictDialog( 0 ), m_togglePanelVisibilityAction( 0 ), m_isPanelVisible( true ), m_tourWidget( 0 ), m_annotationDock( 0 ), m_annotationPlugin( 0 ) { setWindowTitle( tr( "Marble - Virtual Globe" ) ); resize( 680, 640 ); m_marbleWidget = new MarbleWidget( this ); m_marbleWidget->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); #ifdef MARBLE_DBUS new MarbleDBusInterface( m_marbleWidget ); QDBusConnection::sessionBus().registerObject( "/Marble", m_marbleWidget ); if (!QDBusConnection::sessionBus().registerService( "org.kde.marble" )) { QString const urlWithPid = QString("org.kde.marble-%1").arg( QCoreApplication::applicationPid() ); if ( !QDBusConnection::sessionBus().registerService( urlWithPid ) ) { mDebug() << "Failed to register service org.kde.marble and " << urlWithPid << " with the DBus session bus."; } } #endif QVBoxLayout* layout = new QVBoxLayout; layout->addWidget( m_marbleWidget ); layout->setMargin( 0 ); setLayout( layout ); m_cloudSyncManager = new CloudSyncManager( this ); m_cloudSyncManager->routeSyncManager()->setRoutingManager( m_marbleWidget->model()->routingManager() ); BookmarkSyncManager* bookmarkSyncManager = m_cloudSyncManager->bookmarkSyncManager(); bookmarkSyncManager->setBookmarkManager( m_marbleWidget->model()->bookmarkManager() ); m_conflictDialog = new ConflictDialog( m_marbleWidget ); connect( bookmarkSyncManager, SIGNAL(mergeConflict(MergeItem*)), this, SLOT(showConflictDialog(MergeItem*)) ); connect( bookmarkSyncManager, SIGNAL(syncComplete()), m_conflictDialog, SLOT(stopAutoResolve()) ); connect( m_conflictDialog, SIGNAL(resolveConflict(MergeItem*)), bookmarkSyncManager, SLOT(resolveConflict(MergeItem*)) ); }