summaryrefslogtreecommitdiffabout
path: root/libkcal/event.cpp
Unidiff
Diffstat (limited to 'libkcal/event.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/event.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index ad66639..0766fd9 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -152,48 +152,49 @@ bool Event::isMultiDay() const
152{ 152{
153 bool multi = !(dtStart().date() == dtEnd().date()); 153 bool multi = !(dtStart().date() == dtEnd().date());
154 return multi; 154 return multi;
155} 155}
156 156
157void Event::setTransparency(Event::Transparency transparency) 157void Event::setTransparency(Event::Transparency transparency)
158{ 158{
159 if (mReadOnly) return; 159 if (mReadOnly) return;
160 mTransparency = transparency; 160 mTransparency = transparency;
161 updated(); 161 updated();
162} 162}
163 163
164Event::Transparency Event::transparency() const 164Event::Transparency Event::transparency() const
165{ 165{
166 return mTransparency; 166 return mTransparency;
167} 167}
168 168
169void Event::setDuration(int seconds) 169void Event::setDuration(int seconds)
170{ 170{
171 setHasEndDate(false); 171 setHasEndDate(false);
172 Incidence::setDuration(seconds); 172 Incidence::setDuration(seconds);
173} 173}
174bool Event::matchTime(QDateTime*startDT, QDateTime* endDT) 174bool Event::matchTime(QDateTime*startDT, QDateTime* endDT)
175{ 175{
176 if ( cancelled() ) return false;
176 if ( ! doesRecur() ) { 177 if ( ! doesRecur() ) {
177 if ( doesFloat() ) { 178 if ( doesFloat() ) {
178 if ( mDtEnd.addDays( 1 ) < *startDT) 179 if ( mDtEnd.addDays( 1 ) < *startDT)
179 return false; 180 return false;
180 if ( endDT && mDtStart > * endDT) 181 if ( endDT && mDtStart > * endDT)
181 return false; 182 return false;
182 } else { 183 } else {
183 if ( mDtEnd < *startDT ) 184 if ( mDtEnd < *startDT )
184 return false; 185 return false;
185 if ( endDT && mDtStart > * endDT) 186 if ( endDT && mDtStart > * endDT)
186 return false; 187 return false;
187 } 188 }
188 } else { 189 } else {
189 if ( endDT && mDtStart > * endDT) 190 if ( endDT && mDtStart > * endDT)
190 return false; 191 return false;
191 } 192 }
192 return true; 193 return true;
193} 194}
194bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT ) 195bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT )
195{ 196{
196 if ( testEvent == this ) 197 if ( testEvent == this )
197 return false; 198 return false;
198 if ( ! doesRecur() && !testEvent->doesRecur() ) { 199 if ( ! doesRecur() && !testEvent->doesRecur() ) {
199 QDateTime te; 200 QDateTime te;