-#ifndef WINDOWMANAGER_H_\r
-#define WINDOWMANAGER_H_\r
-\r
-#include <QObject>\r
-#include <QTime>\r
-#include "Room.h"\r
-#include "Meeting.h"\r
-#include "PasswordDialog.h"\r
-#include "DeviceManager.h"\r
-\r
-class QTimer;\r
-class RoomStatusIndicatorWidget;\r
-class WeeklyViewWidget;\r
-class Engine;\r
-class MeetingInfoDialog;\r
-class SettingsView;\r
-class ProgressBar;\r
-class Configuration;\r
-\r
-//! UserInterface class. Behaves as a proxy between the user interface and application's business logic.\r
-/*!\r
- * UserInterface class. Controls the whole user interface, starting with displaying the appropriate\r
- * views. It behaves as a proxy between the user interface and application's business logic, it connects\r
- * the specified components together and forwards the data to the correct place. It also manages the correct\r
- * appearance of current views on the screen.\r
- */\r
-class WindowManager : public QObject\r
-{\r
- Q_OBJECT\r
-\r
-public:\r
- //! Constructor.\r
- /*!\r
- * Constructor of WindowManager.\r
- * \param aConfiguration The pointer to configuration.\r
- */\r
- WindowManager( Configuration *aConfiguration );\r
- //! Destructor.\r
- virtual ~WindowManager();\r
- /*!\r
- * Displays an error message\r
- * \param aErrorMessage Message to be displayd\r
- */\r
- void error( const QString &aErrorMessage );\r
- //! Updates the rooms status.\r
- /*! \r
- * Forwards the signal of changed status to current view.\r
- * \param aRoom Room which status is changed.\r
- * \param aStatus Current status of room.\r
- * \param aTime Time when status is changed.\r
- */\r
- void roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime aTime );\r
- //! Shows the password dialog.\r
- /*!\r
- * Shows the password dialog.\r
- * \param aAdminPassword The correct password.\r
- * \param aMessage The message to be shown in the password dialog.\r
- */\r
- void showPasswordDialog( QByteArray aAdminPassword, const QString &aMessage );\r
- //! Closes the password dialog.\r
- /*!\r
- * Closes the password dialog.\r
- */\r
- void closePasswordDialog();\r
- //! Displays the weekly view.\r
- /*!\r
- * Displays the weekly view.\r
- */\r
- void showWeeklyView();\r
- //! Displays the meeting info dialog.\r
- /*!\r
- * Displays the meeting info dialog. \r
- * \param aMeeting Meeting to be displayd\r
- */\r
- void showMeetingInfo( Meeting *aMeeting );\r
- //! Returns the pointer to the weekly view. \r
- /*!\r
- * Returns the pointer to the weekly view.\r
- */\r
- WeeklyViewWidget * weeklyView();\r
- //! Switches the views to full screen.\r
- /*!\r
- * Switches the views to full screen.\r
- */\r
- void fullScreen();\r
- //! Shows the progress bar.\r
- /*!\r
- * Starts showing the progress bar.\r
- * \param aText The text to be shown in progress bar.\r
- */\r
- void showProgressBar( const QString &aText );\r
- //! Closes the progress bar.\r
- /*!\r
- * Closes the progress bar.\r
- */\r
- void closeProgressBar();\r
- \r
- void insertMeeting( Meeting *aMeeting );\r
- \r
- void deleteMeeting( Meeting *aMeeting );\r
-\r
-signals:\r
- //! Request current status of the room.\r
- /*!\r
- * Signal is emitted when there is need to check current status of room aRoom.\r
- * \param aRoom Meetingroom which status is requested.\r
- */\r
- void roomStatusInfoNeeded( Room *aRoom );\r
- //! Indicate that some user event has happened.\r
- /*!\r
- * Signal is emitted if some user event has happened.\r
- */\r
- void observedEventDetected();\r
- //! Meeting activated.\r
- /*!\r
- * Signal is emitted when a meeting is clicked by the user.\r
- * \param aMeeting actived meeting.\r
- */\r
- void meetingActivated( Meeting *aMeeting );\r
- //! Signals if the shown week has been changed.\r
- /*!\r
- * Signal. Emitted if the shown week has been changed.\r
- * \param aDate The first date of the shown week.\r
- */\r
- void shownWeekChanged( QDate aDate );\r
- //! Signals change of the meeting room.\r
- /*!\r
- * Signal is emitted when meeting room is changed.\r
- * \param aRoom Selected meeting room.\r
- */\r
- void currentRoomChanged( Room *aRoom );\r
- //! Signals when the password dialog buttons are clicked.\r
- /*!\r
- * Signal is emitted when the password dialog buttons are clicked.\r
- * \param aPasswordStatus The status of the password.\r
- */\r
- void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );\r
- //! Signals when the cancel button in the progress bar is clicked.\r
- /*!\r
- * Signal is emitted when the cancel button in the progress bar is clicked.\r
- */\r
- void progressBarCancelled();\r
- \r
-public slots:\r
- //! Slot for displaying the screensaver (room status view).\r
- /*!\r
- * Slot. Displays the screensaver.\r
- */\r
- void showRoomStatus();\r
- //! Slot for updating the time.\r
- /*!\r
- * Slot. Forwards the signal of changed time to current view.\r
- * \param aCurrentDateTime Current date and time.\r
- */\r
- void distributeDateTimeInfo( QDateTime aCurrentDateTime );\r
- \r
- void updateProgressBar( const QString &aMessage );\r
- \r
-private slots:\r
- //! Displays the settings view\r
- void showSettingsView();\r
-\r
-private:\r
- //! Name of the application.\r
- QString iApplicationName;\r
- //! Defines whether the views should be shown as full screen \r
- bool iFullScreen;\r
- //! Pointer to the configuration.\r
- Configuration *iConfiguration;\r
- //! Pointer to the weekly view.\r
- WeeklyViewWidget *iWeeklyView;\r
- //! Pointer to the screensaver (room status view).\r
- RoomStatusIndicatorWidget *iRoomStatusView;\r
- //! Pointer to the meeting info dialog\r
- MeetingInfoDialog *iMeetingInfo;\r
- //! Pointer to the settings view\r
- SettingsView *iSettingsView;\r
- //! Pointer to the progress bar\r
- ProgressBar *iProgressBar;\r
- //! Pointer to the password dialog.\r
- PasswordDialog *iPasswordDialog;\r
-\r
-};\r
-\r
-#endif /*WINDOWMANAGER_H_*/\r
+#ifndef WINDOWMANAGER_H_
+#define WINDOWMANAGER_H_
+
+#include <QObject>
+#include <QTime>
+#include "Room.h"
+#include "Meeting.h"
+#include "PasswordDialog.h"
+#include "DeviceManager.h"
+
+class QTimer;
+class RoomStatusIndicatorWidget;
+class WeeklyViewWidget;
+class Engine;
+class MeetingInfoDialog;
+class SettingsView;
+class ProgressBar;
+class Configuration;
+
+//! UserInterface class. Behaves as a proxy between the user interface and application's business logic.
+/*!
+ * 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.
+ */
+class WindowManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ //! Constructor.
+ /*!
+ * Constructor of WindowManager.
+ * \param aConfiguration The pointer to configuration.
+ */
+ WindowManager( Configuration *aConfiguration );
+ //! 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 );
+
+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.
+ /*!
+ * Signal is emitted when meeting room is changed.
+ * \param aRoom Selected meeting room.
+ */
+ void currentRoomChanged( Room *aRoom );
+ //! Signals when the password dialog buttons are clicked.
+ /*!
+ * Signal is emitted when the password dialog buttons are clicked.
+ * \param aPasswordStatus The status of the password.
+ */
+ void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );
+ //! Signals when the cancel button in the progress bar is clicked.
+ /*!
+ * Signal is emitted when the cancel button in the progress bar is clicked.
+ */
+ void progressBarCancelled();
+
+public slots:
+ //! Slot for displaying the screensaver (room status view).
+ /*!
+ * Slot. Displays the screensaver.
+ */
+ void showRoomStatus();
+ //! Slot for updating the time.
+ /*!
+ * Slot. Forwards the signal of changed time to current view.
+ * \param aCurrentDateTime Current date and time.
+ */
+ void distributeDateTimeInfo( QDateTime aCurrentDateTime );
+
+ void updateProgressBar( const QString &aMessage );
+
+private slots:
+ //! Displays the settings view
+ void showSettingsView();
+
+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;
+
+};
+
+#endif /*WINDOWMANAGER_H_*/