summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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:
bool operator<( const Event &e1) const { return start() < e1.start(); };
bool operator<=( const Event &e1 ) const { return start() <= e1.start(); };
bool operator!=( const Event &e1 ) const { return !( *this == e1 ); };
bool operator>( const Event &e1 ) const { return start() > e1.start(); };
bool operator>=(const Event &e1 ) const { return start() >= e1.start(); };
bool operator==( const Event &e ) const;
void setDescription( const QString &s );
const QString &description() const;
void setLocation( const QString &s );
const QString &location() const;
void setNotes( const QString &n );
const QString &notes() const;
void setType( Type t ); // Don't use me.
Type type() const; // Don't use me.
void setAllDay(bool);
bool isAllDay() const;
void setStart( const QDateTime &d );
void setStart( time_t time ); // don't use me.
- QDateTime start( ) const;
- QDateTime start( bool actual ) const; // don't use me.
+ QDateTime start( bool actual = FALSE) const; // don't use me.
time_t startTime() const { return startUTC; } // don't use me.
void setEnd( const QDateTime &e );
void setEnd( time_t time ); // don't use me
- QDateTime end( ) const;
- QDateTime end( bool actual ) const; // don't use me.
+ QDateTime end( bool actual = FALSE ) const; // don't use me.
time_t endTime() const { return endUTC; } // don't use me.
void setTimeZone( const QString & );
const QString &timeZone() const;
void setAlarm( int minutes, SoundTypeChoice );
void clearAlarm();
void setAlarm( bool b, int minutes, SoundTypeChoice ); // Don't use me.
bool hasAlarm() const;
int alarmDelay() const;
int alarmTime() const; // Don't use me.
SoundTypeChoice alarmSound() const;
RepeatType repeatType() const;
int frequency() const;
int weekOffset() const;
QDate repeatTill() const;
bool repeatForever() const;
bool repeatOnWeekDay(int day) const;
void setRepeatType(RepeatType);
void setFrequency(int);
void setRepeatTill(const QDate &);
void setRepeatForever(bool);
void setRepeatOnWeekDay(int day, bool enable);
@@ -320,56 +318,45 @@ inline void Event::setRepeatTill(const QDate &d)
pattern.hasEndDate = TRUE;
}
inline void Event::setRepeatForever(bool b)
{
if (!b == pattern.hasEndDate)
return;
if (!b && !pattern.hasEndDate)
pattern.setEndDate(end().date());
pattern.hasEndDate = !b;
}
inline bool Event::repeatOnWeekDay(int day) const
{
if (pattern.type != Weekly)
return FALSE;
return ( (1 << (day - 1)) & pattern.days ) != 0;
}
inline void Event::setRepeatOnWeekDay(int day, bool enable)
{
if ( repeatOnWeekDay( day ) != enable )
pattern.days ^= 1 << (day - 1);
}
-
-inline QDateTime Event::start( ) const
-{
- return start(FALSE);
-}
-
-inline QDateTime Event::end( ) const
-{
- return end(FALSE);
-}
-
#ifdef PALMTOPCENTER
class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent>
{
public:
int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
{
return a.size() - b.size();
}
};
class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent>
{
public:
int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const
{
return a.start().secsTo( b.start() );
}
};
#endif
#endif