summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.cpp
Unidiff
Diffstat (limited to 'libkcal/incidencebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 1a19f3e..022dead 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -146,103 +146,107 @@ bool IncidenceBase::isTagged() const
146 return mIsTagged; 146 return mIsTagged;
147} 147}
148void IncidenceBase::setTagged( bool b) 148void IncidenceBase::setTagged( bool b)
149{ 149{
150 mIsTagged = b; 150 mIsTagged = b;
151} 151}
152void IncidenceBase::setCalID( int id ) 152void IncidenceBase::setCalID( int id )
153{ 153{
154 if ( mCalID > 0 ) { 154 if ( mCalID > 0 ) {
155 blockLastModified = true; 155 blockLastModified = true;
156 updated(); 156 updated();
157 blockLastModified = false; 157 blockLastModified = false;
158 } 158 }
159 mCalID = id; 159 mCalID = id;
160} 160}
161int IncidenceBase::calID() const 161int IncidenceBase::calID() const
162{ 162{
163 return mCalID; 163 return mCalID;
164} 164}
165void IncidenceBase::setCalEnabled( bool b ) 165void IncidenceBase::setCalEnabled( bool b )
166{ 166{
167 mCalEnabled = b; 167 mCalEnabled = b;
168} 168}
169bool IncidenceBase::calEnabled() const 169bool IncidenceBase::calEnabled() const
170{ 170{
171 return mCalEnabled; 171 return mCalEnabled;
172} 172}
173 173
174void IncidenceBase::setAlarmEnabled( bool b ) 174void IncidenceBase::setAlarmEnabled( bool b )
175{ 175{
176 mAlarmEnabled = b; 176 mAlarmEnabled = b;
177} 177}
178bool IncidenceBase::alarmEnabled() const 178bool IncidenceBase::alarmEnabled() const
179{ 179{
180 return mAlarmEnabled; 180 return mAlarmEnabled;
181} 181}
182 182
183 183
184void IncidenceBase::setUid(const QString &uid) 184void IncidenceBase::setUid(const QString &uid)
185{ 185{
186 mUid = uid; 186 mUid = uid;
187 updated(); 187 updated();
188} 188}
189 189
190QString IncidenceBase::uid() const 190QString IncidenceBase::uid() const
191{ 191{
192 return mUid; 192 return mUid;
193} 193}
194void IncidenceBase::setLastModifiedSubInvalid()
195{
194 196
197}
195void IncidenceBase::setLastModified(const QDateTime &lm) 198void IncidenceBase::setLastModified(const QDateTime &lm)
196{ 199{
197 if ( blockLastModified ) return; 200 if ( blockLastModified ) return;
198 // DON'T! updated() because we call this from 201 // DON'T! updated() because we call this from
199 // Calendar::updateEvent(). 202 // Calendar::updateEvent().
200 mLastModified = getEvenTime(lm); 203 mLastModified = getEvenTime(lm);
204 setLastModifiedSubInvalid();
201 //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1()); 205 //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1());
202} 206}
203 207
204QDateTime IncidenceBase::lastModified() const 208QDateTime IncidenceBase::lastModified() const
205{ 209{
206 return mLastModified; 210 return mLastModified;
207} 211}
208 212
209void IncidenceBase::setOrganizer(const QString &o) 213void IncidenceBase::setOrganizer(const QString &o)
210{ 214{
211 // we don't check for readonly here, because it is 215 // we don't check for readonly here, because it is
212 // possible that by setting the organizer we are changing 216 // possible that by setting the organizer we are changing
213 // the event's readonly status... 217 // the event's readonly status...
214 mOrganizer = o; 218 mOrganizer = o;
215 if (mOrganizer.left(7).upper() == "MAILTO:") 219 if (mOrganizer.left(7).upper() == "MAILTO:")
216 mOrganizer = mOrganizer.remove(0,7); 220 mOrganizer = mOrganizer.remove(0,7);
217 221
218 updated(); 222 updated();
219} 223}
220 224
221QString IncidenceBase::organizer() const 225QString IncidenceBase::organizer() const
222{ 226{
223 return mOrganizer; 227 return mOrganizer;
224} 228}
225 229
226void IncidenceBase::setReadOnly( bool readOnly ) 230void IncidenceBase::setReadOnly( bool readOnly )
227{ 231{
228 mReadOnly = readOnly; 232 mReadOnly = readOnly;
229} 233}
230 234
231void IncidenceBase::setDtStart(const QDateTime &dtStart) 235void IncidenceBase::setDtStart(const QDateTime &dtStart)
232{ 236{
233// if (mReadOnly) return; 237// if (mReadOnly) return;
234 mDtStart = getEvenTime(dtStart); 238 mDtStart = getEvenTime(dtStart);
235 updated(); 239 updated();
236} 240}
237 241
238 242
239QDateTime IncidenceBase::dtStart() const 243QDateTime IncidenceBase::dtStart() const
240{ 244{
241 return mDtStart; 245 return mDtStart;
242} 246}
243 247
244QString IncidenceBase::dtStartTimeStr() const 248QString IncidenceBase::dtStartTimeStr() const
245{ 249{
246 return KGlobal::locale()->formatTime(dtStart().time()); 250 return KGlobal::locale()->formatTime(dtStart().time());
247} 251}
248 252