Settings view fixed.
[qtmeetings] / src / BusinessLogic / UIManager.cpp
index 9455bb0..e4cdc67 100644 (file)
@@ -89,6 +89,7 @@ void UIManager::createWeeklyView()
        // Connect signals to engine
        connect( iWeeklyView, SIGNAL( meetingActivated( Meeting * ) ), iEngine, SLOT( fetchMeetingDetails( Meeting * ) ) );
        connect( iWeeklyView, SIGNAL( shownWeekChanged( QDate ) ), iEngine, SLOT( shownWeekChanged( QDate ) ) );
+       connect( iWeeklyView, SIGNAL( currentRoomChanged( Room * ) ), iEngine, SLOT( currentRoomChanged( Room * ) ) );
 }
 
 void UIManager::createSettingsView()
@@ -97,6 +98,7 @@ void UIManager::createSettingsView()
        
        // Connect signals
        connect( iSettingsView, SIGNAL( okClicked() ), this, SLOT( settingsOkClicked() ) );
+       connect( iSettingsView, SIGNAL( cancelClicked() ), this, SLOT( settingsCancelClicked() ) );
 }
 
 void UIManager::createRoomStatusIndicator()
@@ -137,7 +139,7 @@ void UIManager::connectDeviceManager( DeviceManager *aDeviceManager )
 
 void UIManager::connectCommunicationManager( CommunicationManager *aCommunicationManager )
 {
-//     connect( aCommunicationManager, SIGNAL( meetingDetailsFetched( Meeting & ) ), this, SLOT( meetingDetailsFetched( Meeting & ) ) );
+       connect( aCommunicationManager, SIGNAL( meetingDetailsFetched( Meeting & ) ), this, SLOT( meetingDetailsFetched( Meeting & ) ) );
        connect( aCommunicationManager, SIGNAL( meetingsFetched( const QList<Meeting *> & ) ), this, SLOT( meetingsFetched( const QList<Meeting *> & ) ) );
 }
 
@@ -177,7 +179,8 @@ void UIManager::showMeetingProgressBar( Meeting *aMeeting )
        if ( iProgressBar != 0 )
        {
                iProgressBar->update( tr("Fetching meeting info...") );
-               iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
+               iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false, false );
+               iEngine->stopIdleTimeCounter();
        }
 }
 
@@ -190,9 +193,11 @@ void UIManager::meetingDetailsFetched(Meeting &aDetailedMeeting)
                {
                        iProgressBar->close(); // Close it in case it's visible
                }
-               // iMeetingInfo->setMeeting( &aDetailedMeeting );
                MeetingInfoDialog *tmp = new MeetingInfoDialog( &aDetailedMeeting );
-               iWindowManager->showDialog( static_cast<QDialog *>( tmp/*iMeetingInfo*/ ) );
+               iWindowManager->showDialog( static_cast<QDialog *>( tmp ) );
+// TODO : We should use the member variable and implement correctly the setMeeting() method !!!
+//             iMeetingInfo->setMeeting( &aDetailedMeeting );
+//             iWindowManager->showDialog( static_cast<QDialog *>( iMeetingInfo ) );
        }
 }
 
@@ -215,6 +220,7 @@ void UIManager::progressBarCancelled()
        if ( iProgressBar != 0 )
        {
                iProgressBar->close();
+               iEngine->startIdleTimeCounter();
        }
 }
 
@@ -293,3 +299,13 @@ void UIManager::hideProgressBar()
                iProgressBar->close();
        }
 }
+
+void UIManager::settingsCancelClicked()
+{
+       // Show the weekly view and restart the idle timer
+       if ( iWeeklyView != 0 )
+       {
+               iWindowManager->showView( static_cast<ViewBase *>( iWeeklyView ) );
+               iEngine->startIdleTimeCounter();
+       }
+}