21 #ifndef KCAL_DURATION_H
22 #define KCAL_DURATION_H
24 #include <tqdatetime.h>
26 #include "libkcal_export.h"
60 Duration( const TQDateTime &start, const TQDateTime &end );
73 Duration( const TQDateTime &start, const TQDateTime &end, Type type );
81 Duration( int duration, Type type = Seconds );
100 operator bool() const;
111 bool operator<( const Duration &other ) const;
118 { return !other.operator<( *this ); }
126 { return other.operator<( *this ); }
133 { return !operator<( other ); }
142 bool operator==( const Duration &other ) const;
152 { return !operator==( other ); }
171 { return Duration( * this ) += other; }
196 { return Duration( * this ) += other; }
211 { return Duration( * this ) *= value; }
226 { return Duration( * this ) /= value; }
235 TQDateTime end( const TQDateTime &start ) const;
246 bool isDaily() const;
251 int asSeconds() const;
268 int seconds() const { return mDaily ? mDuration * 86400 : mDuration; }
|