+ qDebug() << "Engine::progressBarCancelled()";
+ iAutoRefresh->start(); //we start the metting updating
+}
+
+void Engine::initUserInterface()
+{
+ qDebug() << "[Engine::initUserInterface] <Invoked>";
+
+ // Initialize the window manager and connect what ever signals can be connected
+ iWindowManager = new WindowManager;
+ // Create the UIManager which internally handles most of the UI actions
+ iUIManager = new UIManager( this, iWindowManager );
+
+ connect( iWindowManager, SIGNAL( eventDetected() ), this, SLOT( handleViewEvent() ) );
+ connect( iWindowManager, SIGNAL( previousViewRestored() ), iUIManager, SLOT( previousViewRestored() ) );
+ connect( iWindowManager, SIGNAL( dialogActivated() ), this, SLOT( dialogActivated() ) );
+ connect( iWindowManager, SIGNAL( dialogDeactivated() ), this, SLOT( dialogDeactivated() ) );
+
+ // Show the UI
+ iWindowManager->setWindowState( Qt::WindowMaximized );
+ iWindowManager->show();
+ iUIManager->showMainView();
+
+ // This triggers the meeting fetching
+ iUIManager->currentRoomChanged( this->iCurrentRoom );
+
+ qDebug() << "[Engine::initUserInterface] <Finished>";
+}
+
+void Engine::handleViewEvent()
+{
+ if ( iIdleTimeCounter != 0 && iIdleTimeCounter->isActive())
+ {
+ // Restart the idle time counter when view event is received
+ iIdleTimeCounter->stop();
+ iIdleTimeCounter->start();
+ }
+}
+
+void Engine::initConfiguration()
+{
+ iConfiguration = Configuration::instance();
+ if ( iConfiguration == 0 )
+ {
+ QTimer::singleShot( 0, this, SLOT( closeApplication() ) );
+ }
+ iCurrentRoom = iConfiguration->defaultRoom();
+}
+
+void Engine::connectSignals()
+{
+ // Connect engine objects signals to UIManager
+ connect( iClock, SIGNAL( tick( QDateTime ) ), iUIManager, SLOT( updateTime( QDateTime ) ) );
+ connect( iIdleTimeCounter, SIGNAL( timeout() ) , iUIManager, SLOT( roomStatusIndicatorRequested() ) );
+
+ iUIManager->connectDeviceManager( iDevice );
+ iUIManager->connectCommunicationManager( iCommunication );
+}
+
+void Engine::initCommunication()
+{
+ // initialize communication
+ iCommunication = new CommunicationManager( *(iConfiguration->connectionSettings()) );
+ connect( iCommunication, SIGNAL( error( int, CommunicationManager::CommunicationType ) ),
+ this, SLOT( errorHandler( int ) ) );
+ connect( iCommunication, SIGNAL( meetingsFetched( const QList<Meeting*>& ) ),
+ this, SLOT( meetingsFetched( const QList<Meeting*>& ) ) );