1 #ifndef WINDOWMANAGER_H_
\r
2 #define WINDOWMANAGER_H_
\r
8 #include "PasswordDialog.h"
\r
9 #include "DeviceManager.h"
\r
12 class RoomStatusIndicatorWidget;
\r
13 class WeeklyViewWidget;
\r
15 class MeetingInfoDialog;
\r
18 //! UserInterface class. Behaves as a proxy between the user interface and application's business logic.
\r
20 * UserInterface class. Controls the whole user interface, starting with displaying the appropriate
\r
21 * views. It behaves as a proxy between the user interface and application's business logic, it connects
\r
22 * the specified components together and forwards the data to the correct place. It also manages the correct
\r
23 * appearance of current views on the screen.
\r
25 class WindowManager : public QObject
\r
32 * Constructor of WindowManager.
\r
36 virtual ~WindowManager();
\r
39 //! Request current status of the room.
\r
41 * Signal is emitted when there is need to check current status of room aRoom.
\r
42 * \param aRoom Meetingroom which status is requested.
\r
44 void roomStatusInfoNeeded( Room *aRoom );
\r
47 //! Closes the application.
\r
48 void closeApplication();
\r
49 //! Updates the time.
\r
51 * Forwards the signal of changed time to current view.
\r
52 * \param aCurrentDateTime Current date and time.
\r
54 void distributeDateTimeInfo( QDateTime aCurrentDateTime );
\r
55 //! Updates the rooms status.
\r
57 * Forwards the signal of changed status to current view.
\r
58 * \param aRoom Room which status is changed.
\r
59 * \param aStatus Current status of room.
\r
60 * \param aTime Time when status is changed.
\r
62 void roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime aTime );
\r
63 //! Displays the weekly view
\r
64 void showWeeklyView();
\r
65 //! Displays the screensaver (room status view)
\r
66 void showRoomStatus();
\r
67 //! Displays the settings view
\r
68 void showSettingsView();
\r
70 * Displays the meeting info dialog
\r
71 * \param aMeeting Meeting to be displayd
\r
73 void showMeetingInfo( Meeting *aMeeting );
\r
75 * Displays an error message
\r
76 * \param aErrorMessage Message to be displayd
\r
78 void error( const QString &aErrorMessage );
\r
79 //! Restarts the timer to launch the screensaver.
\r
80 void observedEventDetected();
\r
81 //! Slot for fetching meetings.
\r
83 * Slot. Fetches meetings for room aRoom for currently visible week
\r
86 void fetchMeetings( Room *aRoom );
\r
87 //! Slot for fetching meetings.
\r
89 * Slot. Fetches meetings for current room from date aFrom to week ahead.
\r
90 * \param aFrom Date where to begin fetching
\r
92 void fetchMeetings( QDate aFrom );
\r
93 //! Slot for popping up the confirmation dialog to change the current operation mode
\r
95 * Slot. Asks PopUpMessageBox to pop up a confirmation dialog.
\r
96 * \param aMode The operation mode to be changed to
\r
98 void changeModeOrdered( DeviceManager::OperationMode aMode );
\r
99 //! Slot for receiving the status of the entered password
\r
101 * Slot. Receives the status of the entered password and makes the DeviceManager to change the
\r
102 * operation mode if the password is correct.
\r
103 * \param aPasswordStatus The status of the password.
\r
105 void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );
\r
108 //! Name of the application.
\r
109 QString iApplicationName;
\r
110 //! Pointer to the weekly view.
\r
111 WeeklyViewWidget *iWeeklyView;
\r
112 //! Pointer to the screensaver (room status view).
\r
113 RoomStatusIndicatorWidget *iRoomStatusView;
\r
114 //! Pointer to the meeting info dialog
\r
115 MeetingInfoDialog *iMeetingInfo;
\r
116 //! Pointer to the engine.
\r
118 //! Timer to launch the screensaver widget
\r
119 QTimer *iIdleTimeCounter;
\r
120 //! Pointer to the settings view
\r
121 SettingsView *iSettingsView;
\r
125 #endif /*WINDOWMANAGER_H_*/
\r