summaryrefslogtreecommitdiffabout
path: root/libkcal/event.h
Unidiff
Diffstat (limited to 'libkcal/event.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/event.h b/libkcal/event.h
index 2da9770..6a58618 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -31,64 +31,65 @@ namespace KCal {
31 This class provides an Event in the sense of RFC2445. 31 This class provides an Event in the sense of RFC2445.
32*/ 32*/
33class Event : public Incidence 33class Event : public Incidence
34{ 34{
35 public: 35 public:
36 enum Transparency { Opaque, Transparent }; 36 enum Transparency { Opaque, Transparent };
37 typedef ListBase<Event> List; 37 typedef ListBase<Event> List;
38 Event(); 38 Event();
39 Event(const Event &); 39 Event(const Event &);
40 ~Event(); 40 ~Event();
41 bool matchTime(QDateTime*startDT, QDateTime* endDT); 41 bool matchTime(QDateTime*startDT, QDateTime* endDT);
42 42
43 QCString type() const { return "Event"; } 43 QCString type() const { return "Event"; }
44 IncTypeID typeID() const { return eventID; } 44 IncTypeID typeID() const { return eventID; }
45 45
46 Incidence *clone(); 46 Incidence *clone();
47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const; 47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const;
48 48
49 /** for setting an event's ending date/time with a QDateTime. */ 49 /** for setting an event's ending date/time with a QDateTime. */
50 void setDtEnd(const QDateTime &dtEnd); 50 void setDtEnd(const QDateTime &dtEnd);
51 /** Return the event's ending date/time as a QDateTime. */ 51 /** Return the event's ending date/time as a QDateTime. */
52 virtual QDateTime dtEnd() const; 52 virtual QDateTime dtEnd() const;
53 /** returns an event's end time as a string formatted according to the 53 /** returns an event's end time as a string formatted according to the
54 users locale settings */ 54 users locale settings */
55 QString dtEndTimeStr() const; 55 QString dtEndTimeStr() const;
56 /** returns an event's end date as a string formatted according to the 56 /** returns an event's end date as a string formatted according to the
57 users locale settings */ 57 users locale settings */
58 QString dtEndDateStr(bool shortfmt=true) const; 58 QString dtEndDateStr(bool shortfmt=true) const;
59 /** returns an event's end date and time as a string formatted according 59 /** returns an event's end date and time as a string formatted according
60 to the users locale settings */ 60 to the users locale settings */
61 QString dtEndStr(bool shortfmt=true) const; 61 QString dtEndStr(bool shortfmt=true) const;
62 void setHasEndDate(bool); 62 void setHasEndDate(bool);
63 /** Return whether the event has an end date/time. */ 63 /** Return whether the event has an end date/time. */
64 bool hasEndDate() const; 64 bool hasEndDate() const;
65 65
66 /** Return true if the event spans multiple days, otherwise return false. */ 66 /** Return true if the event spans multiple days, otherwise return false. */
67 bool isMultiDay() const; 67 bool isMultiDay() const;
68 68
69 /** set the event's time transparency level. */ 69 /** set the event's time transparency level. */
70 void setTransparency(Transparency transparency); 70 void setTransparency(Transparency transparency);
71 /** get the event's time transparency level. */ 71 /** get the event's time transparency level. */
72 Transparency transparency() const; 72 Transparency transparency() const;
73 73
74 void setDuration(int seconds); 74 void setDuration(int seconds);
75 75
76 bool contains ( Event*); 76 bool contains ( Event*);
77 77
78 bool isOverlapping ( Event*, QDateTime*, QDateTime* ); 78 bool isOverlapping ( Event*, QDateTime*, QDateTime* );
79 QString durationText();
79 80
80 private: 81 private:
81 bool accept(Visitor &v) { return v.visit(this); } 82 bool accept(Visitor &v) { return v.visit(this); }
82 83
83 QDateTime mDtEnd; 84 QDateTime mDtEnd;
84 bool mHasEndDate; 85 bool mHasEndDate;
85 Transparency mTransparency; 86 Transparency mTransparency;
86}; 87};
87 88
88bool operator==( const Event&, const Event& ); 89bool operator==( const Event&, const Event& );
89 90
90 91
91} 92}
92 93
93 94
94#endif 95#endif