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 //! Displays the weekly view.
\r
62 * Displays the weekly view.
\r
64 void showWeeklyView();
\r
65 //! Displays the meeting info dialog.
\r
67 * Displays the meeting info dialog.
\r
68 * \param aMeeting Meeting to be displayd
\r
70 void showMeetingInfo( Meeting *aMeeting );
\r
71 //! Returns the pointer to the weekly view.
\r
73 * Returns the pointer to the weekly view.
\r
75 WeeklyViewWidget * weeklyView();
\r
76 //! Switches the views to full screen.
\r
78 * Switches the views to full screen.
\r
82 void insertMeeting( Meeting *aMeeting );
\r
84 void deleteMeeting( Meeting *aMeeting );
\r
87 //! Request current status of the room.
\r
89 * Signal is emitted when there is need to check current status of room aRoom.
\r
90 * \param aRoom Meetingroom which status is requested.
\r
92 void roomStatusInfoNeeded( Room *aRoom );
\r
93 //! Indicate that some user event has happened.
\r
95 * Signal is emitted if some user event has happened.
\r
97 void observedEventDetected();
\r
98 //! Meeting activated.
\r
100 * Signal is emitted when a meeting is clicked by the user.
\r
101 * \param aMeeting actived meeting.
\r
103 void meetingActivated( Meeting *aMeeting );
\r
104 //! Signals if the shown week has been changed.
\r
106 * Signal. Emitted if the shown week has been changed.
\r
107 * \param aDate The first date of the shown week.
\r
109 void shownWeekChanged( QDate aDate );
\r
110 //! Signals change of the meeting room.
\r
112 * Signal is emitted when meeting room is changed.
\r
113 * \param aRoom Selected meeting room.
\r
115 void currentRoomChanged( Room *aRoom );
\r
118 //! Slot for displaying the screensaver (room status view).
\r
120 * Slot. Displays the screensaver.
\r
122 void showRoomStatus();
\r
123 //! Slot for updating the time.
\r
125 * Slot. Forwards the signal of changed time to current view.
\r
126 * \param aCurrentDateTime Current date and time.
\r
128 void distributeDateTimeInfo( QDateTime aCurrentDateTime );
\r
131 //! Displays the settings view
\r
132 void showSettingsView();
\r
133 //! Slot for receiving the status of the entered password
\r
135 * Slot. Receives the status of the entered password and makes the DeviceManager to change the
\r
136 * operation mode if the password is correct.
\r
137 * \param aPasswordStatus The status of the password.
\r
139 void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );
\r
140 //! Slot for showing/hiding the progress bar.
\r
142 * Slot. Starts showing or hides the progress bar.
\r
143 * \param aText The text to be shown in progress bar.
\r
144 * \param aStart to indicate whether the progress bar is wanted to shown or hidden
\r
146 void progressBar( const QString &aText = "", bool aStart = false );
\r
149 //! Name of the application.
\r
150 QString iApplicationName;
\r
151 //! Pointer to the configuration.
\r
152 Configuration *iConfiguration;
\r
153 //! Pointer to the weekly view.
\r
154 WeeklyViewWidget *iWeeklyView;
\r
155 //! Pointer to the screensaver (room status view).
\r
156 RoomStatusIndicatorWidget *iRoomStatusView;
\r
157 //! Pointer to the meeting info dialog
\r
158 MeetingInfoDialog *iMeetingInfo;
\r
159 //! Pointer to the settings view
\r
160 SettingsView *iSettingsView;
\r
161 //! Pointer to the progress bar
\r
162 ProgressBar *iProgressBar;
\r
163 //! Pointer to the password dialog.
\r
164 PasswordDialog *iPasswordDialog;
\r
168 #endif /*WINDOWMANAGER_H_*/
\r