Multiple simultaneous request support to Communication
[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 \r
18 //! UserInterface class. Behaves as a proxy between the user interface and application's business logic.\r
19 /*!\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
24  */\r
25 class WindowManager : public QObject\r
26 {\r
27         Q_OBJECT\r
28 \r
29 public:\r
30         //! Constructor.\r
31         /*!\r
32          * Constructor of WindowManager.\r
33          */\r
34         WindowManager();\r
35         //! Destructor.\r
36         virtual ~WindowManager();\r
37 \r
38 signals:\r
39         //! Request current status of the room.\r
40         /*!\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
43          */\r
44         void roomStatusInfoNeeded( Room *aRoom );\r
45 \r
46 private slots:\r
47         //! Closes the application.\r
48         void closeApplication();\r
49         //! Updates the time.\r
50         /*!\r
51          * Forwards the signal of changed time to current view.\r
52          * \param aCurrentDateTime Current date and time.\r
53          */\r
54         void distributeDateTimeInfo( QDateTime aCurrentDateTime );\r
55         //! Updates the rooms status.\r
56         /*!\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
61          */\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
69         /*!\r
70          * Displays the meeting info dialog\r
71          * \param aMeeting Meeting to be displayd\r
72          */\r
73         void showMeetingInfo( Meeting *aMeeting );\r
74         /*!\r
75          * Displays an error message\r
76          * \param aErrorMessage Message to be displayd\r
77          */\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
82         /*!\r
83          * Slot. Fetches meetings for room aRoom for currently visible week\r
84          * \param aRoom\r
85          */\r
86         void fetchMeetings( Room *aRoom );\r
87         //! Slot for fetching meetings.\r
88         /*!\r
89          * Slot. Fetches meetings for current room from date aFrom to week ahead.\r
90          * \param aFrom Date where to begin fetching\r
91          */\r
92         void fetchMeetings( QDate aFrom );\r
93         //! Slot for popping up the confirmation dialog to change the current operation mode\r
94         /*!\r
95          * Slot. Asks PopUpMessageBox to pop up a confirmation dialog.\r
96          * \param aMode The operation mode to be changed to\r
97          */\r
98         void changeModeOrdered( DeviceManager::OperationMode aMode );\r
99         //! Slot for receiving the status of the entered password\r
100         /*!\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
104          */\r
105         void passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus );\r
106 \r
107 private:\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
117         Engine *iEngine;\r
118         //! Timer to launch the screensaver widget\r
119         QTimer *iIdleTimeCounter;\r
120         //! Pointer to the settings view\r
121         SettingsView *iSettingsView;\r
122 \r
123 };\r
124 \r
125 #endif /*WINDOWMANAGER_H_*/\r