1 #ifndef WEEKLYVIEWWIDGET_H_
\r
2 #define WEEKLYVIEWWIDGET_H_
\r
4 #include "ObservedWidget.h"
\r
9 class MeetingRoomCombo;
\r
10 class TimeDisplayWidget;
\r
11 class ScheduleWidget;
\r
12 class Configuration;
\r
16 //! Userinterface class. Shows a weekly calendar for the selected room, provides date and time information.
\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
22 class WeeklyViewWidget : public ObservedWidget
\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
34 WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *aConfiguration, QWidget *aParent = 0 );
\r
36 virtual ~WeeklyViewWidget();
\r
40 * Returns the currently selected meeting room.
\r
41 * \return Selected meeting room.
\r
43 Room* currentRoom();
\r
45 //! First day of week currently displayd
\r
47 * Returns the first day of week currently displayd.
\r
48 * \return First day of week.
\r
50 QDate beginnigOfShownWeek();
\r
51 //! Sends the refresh command to schedule widget.
\r
53 * Sends the refresh command to schedule widget.
\r
54 * \param aMeetings The list of meetings.
\r
56 void refreshMeetings( const QList<Meeting*> &aMeetings );
\r
60 //! Signals change of the meeting room.
\r
62 * Signal is emited when meeting room is changed.
\r
63 * \param aNewRoom Selected meeting room.
\r
65 void currentRoomChanged( Room *aNewRoom );
\r
66 //! Meeting activated.
\r
68 * Signal is emitted when a meeting is clicked by the user.
\r
69 * \param aMeeting actived meeting.
\r
71 void meetingActivated( Meeting *aMeeting );
\r
72 //! Signals creation of new meeting.
\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
79 void meetingToCreate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
\r
80 //! Signals deletion of a meeting.
\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
87 void meetingToDelete( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
\r
88 //! Signals modifications of a meeting.
\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
95 void meetingToUpdate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
\r
99 * Signal is emited when settings button is clicked.
\r
101 void showSettingsView();
\r
103 //! Signal. Emitted if the shown week has been changed.
\r
105 * Signal. Emitted if the shown week has been changed.
106 * \param aDate The first date of the shown week.
108 void shownWeekChanged( QDate aDate );
111 //! Sets the date and time
\r
113 * Sets the current date and time
\r
114 * \param aCurrentDateTime Date and time to be displayd.
\r
116 void setCurrentDateTime( QDateTime aCurrentDateTime );
\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
140 * Pointer to configuration object.
\r
141 * Contains configurable data and IS NOT OWNED by the widget.
\r
143 Configuration *iConfiguration;
\r
146 #endif /*WEEKLYVIEWWIDGET_H_*/
\r