From 514c30e1dda23655507cd676f05d90400d1add87 Mon Sep 17 00:00:00 2001 From: Mikko Siren Date: Thu, 28 May 2009 11:15:59 +0300 Subject: [PATCH] Added first fetching of meetings trough UIManager --- src/BusinessLogic/Engine.cpp | 8 ++++++-- src/BusinessLogic/UIManager.cpp | 1 + src/BusinessLogic/UIManager.h | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/BusinessLogic/Engine.cpp b/src/BusinessLogic/Engine.cpp index 009dbdd..89fe7de 100644 --- a/src/BusinessLogic/Engine.cpp +++ b/src/BusinessLogic/Engine.cpp @@ -268,14 +268,17 @@ void Engine::initUserInterface() 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() ) ); +// 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] "; } @@ -369,5 +372,6 @@ void Engine::startIdleTimeCounter() void Engine::currentRoomChanged(Room *aRoom) { + qDebug() << "[Engine::currentRoomChanged] "; iCurrentRoom = aRoom; } \ No newline at end of file diff --git a/src/BusinessLogic/UIManager.cpp b/src/BusinessLogic/UIManager.cpp index 2e55db6..96251a1 100644 --- a/src/BusinessLogic/UIManager.cpp +++ b/src/BusinessLogic/UIManager.cpp @@ -235,6 +235,7 @@ void UIManager::changeModeOrdered( DeviceManager::OperationMode aMode ) void UIManager::currentRoomChanged(Room *aRoom) { + qDebug() << "[UIManager::currentRoomChanged] "; if ( iWeeklyView != 0 ) { QDateTime from = QDateTime( iWeeklyView->beginnigOfShownWeek() ); diff --git a/src/BusinessLogic/UIManager.h b/src/BusinessLogic/UIManager.h index bc0f629..b2ef8e5 100644 --- a/src/BusinessLogic/UIManager.h +++ b/src/BusinessLogic/UIManager.h @@ -96,12 +96,17 @@ public slots: * and waits for its response. */ void changeModeOrdered( DeviceManager::OperationMode aMode ); + //! Handles select room change. + /*! + * Handles the changing of currently select room. Engine is requested + * to start fetching new meetings for currently shown week. + */ + void currentRoomChanged( Room *aRoom ); private slots: void meetingsFetched( const QList &aMeetings ); void meetingDetailsFetched( Meeting &aDetailedMeeting ); - void currentRoomChanged( Room *aRoom ); void progressBarCancelled(); void updateTime( QDateTime aDateTime ); void passwordEntered( PasswordDialog::PasswordStatus aStatus ); -- 1.7.9.5