From: Zoltan Papp Date: Thu, 28 May 2009 10:08:16 +0000 (+0300) Subject: Merge branch 'master' into dev_local X-Git-Url: https://vcs.maemo.org/git/?p=qtmeetings;a=commitdiff_plain;h=fca5bd9a27f0bbb3c60ae13218a503c5df26c897 Merge branch 'master' into dev_local Conflicts: src/BusinessLogic/Engine.cpp src/BusinessLogic/Engine.h src/UserInterface/WindowManager.h --- fca5bd9a27f0bbb3c60ae13218a503c5df26c897 diff --cc src/BusinessLogic/Engine.cpp index af3e342,009dbdd..195b0aa --- a/src/BusinessLogic/Engine.cpp +++ b/src/BusinessLogic/Engine.cpp @@@ -18,33 -18,26 +18,27 @@@ QTime Engine::endOfTheDay = QTime( 23, 59, 0, 0); // end of the day is 11:59pm const int IDLE_TIME_MULTIPLIER = 60000; // Multiplies milliseconds to minutes + // Macro to help deleting objects. This could be global. + #define QT_DELETE(X) \ + if ( X != 0 ) \ + { \ + delete X; \ + X = 0; \ + } + + Engine::Engine() : - iClock( 0), iConfiguration(Configuration::instance() ), iCommunication( 0) + iClock( 0 ), iConfiguration( 0 ), iCommunication( 0 ), + iWindowManager( 0 ), iUIManager( 0 ) { qDebug() << "Engine::Engine()"; + iCommunicationFailed = false; - // if reading of configuration fails, signal that initialization failed - if (iConfiguration == 0) - { - QTimer::singleShot( 0, this, SLOT( closeApplication() )); - return; - } - - //initialize window manager - iWindowManager = new WindowManager( iConfiguration ); - connect(iWindowManager, SIGNAL( roomStatusInfoNeeded( Room * ) ), this, SLOT( roomStatusInfoNeeded( Room * ) )); - connect(iWindowManager, SIGNAL( observedEventDetected() ), this, SLOT( observedEventDetected() )); - connect(iWindowManager, SIGNAL( meetingActivated( Meeting * ) ), this, SLOT( fetchMeetingDetails( Meeting * ) )); - connect(iWindowManager, SIGNAL( currentRoomChanged( Room * ) ), this, SLOT( currentRoomChanged( Room * ) )); - connect(iWindowManager, SIGNAL( shownWeekChanged( QDate ) ), this, SLOT( shownWeekChanged( QDate ) )); - connect(iWindowManager, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ), this, SLOT( passwordEntered( PasswordDialog::PasswordStatus ) )); - - // initialize communication - iCommunication = new CommunicationManager( *(iConfiguration->connectionSettings()) ); - connect(iCommunication, SIGNAL( error( int, CommunicationManager::CommunicationType ) ), this, SLOT( errorHandler( int ) )); - connect(iCommunication, SIGNAL( meetingsFetched( const QList& ) ), this, SLOT( meetingsFetched( const QList& ) )); - connect(iCommunication, SIGNAL( meetingDetailsFetched( Meeting& ) ), this, SLOT( meetingDetailsFetched( Meeting& ) )); - + + initConfiguration(); + initDevice(); + initCommunication(); + initUserInterface(); + //initialize idle time counter iIdleTimeCounter = new QTimer(); iIdleTimeCounter->setSingleShot( true); @@@ -209,158 -188,166 +189,179 @@@ void Engine::fetchMeetingDetails( Meeti connect(iWindowManager, SIGNAL( progressBarCancelled() ), this, SLOT( fetchMeetingDetailsCancelled() )); - iCommunication->fetchMeetingDetails( *aMeeting); + iCommunication->fetchMeetingDetails( *aMeeting); */ + iCommunication->fetchMeetingDetails( *aMeeting ); } - bool Engine::isMeetingInList(const QList &aList, const Meeting *aMeeting) - { - qDebug() - << "Engine::isMeetingInList( const QList &, const Meeting * )"; - for (int i = 0; i < aList.count(); i++) - { - if (aMeeting->equals( *(aList.at(i))) ) - { - return true; - } - } - return false; - } - - void Engine::meetingsFetched(const QList &aMeetings) + void Engine::meetingsFetched( const QList &aMeetings ) { qDebug() << "Engine::meetingsFetched( const QList & )"; - - for ( int i = 0; i < iMeetings.count(); ++i ) { + if( iCommunicationFailed ) + { + iCommunicationFailed = false; - //iWindowManager->connectionEstablished(); ++ iWindowManager->connectionEstablished(); + } + - // check if there is any new meeting in the list came from the server -> added - for (int i = 0; i < aMeetings.count(); i++) ++ for ( int i = 0; i < iMeetings.count(); ++i ) + { - // if the (i)th meeting is not in the local meeting list - if ( !isMeetingInList(iMeetings, aMeetings.at(i) ) ) - { - // add to the local database =) - Meeting* m = new Meeting( *(aMeetings.at( i )) ); - iMeetings.append(m); - // and signal the changes - iWindowManager->insertMeeting(m); - } + Meeting* m = iMeetings.takeAt( i ); + delete m; + } + iMeetings.clear(); + for ( int i = 0; i < aMeetings.count(); ++i ) { + Meeting* m = new Meeting( *( aMeetings.at( i ) ) ); + iMeetings.append( m ); } - // check if there is any meeting NOT in the list came from the server -> deleted - for (int i = 0; i < iMeetings.count(); i++) + // refresh room status info + roomStatusInfoNeeded( defaultRoom() ); + } + + void Engine::errorHandler( int aCode, const QString &aAddInfo ) + { ++ if( aCode >= 100 && aCode < 150 ) + { - // if the (i)th meeting is in the local but NOT in the server's meeting list - if ( !isMeetingInList(aMeetings, iMeetings.at(i) ) ) - { - Meeting* m = iMeetings.takeAt(i); - // signal the changes - iWindowManager->deleteMeeting(m); - // delete the meeting from the local list - delete m; - } ++ iCommunicationFailed = true; ++ //TODO: Call window manager ++ //if ( iWindowManager != 0 ) iWindowManager->connectionLost(); ++ } + if ( iWindowManager != 0 ) + { + iWindowManager->error( ErrorMapper::codeToString( aCode, aAddInfo ) ); } + } - // refresh room status info - roomStatusInfoNeeded(defaultRoom() ); + void Engine::fetchMeetings( const QDateTime &aFrom, const QDateTime &aUntil, const Room *aIn ) + { + qDebug() + << "Engine::fetchMeetings( const QDateTime &, const QDateTime &, const Room * )"; + iCommunication->fetchMeetings(aFrom, aUntil, *aIn); } - void Engine::meetingDetailsFetched(Meeting &aDetailedMeeting) + void Engine::cancelFetchMeetingDetails() { - qDebug() << "Engine::meetingDetailsFetched( Meeting & )"; - iWindowManager->closeProgressBar(); - if( iCommunicationFailed ) + iCommunication->cancelFetchMeetingDetails(); + } + + void Engine::shownWeekChanged( QDate aFrom ) + { + qDebug() << "[Engine::shownWeekChanged] "; + QDateTime from( aFrom ); + QDateTime to( aFrom.addDays( 7 ), QTime( 23, 59 ) ); + qDebug() << "[Engine::shownWeekChanged] "; + iCommunication->fetchMeetings( from, to, *defaultRoom() ); + // fetchMeetings( from, to, iWindowManager->weeklyView()->currentRoom() ); + } + + void Engine::changeDeviceMode( bool aChange ) + { + if ( aChange ) ++ } { - iCommunicationFailed = false; - iWindowManager->connectionEstablished(); + connect( iDevice, SIGNAL( changingModeFailed() ), this, SLOT( changeModeFailed() ) ); + iAutoRefresh->stop(); // Stop the meeting update } - iWindowManager->showMeetingInfo( &aDetailedMeeting); + iDevice->changeMode( aChange ); } - void Engine::errorHandler(int aCode, const QString &aAddInfo) + void Engine::changeModeFailed() { - qDebug() << "Engine::ErrorHandler, aCode: " << aCode; - // inform UI about the problem - if( aCode >= 100 && aCode <= 150 ) { //communication errors + qDebug() << "Engine::progressBarCancelled()"; + iDevice->changeMode( false ); + iAutoRefresh->start(); //we start the metting updating + } + + void Engine::initUserInterface() + { + qDebug() << "[Engine::initUserInterface] "; + + // 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(); + + qDebug() << "[Engine::initUserInterface] "; + } + + void Engine::handleViewEvent() + { + if ( iIdleTimeCounter != 0 ) { - //we don't want these to close operation changing - qDebug() << "CommunicationManager signaled an error:" << aCode; - if( !iCommunicationFailed ) - { - // Only inform window manager when first error appears - iCommunicationFailed = true; - //iWindowManager->connectionLost(); - } - } - iWindowManager->closeProgressBar(); + // Restart the idle time counter when view event is received + iIdleTimeCounter->stop(); + iIdleTimeCounter->start(); } - iWindowManager->error(ErrorMapper::codeToString(aCode, aAddInfo) ); } - void Engine::currentRoomChanged(Room *aCurrentRoom) + void Engine::initConfiguration() { - qDebug() << "Engine::currentRoomChanged to " << aCurrentRoom->name(); - QDateTime from(iWindowManager->weeklyView()->beginnigOfShownWeek() ); - QDateTime to(from.addDays( 8) ); - fetchMeetings(from, to, aCurrentRoom); + iConfiguration = Configuration::instance(); + if ( iConfiguration == 0 ) + { + QTimer::singleShot( 0, this, SLOT( closeApplication() ) ); + } + iCurrentRoom = iConfiguration->defaultRoom(); } - void Engine::fetchMeetings(const QDateTime &aFrom, const QDateTime &aUntil, const Room *aIn) + void Engine::connectSignals() { - qDebug() - << "Engine::fetchMeetings( const QDateTime &, const QDateTime &, const Room * )"; - iCommunication->fetchMeetings(aFrom, aUntil, *aIn); + // 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::shownWeekChanged(QDate aFrom) + void Engine::initCommunication() { - qDebug() << "Engine::shownWeekChanged( QDate )"; - QDateTime from(aFrom); - QDateTime to(aFrom.addDays( 7), QTime( 23, 59) ); - qDebug() << "Engine::shownWeekChanged " << aFrom.toString("d.m. h:mm") - << " to " << to.toString("d.m. h:mm"); - fetchMeetings(from, to, iWindowManager->weeklyView()->currentRoom() ); + // initialize communication + iCommunication = new CommunicationManager( *(iConfiguration->connectionSettings()) ); + connect( iCommunication, SIGNAL( error( int, CommunicationManager::CommunicationType ) ), + this, SLOT( errorHandler( int ) ) ); + connect( iCommunication, SIGNAL( meetingsFetched( const QList& ) ), + this, SLOT( meetingsFetched( const QList& ) ) ); } - void Engine::changeModeOrdered(DeviceManager::OperationMode aMode) + void Engine::initDevice() { - qDebug() << "Engine::changeModeOrdered( DeviceManager::OperationMode )"; - QString message = tr( "You are about to change operation mode to %1." ) - .arg(iDevice->operationModeToString(aMode) ); + // create device manager + iDevice = new DeviceManager( iConfiguration->startupSettings() ); + connect( iDevice, SIGNAL( error( int, const QString& ) ), this, SLOT( errorHandler( int, const QString& ) ) ); + iDevice->initDeviceManager(); + } - iWindowManager->showPasswordDialog(iConfiguration->adminPassword(), message); + void Engine::dialogActivated() + { + if ( iIdleTimeCounter != 0 ) + { + iIdleTimeCounter->stop(); + } } - void Engine::passwordEntered(PasswordDialog::PasswordStatus aPasswordStatus) + void Engine::dialogDeactivated() { - qDebug() << "Engine::passwordEntered( PasswordDialog::PasswordStatus )"; - iWindowManager->closePasswordDialog(); + if ( iIdleTimeCounter != 0 ) + { + iIdleTimeCounter->start(); + } + } - switch (aPasswordStatus) + void Engine::previousViewRestored() + { + if ( iIdleTimeCounter != 0 ) { - case PasswordDialog::Correct: - { - iAutoRefresh->stop(); //we stop the metting updating - iWindowManager->showProgressBar( "Changing current operation mode." ); - connect(iDevice, SIGNAL( changingMode( const QString & ) ), iWindowManager, SLOT( updateProgressBar( const QString & ) )); - connect( iDevice, SIGNAL( changingMode( const QString & ) ), - iWindowManager, SLOT( updateProgressBar( const QString & ) ) ); - connect( iDevice, SIGNAL( changeModeFailed() ), this, SLOT( changeModeFailed() ) ); - iDevice->changeMode( true); - break; - } - case PasswordDialog::Incorrect: - { - iWindowManager->error(tr("Incorrect password.") ); - iDevice->changeMode( false); - break; - } - default: //case PasswordDialog::Canceled - { - iDevice->changeMode( false); - } + iIdleTimeCounter->start(); } } diff --cc src/BusinessLogic/Engine.h index 129992e,99992dd..69239d4 --- a/src/BusinessLogic/Engine.h +++ b/src/BusinessLogic/Engine.h @@@ -181,7 -205,7 +205,8 @@@ private QList iMeetings; + Room *iCurrentRoom; + bool iCommunicationFailed; }; #endif /*ENGINE_H_*/ diff --cc src/UserInterface/WindowManager.cpp index 3819076,af006f1..f4b7aea --- a/src/UserInterface/WindowManager.cpp +++ b/src/UserInterface/WindowManager.cpp @@@ -208,22 -121,8 +121,21 @@@ void WindowManager::error( const QStrin } } - void WindowManager::updateProgressBar( const QString &aMessage ) + void WindowManager::setFullscreen() { - qDebug() << "WindowManager::updateProgressBar( const QString & )"; - if( iProgressBar != 0 ) - iProgressBar->update( aMessage ); + this->setWindowState( Qt::WindowFullScreen ); + // Resize event handles the rest. } + +void WindowManager::connectionLost() +{ + //TODO: Inform all views + qDebug() << "WindowManager::connectionLost()"; +} + +void WindowManager::connectionEstablished() +{ + //TODO: Inform all views + qDebug() << "WindowManager::connectionEstablished()"; +} + diff --cc src/UserInterface/WindowManager.h index b62517e,2f46050..a3f7440 --- a/src/UserInterface/WindowManager.h +++ b/src/UserInterface/WindowManager.h @@@ -1,192 -1,107 +1,114 @@@ -#ifndef WINDOWMANAGER_H_ -#define WINDOWMANAGER_H_ - -#include -#include - -// Forward declarations -class ViewBase; -class QEvent; -class QSize; -class QDialog; -class QString; - -//! UserInterface class. Manages displayed views. -/*! - * UserInterface class. WindowManager class is responsible for displaying views that inherit the - * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager - * can track the views events and restore previous view if the current on is ObservedView. This - * is a handy mechanism for screensaver etc. - */ -class WindowManager : public QWidget -{ - Q_OBJECT - -public: - //! Constructor. - /*! - * Constructor of WindowManager. - */ - WindowManager( QWidget *aParent = 0 ); - //! Destructor. - virtual ~WindowManager(); - - virtual bool event(QEvent *event); - -signals: - //! Request current status of the room. - /*! - * Signal is emitted when there is need to check current status of room aRoom. - * \param aRoom Meetingroom which status is requested. - */ - void eventDetected(); - - //! The view size is changed. - /*! - * This signal is emitted when the window managers view changes, - * i.e. it received resized QEvent. - * \param The new view size. - */ - void viewResized(const QSize &newSize, const QSize &oldSize); - - //! Previous view is restored. - /*! - * This signal is emitted when previously stored view is - * restored. This happens when view with type ViewMode::ObservedView - * is shown and it receives an event that initiates the view - * restoring chain. - */ - void previousViewRestored(); - - void dialogActivated(); - void dialogDeactivated(); - -public slots: - //! Shows the view. - /*! - * Show view that inherits ViewBase class. If the views parent is not - * the WindowManager it will changed within this method. Depeding on the - * views type the currently active view might be stored and restored - * when specific event occurs in the view to be displayed. - */ - void showView( ViewBase *view ); - - //! Shows modal dialog. - /*! - * Shows modal dialog. Emits dialogActivated() signal prior calling - * QDialog's exec() method and emits dialogDeactivated signal when - * the exec() method returns. - */ - void showDialog( QDialog *aDialog, bool blocking = true, bool aSendSignal = true ); - - //! View event is detected. - /*! - * WindowManager connects this slot to ViewBase classes eventDetected() - * signal and either emits eventDetected() signal if the current views - * type is ViewMode::NormalView or restores possible previous view - * if the current views type is ViewMode::ObservedView. - */ - void viewEventDetected(); - - void setFullscreen(); - - void error( const QString &aErrorMessage ); - -private: - //! Name of the application. - QString iApplicationName; - - //! Currently active view. - ViewBase *iCurrentView; - - //! Stack of views previously displayed. - QStack iViewList; - -}; - -#endif /*WINDOWMANAGER_H_*/ +#ifndef WINDOWMANAGER_H_ +#define WINDOWMANAGER_H_ + - #include - #include - #include "Room.h" - #include "Meeting.h" - #include "PasswordDialog.h" - #include "DeviceManager.h" ++#include ++#include + - class QTimer; - class RoomStatusIndicatorWidget; - class WeeklyViewWidget; - class Engine; - class MeetingInfoDialog; - class SettingsView; - class ProgressBar; - class Configuration; ++// Forward declarations ++class ViewBase; ++class QEvent; ++class QSize; ++class QDialog; ++class QString; + - //! UserInterface class. Behaves as a proxy between the user interface and application's business logic. ++//! UserInterface class. Manages displayed views. +/*! - * UserInterface class. Controls the whole user interface, starting with displaying the appropriate - * views. It behaves as a proxy between the user interface and application's business logic, it connects - * the specified components together and forwards the data to the correct place. It also manages the correct - * appearance of current views on the screen. ++ * UserInterface class. WindowManager class is responsible for displaying views that inherit the ++ * ViewBase class. It also handles dialog showing. Depending on the views type the WindowManager ++ * can track the views events and restore previous view if the current on is ObservedView. This ++ * is a handy mechanism for screensaver etc. + */ - class WindowManager : public QObject ++class WindowManager : public QWidget +{ + Q_OBJECT + +public: + //! Constructor. + /*! + * Constructor of WindowManager. - * \param aConfiguration The pointer to configuration. + */ - WindowManager( Configuration *aConfiguration ); ++ WindowManager( QWidget *aParent = 0 ); + //! Destructor. + virtual ~WindowManager(); - /*! - * Displays an error message - * \param aErrorMessage Message to be displayd - */ - void error( const QString &aErrorMessage ); - //! Updates the rooms status. - /*! - * Forwards the signal of changed status to current view. - * \param aRoom Room which status is changed. - * \param aStatus Current status of room. - * \param aTime Time when status is changed. - */ - void roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime aTime ); - //! Shows the password dialog. - /*! - * Shows the password dialog. - * \param aAdminPassword The correct password. - * \param aMessage The message to be shown in the password dialog. - */ - void showPasswordDialog( QByteArray aAdminPassword, const QString &aMessage ); - //! Closes the password dialog. - /*! - * Closes the password dialog. - */ - void closePasswordDialog(); - //! Displays the weekly view. - /*! - * Displays the weekly view. - */ - void showWeeklyView(); - //! Displays the meeting info dialog. - /*! - * Displays the meeting info dialog. - * \param aMeeting Meeting to be displayd - */ - void showMeetingInfo( Meeting *aMeeting ); - //! Returns the pointer to the weekly view. - /*! - * Returns the pointer to the weekly view. - */ - WeeklyViewWidget * weeklyView(); - //! Switches the views to full screen. - /*! - * Switches the views to full screen. - */ - void fullScreen(); - //! Shows the progress bar. - /*! - * Starts showing the progress bar. - * \param aText The text to be shown in progress bar. - * \param aCancellable Is the Cancel button visible. By default not visible. - */ - void showProgressBar( const QString &aText, bool aCancellable = false ); - //! Closes the progress bar. - /*! - * Closes the progress bar. - */ - void closeProgressBar(); - - void insertMeeting( Meeting *aMeeting ); + - void deleteMeeting( Meeting *aMeeting ); ++ virtual bool event(QEvent *event); ++ + + //! Shows any view specific indicators for connection error + void connectionLost(); + + //! Removes any view specific indicators for connection error + void connectionEstablished(); + +signals: + //! Request current status of the room. + /*! + * Signal is emitted when there is need to check current status of room aRoom. + * \param aRoom Meetingroom which status is requested. + */ - void roomStatusInfoNeeded( Room *aRoom ); - //! Indicate that some user event has happened. - /*! - * Signal is emitted if some user event has happened. - */ - void observedEventDetected(); - //! Meeting activated. - /*! - * Signal is emitted when a meeting is clicked by the user. - * \param aMeeting actived meeting. - */ - void meetingActivated( Meeting *aMeeting ); - //! Signals if the shown week has been changed. - /*! - * Signal. Emitted if the shown week has been changed. - * \param aDate The first date of the shown week. - */ - void shownWeekChanged( QDate aDate ); - //! Signals change of the meeting room. ++ void eventDetected(); ++ ++ //! The view size is changed. + /*! - * Signal is emitted when meeting room is changed. - * \param aRoom Selected meeting room. ++ * This signal is emitted when the window managers view changes, ++ * i.e. it received resized QEvent. ++ * \param The new view size. + */ - void currentRoomChanged( Room *aRoom ); - //! Signals when the password dialog buttons are clicked. ++ void viewResized(const QSize &newSize, const QSize &oldSize); ++ ++ //! Previous view is restored. + /*! - * Signal is emitted when the password dialog buttons are clicked. - * \param aPasswordStatus The status of the password. ++ * This signal is emitted when previously stored view is ++ * restored. This happens when view with type ViewMode::ObservedView ++ * is shown and it receives an event that initiates the view ++ * restoring chain. + */ - void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus ); - //! Signals when the cancel button in the progress bar is clicked. ++ void previousViewRestored(); ++ ++ void dialogActivated(); ++ void dialogDeactivated(); ++ ++public slots: ++ //! Shows the view. + /*! - * Signal is emitted when the cancel button in the progress bar is clicked. ++ * Show view that inherits ViewBase class. If the views parent is not ++ * the WindowManager it will changed within this method. Depeding on the ++ * views type the currently active view might be stored and restored ++ * when specific event occurs in the view to be displayed. + */ - void progressBarCancelled(); ++ void showView( ViewBase *view ); + - public slots: - //! Slot for displaying the screensaver (room status view). ++ //! Shows modal dialog. + /*! - * Slot. Displays the screensaver. ++ * Shows modal dialog. Emits dialogActivated() signal prior calling ++ * QDialog's exec() method and emits dialogDeactivated signal when ++ * the exec() method returns. + */ - void showRoomStatus(); - //! Slot for updating the time. ++ void showDialog( QDialog *aDialog, bool blocking = true, bool aSendSignal = true ); ++ ++ //! View event is detected. + /*! - * Slot. Forwards the signal of changed time to current view. - * \param aCurrentDateTime Current date and time. ++ * WindowManager connects this slot to ViewBase classes eventDetected() ++ * signal and either emits eventDetected() signal if the current views ++ * type is ViewMode::NormalView or restores possible previous view ++ * if the current views type is ViewMode::ObservedView. + */ - void distributeDateTimeInfo( QDateTime aCurrentDateTime ); ++ void viewEventDetected(); + - void updateProgressBar( const QString &aMessage ); ++ void setFullscreen(); + - private slots: - //! Displays the settings view - void showSettingsView(); ++ void error( const QString &aErrorMessage ); + +private: + //! Name of the application. + QString iApplicationName; - //! Defines whether the views should be shown as full screen - bool iFullScreen; - //! Pointer to the configuration. - Configuration *iConfiguration; - //! Pointer to the weekly view. - WeeklyViewWidget *iWeeklyView; - //! Pointer to the screensaver (room status view). - RoomStatusIndicatorWidget *iRoomStatusView; - //! Pointer to the meeting info dialog - MeetingInfoDialog *iMeetingInfo; - //! Pointer to the settings view - SettingsView *iSettingsView; - //! Pointer to the progress bar - ProgressBar *iProgressBar; - //! Pointer to the password dialog. - PasswordDialog *iPasswordDialog; ++ ++ //! Currently active view. ++ ViewBase *iCurrentView; ++ ++ //! Stack of views previously displayed. ++ QStack iViewList; + +}; + +#endif /*WINDOWMANAGER_H_*/