1 #ifndef WEEKLYVIEWWIDGET_H_
2 #define WEEKLYVIEWWIDGET_H_
9 class MeetingRoomCombo;
10 class TimeDisplayWidget;
15 class BorderedBarWidget;
17 //! Userinterface class. Shows a weekly calendar for the selected room, provides date and time information.
19 * UserInterface class. Shows the current date and time and selected week's calendar for
20 * selected meeting room. User can select meeting room, browse weeks back and forth, and can navigate
21 * back to the current week.
23 class WeeklyViewWidget : public ViewBase
30 * Constructor to initialize an WeeklyViewWidget instance.
31 * \param aCurrentDateTime
32 * \param aConfiguration Pointer to the configuration object. Not owned.
33 * \param aParent Pointer to the parent widget.
35 WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *aConfiguration, QWidget *aParent = 0 );
37 virtual ~WeeklyViewWidget();
41 * Returns the currently selected meeting room.
42 * \return Selected meeting room.
46 //! First day of week currently displayd
48 * Returns the first day of week currently displayd.
49 * \return First day of week.
51 QDate beginnigOfShownWeek();
52 //! Sends the refresh command to schedule widget.
54 * Sends the refresh command to schedule widget.
55 * \param aMeetings The list of meetings.
57 void refreshMeetings( const QList<Meeting*> &aMeetings );
59 void showCurrentWeek();
61 void setDefaultRoom();
64 //! Signals change of the meeting room.
66 * Signal is emited when meeting room is changed.
67 * \param aNewRoom Selected meeting room.
69 void currentRoomChanged( Room *aNewRoom );
70 //! Meeting activated.
72 * Signal is emitted when a meeting is clicked by the user.
73 * \param aMeeting actived meeting.
75 void meetingActivated( Meeting *aMeeting );
76 //! Signals creation of new meeting.
78 * Signal is emited when new meeting is created.
79 * \param aMeeting Meeting that has been created.
80 * \param aUsername User who created the meeting.
81 * \param aPassword Password of the "aUsername"
83 void meetingToCreate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
84 //! Signals deletion of a meeting.
86 * Signal is emited when meeting is deleted.
87 * \param aMeeting Deleted meeting.
88 * \param aUsername User who deleted the meeting.
89 * \param aPassword Password of the "aUsername"
91 void meetingToDelete( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
92 //! Signals modifications of a meeting.
94 * Signal is emited when meeting is modified.
95 * \param aMeeting Modified meeting.
96 * \param aUsername User who modified the meeting.
97 * \param aPassword Password of the "aUsername"
99 void meetingToUpdate( Meeting *aMeeting, const QString &aUsername, const QString &aPassword );
103 * Signal is emited when settings button is clicked.
105 void settingsButtonClicked();
107 //! Signal. Emitted if the shown week has been changed.
109 * Signal. Emitted if the shown week has been changed.
110 * \param aDate The first date of the shown week.
112 void shownWeekChanged( QDate aDate );
115 //! Sets the date and time
117 * Sets the current date and time
118 * \param aCurrentDateTime Date and time to be displayd.
120 void setCurrentDateTime( QDateTime aCurrentDateTime );
123 * Handle possible resize changes after the view is resized
124 * to match the window managers client area.
126 void viewResized(const QSize &newSize, const QSize &oldSize) { }
128 void connectionEstablished();
130 void connectionLost();
133 //! Displays the selectable meeting rooms.
134 MeetingRoomCombo *iRoomsCombo;
135 //! Displays the time.
136 BorderedBarWidget *iTimeDisplay;
137 //! Displays the status.
138 BorderedBarWidget *iStatusBar;
139 //! Displays the calendar.
140 ScheduleWidget *iSchedule;
141 //! Displays the date.
142 QLabel *iCurrentDayLabel;
143 //! Displays the week number.
144 QLabel *iCurrentWeekLabel;
145 //! Button used to display previous week's calendar.
146 QPushButton *iPreviousWeekButton;
147 //! Button used to display current week's calendar.
148 QPushButton *iCurrentWeekButton;
149 //! Button used to display next week's calendar.
150 QPushButton *iNextWeekButton;
151 //! Settings button. TODO : Correct widget is needed!!
152 QPushButton *iSettingsButton;
153 //! About button. TODO : Correct widget is needed!!
154 QPushButton *iAboutButton;
156 * Pointer to configuration object.
157 * Contains configurable data and IS NOT OWNED by the widget.
159 Configuration *iConfiguration;
162 #endif /*WEEKLYVIEWWIDGET_H_*/