summaryrefslogtreecommitdiffabout
path: root/libkcal/freebusy.cpp
Unidiff
Diffstat (limited to 'libkcal/freebusy.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/freebusy.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp
index ba15d6d..e4e9ec9 100644
--- a/libkcal/freebusy.cpp
+++ b/libkcal/freebusy.cpp
@@ -18,12 +18,15 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <kdebug.h> 21#include <kdebug.h>
22 22
23#include "freebusy.h" 23#include "freebusy.h"
24//Added by qt3to4:
25#include <Q3ValueList>
26#include <Q3PtrList>
24 27
25using namespace KCal; 28using namespace KCal;
26 29
27FreeBusy::FreeBusy() 30FreeBusy::FreeBusy()
28{ 31{
29} 32}
@@ -40,13 +43,13 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime
40 mCalendar = calendar; 43 mCalendar = calendar;
41 44
42 setDtStart(start); 45 setDtStart(start);
43 setDtEnd(end); 46 setDtEnd(end);
44 47
45 //Gets all the events in the calendar 48 //Gets all the events in the calendar
46 QPtrList<Event> eventList = mCalendar->events(); 49 Q3PtrList<Event> eventList = mCalendar->events();
47 Event *event; 50 Event *event;
48 51
49 int extraDays, i, x, duration; 52 int extraDays, i, x, duration;
50 duration = start.daysTo(end); 53 duration = start.daysTo(end);
51 QDate day; 54 QDate day;
52 QDateTime tmpStart; 55 QDateTime tmpStart;
@@ -110,13 +113,13 @@ bool FreeBusy::setDtEnd( const QDateTime &end )
110 113
111QDateTime FreeBusy::dtEnd() const 114QDateTime FreeBusy::dtEnd() const
112{ 115{
113 return mDtEnd; 116 return mDtEnd;
114} 117}
115 118
116QValueList<Period> FreeBusy::busyPeriods() const 119Q3ValueList<Period> FreeBusy::busyPeriods() const
117{ 120{
118 return mBusyPeriods; 121 return mBusyPeriods;
119} 122}
120 123
121bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &eventEnd ) { 124bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &eventEnd ) {
122 QDateTime tmpStart; 125 QDateTime tmpStart;
@@ -143,20 +146,20 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even
143 Period p(tmpStart, tmpEnd); 146 Period p(tmpStart, tmpEnd);
144 mBusyPeriods.append( p ); 147 mBusyPeriods.append( p );
145 148
146 return true; 149 return true;
147} 150}
148 151
149FreeBusy::FreeBusy(QValueList<Period> busyPeriods) 152FreeBusy::FreeBusy(Q3ValueList<Period> busyPeriods)
150{ 153{
151 mBusyPeriods = busyPeriods; 154 mBusyPeriods = busyPeriods;
152} 155}
153 156
154void FreeBusy::sortList() 157void FreeBusy::sortList()
155{ 158{
156 typedef QValueList<Period> PeriodList; 159 typedef Q3ValueList<Period> PeriodList;
157 160
158 PeriodList::Iterator tmpPeriod, earlyPeriod; 161 PeriodList::Iterator tmpPeriod, earlyPeriod;
159 PeriodList sortedList; 162 PeriodList sortedList;
160 QDateTime earlyTime; 163 QDateTime earlyTime;
161 164
162 while( mBusyPeriods.count() > 0 ) { 165 while( mBusyPeriods.count() > 0 ) {