Re-implemented the showing of meetings (Task id 1166). Corrected the errortable order...
[qtmeetings] / src / UserInterface / Views / WeeklyViewWidget.h
1 #ifndef WEEKLYVIEWWIDGET_H_\r
2 #define WEEKLYVIEWWIDGET_H_\r
3 \r
4 #include "ObservedWidget.h"\r
5 #include <QDateTime>\r
6 \r
7 class QLabel;\r
8 class QPushButton;\r
9 class MeetingRoomCombo;\r
10 class TimeDisplayWidget;\r
11 class ScheduleWidget;\r
12 class Configuration;\r
13 class Meeting;\r
14 class Room;\r
15 \r
16 //! Userinterface class. Shows a weekly calendar for the selected room, provides date and time information.\r
17 /*!\r
18  * UserInterface class. Shows the current date and time and selected week's calendar for\r
19  * selected meeting room. User can select meeting room, browse weeks back and forth, and can navigate\r
20  * back to the current week.\r
21  */\r
22 class WeeklyViewWidget : public ObservedWidget\r
23 {\r
24         Q_OBJECT\r
25 \r
26 public:\r
27         //! Constructor.\r
28         /*!\r
29          * Constructor to initialize an WeeklyViewWidget instance.\r
30          * \param aCurrentDateTime\r
31          * \param aConfiguration Pointer to the configuration object. Not owned.\r
32          * \param aParent Pointer to the parent widget.\r
33          */\r
34         WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *aConfiguration, QWidget *aParent = 0 );\r
35         //! Destructor.\r
36         virtual ~WeeklyViewWidget();\r
37 \r
38         //! Current room\r
39         /*!\r
40          * Returns the currently selected meeting room.\r
41          * \return Selected meeting room.\r
42          */\r
43         Room* currentRoom();\r
44 \r
45         //! First day of week currently displayd\r
46         /*!\r
47          * Returns the first day of week currently displayd.\r
48          * \return First day of week.\r
49          */\r
50         QDate beginnigOfShownWeek();\r
51         //! Sends the refresh command to schedule widget.\r
52         /*!\r
53          * Sends the refresh command to schedule widget.\r
54          * \param aMeetings The list of meetings.\r
55          */\r
56         void refreshMeetings( const QList<Meeting*> &aMeetings );\r
57         \r
58 \r
59 signals:\r
60         //! Signals change of the meeting room.\r
61         /*!\r
62          * Signal is emited when meeting room is changed.\r
63          * \param aNewRoom Selected meeting room.\r
64          */\r
65         void currentRoomChanged( Room *aNewRoom );\r
66         //! Meeting activated.\r
67         /*!\r
68          * Signal is emitted when a meeting is clicked by the user.\r
69          * \param aMeeting actived meeting.\r
70          */\r
71         void meetingActivated( Meeting *aMeeting );\r
72         //! Signals creation of new meeting.\r
73         /*!\r
74          * Signal is emited when new meeting is created.\r
75          * \param aMeeting Meeting that has been created.\r
76          * \param aUsername User who created the meeting.\r
77          * \param aPassword Password of the "aUsername"\r
78          */\r
79         void meetingToCreate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );\r
80         //! Signals deletion of a meeting.\r
81         /*!\r
82          * Signal is emited when meeting is deleted.\r
83          * \param aMeeting Deleted meeting.\r
84          * \param aUsername User who deleted the meeting.\r
85          * \param aPassword Password of the "aUsername"\r
86          */\r
87         void meetingToDelete( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );\r
88         //! Signals modifications of a meeting.\r
89         /*!\r
90          * Signal is emited when meeting is modified.\r
91          * \param aMeeting Modified meeting.\r
92          * \param aUsername User who modified the meeting.\r
93          * \param aPassword Password of the "aUsername"\r
94          */\r
95         void meetingToUpdate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );\r
96 \r
97         //! Signals\r
98         /*!\r
99          * Signal is emited when settings button is clicked.\r
100          */\r
101         void showSettingsView();\r
102         \r
103         //! Signal. Emitted if the shown week has been changed.\r
104         /*!\r
105          * Signal. Emitted if the shown week has been changed.
106          * \param aDate The first date of the shown week.
107          */
108         void shownWeekChanged( QDate aDate );
109 \r
110 public slots:\r
111         //! Sets the date and time\r
112         /*!\r
113          * Sets the current date and time\r
114          * \param aCurrentDateTime Date and time to be displayd.\r
115          */\r
116         void setCurrentDateTime( QDateTime aCurrentDateTime );\r
117 \r
118 private:\r
119         //! Displays the selectable meeting rooms.\r
120         MeetingRoomCombo *iRoomsCombo;\r
121         //! Displays the time.\r
122         TimeDisplayWidget *iTimeDisplay;\r
123         //! Displays the calendar.\r
124         ScheduleWidget *iSchedule;\r
125         //! Displays the date.\r
126         QLabel *iCurrentDayLabel;\r
127         //! Displays the week number.\r
128         QLabel *iCurrentWeekLabel;\r
129         //! Button used to display previous week's calendar.\r
130         QPushButton *iPreviousWeekButton;\r
131         //! Button used to display current week's calendar.\r
132         QPushButton *iCurrentWeekButton;\r
133         //! Button used to display next week's calendar.\r
134         QPushButton *iNextWeekButton;\r
135         //! Settings button. TODO : Correct widget is needed!!\r
136         QPushButton *iSettingsButton;\r
137         //! About button. TODO : Correct widget is needed!!\r
138         QPushButton *iAboutButton;\r
139         /* !\r
140          * Pointer to configuration object.\r
141          * Contains configurable data and IS NOT OWNED by the widget.\r
142          */\r
143         Configuration *iConfiguration;\r
144 };\r
145 \r
146 #endif /*WEEKLYVIEWWIDGET_H_*/\r