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 class Configuration;
\r
20 //! UserInterface class. Behaves as a proxy between the user interface and application's business logic.
\r
22 * UserInterface class. Controls the whole user interface, starting with displaying the appropriate
\r
23 * views. It behaves as a proxy between the user interface and application's business logic, it connects
\r
24 * the specified components together and forwards the data to the correct place. It also manages the correct
\r
25 * appearance of current views on the screen.
\r
27 class WindowManager : public QObject
\r
34 * Constructor of WindowManager.
\r
35 * \param aConfiguration The pointer to configuration.
\r
37 WindowManager( Configuration *aConfiguration );
\r
39 virtual ~WindowManager();
\r
41 * Displays an error message
\r
42 * \param aErrorMessage Message to be displayd
\r
44 void error( const QString &aErrorMessage );
\r
45 //! Updates the rooms status.
\r
47 * Forwards the signal of changed status to current view.
\r
48 * \param aRoom Room which status is changed.
\r
49 * \param aStatus Current status of room.
\r
50 * \param aTime Time when status is changed.
\r
52 void roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime aTime );
\r
53 //! Shows the password dialog.
\r
55 * Shows the password dialog.
\r
56 * \param aAdminPassword The correct password.
\r
57 * \param aMessage The message to be shown in the password dialog.
\r
59 void showPasswordDialog( QByteArray aAdminPassword, const QString &aMessage );
\r
60 //! Closes the password dialog.
\r
62 * Closes the password dialog.
\r
64 void closePasswordDialog();
\r
65 //! Displays the weekly view.
\r
67 * Displays the weekly view.
\r
69 void showWeeklyView();
\r
70 //! Displays the meeting info dialog.
\r
72 * Displays the meeting info dialog.
\r
73 * \param aMeeting Meeting to be displayd
\r
75 void showMeetingInfo( Meeting *aMeeting );
\r
76 //! Returns the pointer to the weekly view.
\r
78 * Returns the pointer to the weekly view.
\r
80 WeeklyViewWidget * weeklyView();
\r
81 //! Switches the views to full screen.
\r
83 * Switches the views to full screen.
\r
86 //! Shows the progress bar.
\r
88 * Starts showing the progress bar.
\r
89 * \param aText The text to be shown in progress bar.
\r
91 void showProgressBar( const QString &aText );
\r
92 //! Closes the progress bar.
\r
94 * Closes the progress bar.
\r
96 void closeProgressBar();
\r
98 void insertMeeting( Meeting *aMeeting );
\r
100 void deleteMeeting( Meeting *aMeeting );
\r
103 //! Request current status of the room.
\r
105 * Signal is emitted when there is need to check current status of room aRoom.
\r
106 * \param aRoom Meetingroom which status is requested.
\r
108 void roomStatusInfoNeeded( Room *aRoom );
\r
109 //! Indicate that some user event has happened.
\r
111 * Signal is emitted if some user event has happened.
\r
113 void observedEventDetected();
\r
114 //! Meeting activated.
\r
116 * Signal is emitted when a meeting is clicked by the user.
\r
117 * \param aMeeting actived meeting.
\r
119 void meetingActivated( Meeting *aMeeting );
\r
120 //! Signals if the shown week has been changed.
\r
122 * Signal. Emitted if the shown week has been changed.
\r
123 * \param aDate The first date of the shown week.
\r
125 void shownWeekChanged( QDate aDate );
\r
126 //! Signals change of the meeting room.
\r
128 * Signal is emitted when meeting room is changed.
\r
129 * \param aRoom Selected meeting room.
\r
131 void currentRoomChanged( Room *aRoom );
\r
132 //! Signals when the password dialog buttons are clicked.
\r
134 * Signal is emitted when the password dialog buttons are clicked.
\r
135 * \param aPasswordStatus The status of the password.
\r
137 void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );
\r
138 //! Signals when the cancel button in the progress bar is clicked.
\r
140 * Signal is emitted when the cancel button in the progress bar is clicked.
\r
142 void progressBarCancelled();
\r
145 //! Slot for displaying the screensaver (room status view).
\r
147 * Slot. Displays the screensaver.
\r
149 void showRoomStatus();
\r
150 //! Slot for updating the time.
\r
152 * Slot. Forwards the signal of changed time to current view.
\r
153 * \param aCurrentDateTime Current date and time.
\r
155 void distributeDateTimeInfo( QDateTime aCurrentDateTime );
\r
158 //! Displays the settings view
\r
159 void showSettingsView();
\r
162 //! Name of the application.
\r
163 QString iApplicationName;
\r
164 //! Pointer to the configuration.
\r
165 Configuration *iConfiguration;
\r
166 //! Pointer to the weekly view.
\r
167 WeeklyViewWidget *iWeeklyView;
\r
168 //! Pointer to the screensaver (room status view).
\r
169 RoomStatusIndicatorWidget *iRoomStatusView;
\r
170 //! Pointer to the meeting info dialog
\r
171 MeetingInfoDialog *iMeetingInfo;
\r
172 //! Pointer to the settings view
\r
173 SettingsView *iSettingsView;
\r
174 //! Pointer to the progress bar
\r
175 ProgressBar *iProgressBar;
\r
176 //! Pointer to the password dialog.
\r
177 PasswordDialog *iPasswordDialog;
\r
181 #endif /*WINDOWMANAGER_H_*/
\r