ProgressBar connections modified + Progress Bar class itself updated
[qtmeetings] / src / UserInterface / WindowManager.cpp
index 3a593a9..45d8b72 100644 (file)
@@ -19,6 +19,7 @@
 WindowManager::WindowManager( Configuration *aConfiguration ) :
                QObject(),
                iApplicationName( tr( "Qt Meetings" ) ),
+               iFullScreen( false ),
                iConfiguration( aConfiguration ),
                iWeeklyView( 0 ),
                iRoomStatusView( 0 ),
@@ -70,6 +71,8 @@ void WindowManager::roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime
        {
                iRoomStatusView = new RoomStatusIndicatorWidget( aRoom, aStatus, aTime, iConfiguration->displaySettings()->timeFormat() );
                iRoomStatusView->setWindowTitle( iApplicationName );
+               if( iFullScreen )
+                       iRoomStatusView->setWindowState( Qt::WindowFullScreen );
                connect( iRoomStatusView, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );
        }
        else
@@ -119,8 +122,11 @@ void WindowManager::showWeeklyView()
 
 void WindowManager::fullScreen()
 {
-       iRoomStatusView->setWindowState( Qt::WindowFullScreen );
-       iWeeklyView->setWindowState( Qt::WindowFullScreen );
+       if ( iRoomStatusView != 0 )
+               iRoomStatusView->setWindowState( Qt::WindowFullScreen );
+       if ( iWeeklyView != 0 )
+               iWeeklyView->setWindowState( Qt::WindowFullScreen );
+       iFullScreen = true;
 }
 
 void WindowManager::insertMeeting( Meeting *aMeeting )
@@ -166,6 +172,8 @@ void WindowManager::showPasswordDialog( QByteArray aAdminPassword, const QString
        connect( iPasswordDialog, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ),
                        this, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ) );
        iPasswordDialog->show();
+       
+       //TODO connect connect( iWeeklyView, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );
 }
 
 void WindowManager::closePasswordDialog()
@@ -183,11 +191,21 @@ void WindowManager::showProgressBar( const QString &aText )
                iProgressBar->show();
                connect( iProgressBar, SIGNAL( cancel() ), this, SIGNAL( progressBarCancelled() ) );
        }
+       
+       //TODO connect connect( iWeeklyView, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );
 }
 
 void WindowManager::closeProgressBar()
 {
+       qDebug() << "WindowManager::closeProgressBar()";
        iProgressBar->close();
        delete iProgressBar;
        iProgressBar = 0;
 }
+
+void WindowManager::updateProgressBar( const QString &aMessage )
+{
+       qDebug() << "WindowManager::updateProgressBar( const QString & )";
+       if( iProgressBar != 0 )
+               iProgressBar->update( aMessage );
+}