Confilct solved
authorJan Lapinkataja <jan.lapinkataja@ixonos.com>
Thu, 28 May 2009 12:29:09 +0000 (15:29 +0300)
committerJan Lapinkataja <jan.lapinkataja@ixonos.com>
Thu, 28 May 2009 12:29:09 +0000 (15:29 +0300)
Conflicts:
src/BusinessLogic/UIManager.h

1  2 
src/BusinessLogic/UIManager.cpp
src/BusinessLogic/UIManager.h

@@@ -37,12 -37,16 +37,12 @@@ UIManager::UIManager( Engine *aEngine, 
        if ( iEngine == 0 ) return;
        if ( iWindowManager == 0 ) return;
        
 -      qDebug() << "[UIManager::ctor] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
 -      
        createWeeklyView();
        createSettingsView();
        createRoomStatusIndicator();
        createPasswordDialog();
        createProgressBar();
        createMeetingInfoDialog();
 -      
 -      qDebug() << "[UIManager::ctor] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
  }
  
  UIManager::~UIManager()
@@@ -63,15 -67,6 +63,6 @@@ void UIManager::showMainView(
        iWindowManager->showView( iWeeklyView );
  }
  
- void UIManager::showProgressBar( QString aText )
- {
-       if ( iProgressBar != 0 )
-       {
-               iProgressBar->update( aText );
-               iWindowManager->showDialog( iProgressBar );
-       }
- }
  // ===============================================
  //            INITIALIZE THE UIMANAGER
  void UIManager::createWeeklyView()
@@@ -103,8 -98,7 +94,7 @@@ void UIManager::createRoomStatusIndicat
  
  void UIManager::createPasswordDialog()
  {
-       iPasswordDialog = new PasswordDialog( iEngine->iConfiguration->adminPassword(), tr("UIManager::createPasswordDialog"), tr("UIManager::createPasswordDialog") );
-       
+       iPasswordDialog = new PasswordDialog( iEngine->iConfiguration->adminPassword(), "", tr("Enter password") );
        connect( iPasswordDialog, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ), this, SLOT( passwordEntered( PasswordDialog::PasswordStatus ) ) );
  }
  
@@@ -173,7 -167,8 +163,8 @@@ void UIManager::showMeetingProgressBar
  {
        if ( iProgressBar != 0 )
        {
-               iProgressBar->update( tr("Fetching meeting info...") );
+               iProgressBar->update( tr( "Fetching meeting info..." ), tr( "Please wait" ) );
+               iProgressBar->toggleCancellable( true );
                iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false, false );
                iEngine->stopIdleTimeCounter();
        }
@@@ -222,20 -217,18 +213,19 @@@ void UIManager::progressBarCancelled(
  void UIManager::changeModeOrdered( DeviceManager::OperationMode aMode )
  {
        qDebug() << "[UIManager::changeModeOrdered] <Invoked>";
  
        if ( iPasswordDialog != 0 )
        {
-               // TODO : Set the new text for password dialog
+               QString text = tr( "You are about to change operation mode to %1." )
+                                               .arg( iEngine->iDevice->operationModeToString( aMode ) );
+               iPasswordDialog->update( text );
                iWindowManager->showDialog( static_cast<QDialog *>( iPasswordDialog ) );
        }
  }
  
  void UIManager::currentRoomChanged(Room *aRoom)
  {
 +      qDebug() << "[UIManager::currentRoomChanged] <Invoked>";
        if ( iWeeklyView != 0 )
        {
                QDateTime from = QDateTime( iWeeklyView->beginnigOfShownWeek() );
@@@ -260,6 -253,8 +250,8 @@@ void UIManager::passwordEntered( Passwo
                        // Show the progress bar..
                        if ( iProgressBar != 0 )
                        {
+                               iProgressBar->update( tr( "" ), tr( "Changing operation mode" ) );
+                               iProgressBar->toggleCancellable( false );
                                iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
                        }
                        // ... and initiate the mode changing
@@@ -18,15 -18,6 +18,15 @@@ class MeetingInfoDialog
  class CommunicationManager;
  class QDateTime;
  
 +//! User Interface manager class.
 +/*!
 + * User Interface manager class that is responsible for handling
 + * UI actions. It creates the needed views and connects signals
 + * accordingly. All interactions with the UI is handled by this
 + * class. The Engine class handles the basic logic and does not
 + * know or care about the UI and this class does not know or care
 + * about the basic logic only UI related actions (signals, events etc.).
 + */
  class UIManager : public QObject
  {
        Q_OBJECT
@@@ -35,78 -26,25 +35,73 @@@ public
        UIManager( Engine *aEngine, WindowManager *aWindowManager );
        virtual ~UIManager();
        
 +      //! Connects Device Managers signals.
 +      /*!
 +       * This method connects Device Managers signals directly to UI
 +       * components or to it selft.
 +       */
        void connectDeviceManager( DeviceManager *aDeviceManager );
 +      //! Connects Communication Managers signals.
 +      /*!
 +       * This method connects Communication Managers signals directly to UI
 +       * components or to it selft.
 +       */
        void connectCommunicationManager( CommunicationManager *aCommunicationManager );
 +      //! Shows the main view.
 +      /*!
 +       * Makes the main view visible trough WindowManager.
 +       */
        void showMainView();
-       //! Shows the progress bar.
-       /*!
-        * Shows the progress bar with given text.
-        */
-       void showProgressBar( QString aText );
  
  signals:
        
  public slots:
  
 +      //! Handles setting view request.
 +      /*!
 +       * Handles request to show settings view. Makes the
 +       * view visible and stops the idle time counter.
 +       */
        void settingsViewRequest();
 +      //! Handles setting views ok clicked.
 +      /*!
 +       * Handles the setting views Ok button clicked
 +       * signal. Sets the weekly view visible and starts
 +       * the idle time counter.
 +       */
        void settingsOkClicked();
 +      //! Handles room status indicator view request.
 +      /*!
 +       * Handles the request to show room status indicator
 +       * view. Sets the view visible and stops the idle
 +       * time counter. The WindowManager handles restoring
 +       * what ever view was previously visible.
 +       */
        void roomStatusIndicatorRequested();
 +      //! Handles previousViewRestored signal.
 +      /*!
 +       * Handles the restoring of previous view. This is usually
 +       * signaled by WindowManager when room status indicator
 +       * view is being hidden.
 +       */
        void previousViewRestored();
 +      //! Handle change mode order.
 +      /*!
 +       * Handles change mode order. Displays the password query dialog
 +       * 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<Meeting*> &aMeetings );
        void meetingDetailsFetched( Meeting &aDetailedMeeting );
 -      void currentRoomChanged( Room *aRoom );
        void progressBarCancelled();
        void updateTime( QDateTime aDateTime );
        void passwordEntered( PasswordDialog::PasswordStatus aStatus );