22 #include <tdeglobal.h> 23 #include <tdelocale.h> 31 mHasEndDate( false ), mTransparency( Opaque )
38 mHasEndDate = e.mHasEndDate;
39 mTransparency = e.mTransparency;
50 return new Event(*
this);
55 Incidence::operator=( e );
57 mHasEndDate = e.mHasEndDate;
58 mTransparency = e.mTransparency;
62 bool Event::operator==(
const Event& e2 )
const 66 dtEnd() == e2.
dtEnd() &&
75 if (mReadOnly)
return;
80 setHasDuration(
false);
87 if (hasEndDate())
return mDtEnd;
88 if (hasDuration())
return dtStart().addSecs(duration());
97 if ( doesFloat() )
return dtEnd().date();
98 else return dtEnd().addSecs(-1).date();
103 return TDEGlobal::locale()->formatTime(dtEnd().time());
108 return TDEGlobal::locale()->formatDate(dtEnd().date(),shortfmt);
113 return TDEGlobal::locale()->formatDateTime(dtEnd());
129 TQDateTime start( dtStart() );
130 TQDateTime
end( dtEnd() );
131 if ( ! doesFloat() ) {
132 end = end.addSecs(-1);
134 bool multi = ( start.date() != end.date() && start <=
end );
140 if (mReadOnly)
return;
141 mTransparency = transparency;
147 return mTransparency;
152 setHasEndDate(
false);
153 Incidence::setDuration(seconds);
Transparency transparency() const
Return the event's time transparency level.
void setDtEnd(const TQDateTime &dtEnd)
Set end date and time.
TQDateTime end(const TQDateTime &start) const
Computes a duration end time by adding the number of seconds or days in the duration to the specified...
This class provides an Event in the sense of RFC2445.
TQString KDE_DEPRECATED dtEndTimeStr() const
Return end time as string formatted according to the users locale settings.
bool hasEndDate() const
Return whether the event has an end date/time.
void setDuration(int seconds)
Set duration of this event.
TQDate dateEnd() const
Returns the day when the event ends.
TQString KDE_DEPRECATED dtEndStr() const
Return end date and time as string formatted according to the users locale settings.
void setTransparency(Transparency transparency)
Set the event's time transparency level.
This class provides the base class common to all calendar components.
Transparency
Transparency of event.
Namespace KCal is for global classes, objects and/or functions in libkcal.
void setHasEndDate(bool)
Set whether the event has an end date/time.
Event * clone()
Return copy of this Event.
TQString KDE_DEPRECATED dtEndDateStr(bool shortfmt=true) const
Return end date as string formatted according to the users locale settings.
virtual TQDateTime dtEnd() const
Return end date and time.
bool isMultiDay() const
Return true if the event spans multiple days, otherwise return false.