-rw-r--r-- | korganizer/timespanview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp index 67a3811..df8ff88 100644 --- a/korganizer/timespanview.cpp +++ b/korganizer/timespanview.cpp | |||
@@ -84,49 +84,49 @@ void TimeSpanView::addItem( KCal::Event *event ) | |||
84 | // kdDebug() << "TimeSpanView::addItem(): start: " << startDt.toString() | 84 | // kdDebug() << "TimeSpanView::addItem(): start: " << startDt.toString() |
85 | // << " end: " << endDt.toString() << endl; | 85 | // << " end: " << endDt.toString() << endl; |
86 | 86 | ||
87 | int startSecs = mStartDate.secsTo( startDt ); | 87 | int startSecs = mStartDate.secsTo( startDt ); |
88 | int durationSecs = startDt.secsTo( endDt ); | 88 | int durationSecs = startDt.secsTo( endDt ); |
89 | 89 | ||
90 | // kdDebug() << "--- startSecs: " << startSecs << " dur: " << durationSecs << endl; | 90 | // kdDebug() << "--- startSecs: " << startSecs << " dur: " << durationSecs << endl; |
91 | 91 | ||
92 | int startX = mStartDate.secsTo( startDt ) / mSecsPerPixel; | 92 | int startX = mStartDate.secsTo( startDt ) / mSecsPerPixel; |
93 | int endX = startX + startDt.secsTo( endDt ) / mSecsPerPixel; | 93 | int endX = startX + startDt.secsTo( endDt ) / mSecsPerPixel; |
94 | 94 | ||
95 | // kdDebug() << "TimeSpanView::addItem(): s: " << startX << " e: " << endX << endl; | 95 | // kdDebug() << "TimeSpanView::addItem(): s: " << startX << " e: " << endX << endl; |
96 | 96 | ||
97 | mLineView->addLine( startX, endX ); | 97 | mLineView->addLine( startX, endX ); |
98 | } | 98 | } |
99 | 99 | ||
100 | void TimeSpanView::clear() | 100 | void TimeSpanView::clear() |
101 | { | 101 | { |
102 | mList->clear(); | 102 | mList->clear(); |
103 | mLineView->clear(); | 103 | mLineView->clear(); |
104 | } | 104 | } |
105 | 105 | ||
106 | void TimeSpanView::updateView() | 106 | void TimeSpanView::updateView() |
107 | { | 107 | { |
108 | #if QT_VERSION >= 300 | 108 | #if QT_VERSION >= 0x030000 |
109 | mLineView->updateContents(); | 109 | mLineView->updateContents(); |
110 | mTimeLine->updateContents(); | 110 | mTimeLine->updateContents(); |
111 | #else | 111 | #else |
112 | #endif | 112 | #endif |
113 | } | 113 | } |
114 | 114 | ||
115 | void TimeSpanView::setDateRange( const QDateTime &start, const QDateTime &end ) | 115 | void TimeSpanView::setDateRange( const QDateTime &start, const QDateTime &end ) |
116 | { | 116 | { |
117 | mStartDate = start; | 117 | mStartDate = start; |
118 | mEndDate = end; | 118 | mEndDate = end; |
119 | 119 | ||
120 | mTimeLine->setDateRange( start, end ); | 120 | mTimeLine->setDateRange( start, end ); |
121 | 121 | ||
122 | mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mLineView->pixelWidth(); | 122 | mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mLineView->pixelWidth(); |
123 | } | 123 | } |
124 | 124 | ||
125 | QDateTime TimeSpanView::startDateTime() | 125 | QDateTime TimeSpanView::startDateTime() |
126 | { | 126 | { |
127 | return mStartDate; | 127 | return mStartDate; |
128 | } | 128 | } |
129 | 129 | ||
130 | QDateTime TimeSpanView::endDateTime() | 130 | QDateTime TimeSpanView::endDateTime() |
131 | { | 131 | { |
132 | return mEndDate; | 132 | return mEndDate; |