ProgressBar connections modified + Progress Bar class itself updated
[qtmeetings] / src / UserInterface / WindowManager.h
1 #ifndef WINDOWMANAGER_H_\r
2 #define WINDOWMANAGER_H_\r
3 \r
4 #include <QObject>\r
5 #include <QTime>\r
6 #include "Room.h"\r
7 #include "Meeting.h"\r
8 #include "PasswordDialog.h"\r
9 #include "DeviceManager.h"\r
10 \r
11 class QTimer;\r
12 class RoomStatusIndicatorWidget;\r
13 class WeeklyViewWidget;\r
14 class Engine;\r
15 class MeetingInfoDialog;\r
16 class SettingsView;\r
17 class ProgressBar;\r
18 class Configuration;\r
19 \r
20 //! UserInterface class. Behaves as a proxy between the user interface and application's business logic.\r
21 /*!\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
26  */\r
27 class WindowManager : public QObject\r
28 {\r
29         Q_OBJECT\r
30 \r
31 public:\r
32         //! Constructor.\r
33         /*!\r
34          * Constructor of WindowManager.\r
35          * \param aConfiguration The pointer to configuration.\r
36          */\r
37         WindowManager( Configuration *aConfiguration );\r
38         //! Destructor.\r
39         virtual ~WindowManager();\r
40         /*!\r
41          * Displays an error message\r
42          * \param aErrorMessage Message to be displayd\r
43          */\r
44         void error( const QString &aErrorMessage );\r
45         //! Updates the rooms status.\r
46         /*! \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
51          */\r
52         void roomStatusChanged( Room *aRoom, Room::Status aStatus, QTime aTime );\r
53         //! Shows the password dialog.\r
54         /*!\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
58          */\r
59         void showPasswordDialog( QByteArray aAdminPassword, const QString &aMessage );\r
60         //! Closes the password dialog.\r
61         /*!\r
62          * Closes the password dialog.\r
63          */\r
64         void closePasswordDialog();\r
65         //! Displays the weekly view.\r
66         /*!\r
67          * Displays the weekly view.\r
68          */\r
69         void showWeeklyView();\r
70         //! Displays the meeting info dialog.\r
71         /*!\r
72          * Displays the meeting info dialog. \r
73          * \param aMeeting Meeting to be displayd\r
74          */\r
75         void showMeetingInfo( Meeting *aMeeting );\r
76         //! Returns the pointer to the weekly view. \r
77         /*!\r
78          * Returns the pointer to the weekly view.\r
79          */\r
80         WeeklyViewWidget * weeklyView();\r
81         //! Switches the views to full screen.\r
82         /*!\r
83          * Switches the views to full screen.\r
84          */\r
85         void fullScreen();\r
86         //! Shows the progress bar.\r
87         /*!\r
88          * Starts showing the progress bar.\r
89          * \param aText The text to be shown in progress bar.\r
90          */\r
91         void showProgressBar( const QString &aText );\r
92         //! Closes the progress bar.\r
93         /*!\r
94          * Closes the progress bar.\r
95          */\r
96         void closeProgressBar();\r
97         \r
98         void insertMeeting( Meeting *aMeeting );\r
99         \r
100         void deleteMeeting( Meeting *aMeeting );\r
101 \r
102 signals:\r
103         //! Request current status of the room.\r
104         /*!\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
107          */\r
108         void roomStatusInfoNeeded( Room *aRoom );\r
109         //! Indicate that some user event has happened.\r
110         /*!\r
111          * Signal is emitted if some user event has happened.\r
112          */\r
113         void observedEventDetected();\r
114         //! Meeting activated.\r
115         /*!\r
116          * Signal is emitted when a meeting is clicked by the user.\r
117          * \param aMeeting actived meeting.\r
118          */\r
119         void meetingActivated( Meeting *aMeeting );\r
120         //! Signals if the shown week has been changed.\r
121         /*!\r
122          * Signal. Emitted if the shown week has been changed.\r
123          * \param aDate The first date of the shown week.\r
124          */\r
125         void shownWeekChanged( QDate aDate );\r
126         //! Signals change of the meeting room.\r
127         /*!\r
128          * Signal is emitted when meeting room is changed.\r
129          * \param aRoom Selected meeting room.\r
130          */\r
131         void currentRoomChanged( Room *aRoom );\r
132         //! Signals when the password dialog buttons are clicked.\r
133         /*!\r
134          * Signal is emitted when the password dialog buttons are clicked.\r
135          * \param aPasswordStatus The status of the password.\r
136          */\r
137         void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );\r
138         //! Signals when the cancel button in the progress bar is clicked.\r
139         /*!\r
140          * Signal is emitted when the cancel button in the progress bar is clicked.\r
141          */\r
142         void progressBarCancelled();\r
143         \r
144 public slots:\r
145         //! Slot for displaying the screensaver (room status view).\r
146         /*!\r
147          * Slot. Displays the screensaver.\r
148          */\r
149         void showRoomStatus();\r
150         //! Slot for updating the time.\r
151         /*!\r
152          * Slot. Forwards the signal of changed time to current view.\r
153          * \param aCurrentDateTime Current date and time.\r
154          */\r
155         void distributeDateTimeInfo( QDateTime aCurrentDateTime );\r
156         \r
157         void updateProgressBar( const QString &aMessage );\r
158         \r
159 private slots:\r
160         //! Displays the settings view\r
161         void showSettingsView();\r
162 \r
163 private:\r
164         //! Name of the application.\r
165         QString iApplicationName;\r
166         //! Defines whether the views should be shown as full screen \r
167         bool iFullScreen;\r
168         //! Pointer to the configuration.\r
169         Configuration *iConfiguration;\r
170         //! Pointer to the weekly view.\r
171         WeeklyViewWidget *iWeeklyView;\r
172         //! Pointer to the screensaver (room status view).\r
173         RoomStatusIndicatorWidget *iRoomStatusView;\r
174         //! Pointer to the meeting info dialog\r
175         MeetingInfoDialog *iMeetingInfo;\r
176         //! Pointer to the settings view\r
177         SettingsView *iSettingsView;\r
178         //! Pointer to the progress bar\r
179         ProgressBar *iProgressBar;\r
180         //! Pointer to the password dialog.\r
181         PasswordDialog *iPasswordDialog;\r
182 \r
183 };\r
184 \r
185 #endif /*WINDOWMANAGER_H_*/\r