summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-21 12:19:02 (UTC)
committer zecke <zecke>2002-09-21 12:19:02 (UTC)
commit279f025b03efdade9c211dd9441eec0c2a91ad94 (patch) (unidiff)
tree39468f487c8fd6aa46ed6664314937daec7b1d99
parent90b5f15ac863d5eb833d2d9e832b43d05c4079a4 (diff)
downloadopie-279f025b03efdade9c211dd9441eec0c2a91ad94.zip
opie-279f025b03efdade9c211dd9441eec0c2a91ad94.tar.gz
opie-279f025b03efdade9c211dd9441eec0c2a91ad94.tar.bz2
Remove the start(void)const and end(void)const stuff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/event.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/library/backend/event.h b/library/backend/event.h
index 4610d85..118523f 100644
--- a/library/backend/event.h
+++ b/library/backend/event.h
@@ -83,55 +83,53 @@ public:
83 bool operator<( const Event &e1) const { return start() < e1.start(); }; 83 bool operator<( const Event &e1) const { return start() < e1.start(); };
84 bool operator<=( const Event &e1 ) const { return start() <= e1.start(); }; 84 bool operator<=( const Event &e1 ) const { return start() <= e1.start(); };
85 bool operator!=( const Event &e1 ) const { return !( *this == e1 ); }; 85 bool operator!=( const Event &e1 ) const { return !( *this == e1 ); };
86 bool operator>( const Event &e1 ) const { return start() > e1.start(); }; 86 bool operator>( const Event &e1 ) const { return start() > e1.start(); };
87 bool operator>=(const Event &e1 ) const { return start() >= e1.start(); }; 87 bool operator>=(const Event &e1 ) const { return start() >= e1.start(); };
88 bool operator==( const Event &e ) const; 88 bool operator==( const Event &e ) const;
89 89
90 void setDescription( const QString &s ); 90 void setDescription( const QString &s );
91 const QString &description() const; 91 const QString &description() const;
92 92
93 void setLocation( const QString &s ); 93 void setLocation( const QString &s );
94 const QString &location() const; 94 const QString &location() const;
95 95
96 void setNotes( const QString &n ); 96 void setNotes( const QString &n );
97 const QString &notes() const; 97 const QString &notes() const;
98 98
99 void setType( Type t ); // Don't use me. 99 void setType( Type t ); // Don't use me.
100 Type type() const; // Don't use me. 100 Type type() const; // Don't use me.
101 101
102 void setAllDay(bool); 102 void setAllDay(bool);
103 bool isAllDay() const; 103 bool isAllDay() const;
104 104
105 void setStart( const QDateTime &d ); 105 void setStart( const QDateTime &d );
106 void setStart( time_t time ); // don't use me. 106 void setStart( time_t time ); // don't use me.
107 QDateTime start( ) const; 107 QDateTime start( bool actual = FALSE) const; // don't use me.
108 QDateTime start( bool actual ) const; // don't use me.
109 time_t startTime() const { return startUTC; } // don't use me. 108 time_t startTime() const { return startUTC; } // don't use me.
110 void setEnd( const QDateTime &e ); 109 void setEnd( const QDateTime &e );
111 void setEnd( time_t time ); // don't use me 110 void setEnd( time_t time ); // don't use me
112 QDateTime end( ) const; 111 QDateTime end( bool actual = FALSE ) const; // don't use me.
113 QDateTime end( bool actual ) const; // don't use me.
114 time_t endTime() const { return endUTC; } // don't use me. 112 time_t endTime() const { return endUTC; } // don't use me.
115 void setTimeZone( const QString & ); 113 void setTimeZone( const QString & );
116 const QString &timeZone() const; 114 const QString &timeZone() const;
117 void setAlarm( int minutes, SoundTypeChoice ); 115 void setAlarm( int minutes, SoundTypeChoice );
118 void clearAlarm(); 116 void clearAlarm();
119 void setAlarm( bool b, int minutes, SoundTypeChoice ); // Don't use me. 117 void setAlarm( bool b, int minutes, SoundTypeChoice ); // Don't use me.
120 bool hasAlarm() const; 118 bool hasAlarm() const;
121 int alarmDelay() const; 119 int alarmDelay() const;
122 int alarmTime() const; // Don't use me. 120 int alarmTime() const; // Don't use me.
123 SoundTypeChoice alarmSound() const; 121 SoundTypeChoice alarmSound() const;
124 122
125 RepeatType repeatType() const; 123 RepeatType repeatType() const;
126 int frequency() const; 124 int frequency() const;
127 int weekOffset() const; 125 int weekOffset() const;
128 QDate repeatTill() const; 126 QDate repeatTill() const;
129 bool repeatForever() const; 127 bool repeatForever() const;
130 bool repeatOnWeekDay(int day) const; 128 bool repeatOnWeekDay(int day) const;
131 129
132 void setRepeatType(RepeatType); 130 void setRepeatType(RepeatType);
133 void setFrequency(int); 131 void setFrequency(int);
134 void setRepeatTill(const QDate &); 132 void setRepeatTill(const QDate &);
135 void setRepeatForever(bool); 133 void setRepeatForever(bool);
136 void setRepeatOnWeekDay(int day, bool enable); 134 void setRepeatOnWeekDay(int day, bool enable);
137 135
@@ -320,56 +318,45 @@ inline void Event::setRepeatTill(const QDate &d)
320 pattern.hasEndDate = TRUE; 318 pattern.hasEndDate = TRUE;
321} 319}
322 320
323inline void Event::setRepeatForever(bool b) 321inline void Event::setRepeatForever(bool b)
324{ 322{
325 if (!b == pattern.hasEndDate) 323 if (!b == pattern.hasEndDate)
326 return; 324 return;
327 if (!b && !pattern.hasEndDate) 325 if (!b && !pattern.hasEndDate)
328 pattern.setEndDate(end().date()); 326 pattern.setEndDate(end().date());
329 pattern.hasEndDate = !b; 327 pattern.hasEndDate = !b;
330} 328}
331 329
332inline bool Event::repeatOnWeekDay(int day) const 330inline bool Event::repeatOnWeekDay(int day) const
333{ 331{
334 if (pattern.type != Weekly) 332 if (pattern.type != Weekly)
335 return FALSE; 333 return FALSE;
336 return ( (1 << (day - 1)) & pattern.days ) != 0; 334 return ( (1 << (day - 1)) & pattern.days ) != 0;
337} 335}
338 336
339inline void Event::setRepeatOnWeekDay(int day, bool enable) 337inline void Event::setRepeatOnWeekDay(int day, bool enable)
340{ 338{
341 if ( repeatOnWeekDay( day ) != enable ) 339 if ( repeatOnWeekDay( day ) != enable )
342 pattern.days ^= 1 << (day - 1); 340 pattern.days ^= 1 << (day - 1);
343} 341}
344
345inline QDateTime Event::start( ) const
346{
347 return start(FALSE);
348}
349
350inline QDateTime Event::end( ) const
351{
352 return end(FALSE);
353}
354
355#ifdef PALMTOPCENTER 342#ifdef PALMTOPCENTER
356class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> 343class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent>
357{ 344{
358public: 345public:
359 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const 346 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
360 { 347 {
361 return a.size() - b.size(); 348 return a.size() - b.size();
362 } 349 }
363}; 350};
364 351
365class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent> 352class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent>
366{ 353{
367public: 354public:
368 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const 355 int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
369 { 356 {
370 return a.start().secsTo( b.start() ); 357 return a.start().secsTo( b.start() );
371 } 358 }
372}; 359};
373#endif 360#endif
374 361
375#endif 362#endif