1.0.6 candidate
[qtmeetings] / src / UserInterface / Components / ScheduleWidget.h
index 690d77b..27c7f11 100644 (file)
@@ -39,6 +39,12 @@ public:
 
        //! Destructor.
        ~ScheduleTableWidget();
+       
+       //! Populates meeting list.
+       /*!
+        * Populates meeting list.
+        */
+       void populateMeetingList();
 
 protected:
        //! Handles drawing of main table area.
@@ -71,12 +77,6 @@ protected:
 
        
 private:
-       //! Populates meeting list.
-       /*!
-        * Populates meeting list.
-        */
-       void populateMeetingList();
-
        //! Finds overlapping meetings.
        /*!
         * Finds overlapping meetings.
@@ -146,13 +146,6 @@ public:
         */
        int     currentWeek();
 
-       //! Gets number of shown week.
-       /*!
-        * Gets number of shown week.
-        * \return The week which is currently shown.
-        */
-       int     shownWeek();
-
        //! Gets the first day of shown week.
        /*!
         * Gets the first day of shown week.
@@ -160,21 +153,6 @@ public:
         */
        QDate beginningOfShownWeek();
 
-       //! Gets current meeting.
-       /*!
-        * Gets current meeting.
-        * \return current meeting, 0 if none.
-        */
-       Meeting* currentMeeting();
-
-       //! Gets meeting at a specified date and time.
-       /*!
-        * Gets meeting at a specified date and time.
-        * \param aAt Time when the meeting is.
-        * \return meeting At the given time, 0 if none.
-        */
-       Meeting* meeting( QDateTime aAt );
-
 signals:
 
        //! Signal. Emitted if a meeting is activated.
@@ -183,14 +161,6 @@ signals:
         * \param aMeeting Actived meeting.
         */
        void meetingActivated( Meeting *aMeeting );
-
-       //! Signal. Emitted when the current meeting changes to another.
-       /*!
-        * Signal. Emitted when the current meeting changes to another.
-        * \param aNewMeeting New meeting.
-        */
-       void currentMeetingChanged( Meeting *aNewMeeting );
-
        //! Signal. Emitted if the shown week has been changed.
        /*!
         * Signal. Emitted if the shown week has been changed.
@@ -200,26 +170,19 @@ signals:
 
 public slots:
 
-       //! Slot. Clears all meetings.
-       /*!
-        * Slot. Clears all meetings.
-        */
-       void clear();
-
-       //! Slot. Clears meetings based on a range.
-       /*!
-        * Slot. Clears meetings based on a range.
-        * \param aFrom Date and time from which the meetings are cleared.
-        * \param aUntil Date and time until which the meetings are cleared.
-        */
-       void clear( QDateTime aFrom, QDateTime aUntil );
-
        //! Slot. Refreshes display.
        /*!
         * Slot. Refreshes display.
+        * \param aMeetings The meeting list.
         */
        void refresh();
-
+       //! Refreshes the meeting list.
+       /*!
+        * Refreshes the meeting list.
+        * \param aMeetings The list of meetings.
+        */
+       void refreshMeetings( const QList<Meeting*> &aMeetings );
+       
        //! Slot. Sets current date and time.
        /*!
         * Slot. Sets current date and time.
@@ -227,27 +190,6 @@ public slots:
         */
        void setCurrentDateTime( QDateTime aCurrentDateTime );
 
-       //! Slot. Inserts a meeting to the schedule.
-       /*!
-        * Slot. Inserts a meeting to the schedule.
-        * \param aMeeting Meeting to be inserted.
-        */
-       void insertMeeting( Meeting *aMeeting );
-
-       //! Slot. Removes a meeting from the schedule.
-       /*!
-        * Slot. Removes a meeting from the schedule.
-        * \param aMeeting Meeting to be removed.
-        */
-       void removeMeeting( Meeting *aMeeting );
-
-       //! Slot. Updates a meeting in the schedule. (TODO)
-       /*!
-        * Slot updates a meeting in the schedule.
-        * \param aMeeting Meeting was updated.
-        */
-       void updateMeeting( Meeting */*aMeeting*/ ) {};
-
        //! Slot. Shows previous week.
        /*!
         * Slot. Shows previous week.
@@ -297,9 +239,6 @@ private:
        //! Current date and time.
        QDateTime iCurrentDateTime;
 
-       //! Meetings.
-       QList<Meeting*> iMeetings; /*! Not owned */
-
        //! Currently shown week.
        QDate iShownDate;
 
@@ -314,13 +253,25 @@ private:
 
        //! When refresh() was called previously
        QTime iLastRefresh;
+       
+       //! Meetings.
+       QList<Meeting*> iMeetings; /*! Not owned */
 
        //! Color for a free cell.
        static const QColor sFreeBackground;
 
        //! Color for a busy cell.
+       static const QColor sBusyBackgroundStart;
+
+       //! Color for a busy cell.
        static const QColor sBusyBackground;
 
+       //! Color for a busy cell.
+       static const QColor sCurrentBackgroundStart;
+
+       //! Color for a busy cell.
+       static const QColor sCurrentBackground;
+
        //! Color for headers.
        static const QColor sHeaderBackground;