summaryrefslogtreecommitdiff
path: root/libopie/pim/oevent.h
Side-by-side diff
Diffstat (limited to 'libopie/pim/oevent.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/oevent.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/libopie/pim/oevent.h b/libopie/pim/oevent.h
index 30f442e..9218c97 100644
--- a/libopie/pim/oevent.h
+++ b/libopie/pim/oevent.h
@@ -20,63 +20,72 @@ struct OCalendarHelper {
static int ocurrence( const QDate& );
// returns the dayOfWeek for the *first* day it finds (ignores
// any further days!). Returns 1 (Monday) if there isn't any day found
static int dayOfWeek( char day );
/** returns the diff of month */
static int monthDiff( const QDate& first, const QDate& second );
};
class OPimNotifyManager;
class ORecur;
/**
* This is the container for all Events. It encapsules all
* available information for a single Event
* @short container for events.
*/
class OEvent : public OPimRecord {
public:
typedef QValueList<OEvent> ValueList;
/**
* RecordFields contain possible attributes
+ * used in the Results of toMap()..
*/
enum RecordFields {
- Uid = Qtopia::UID_ID,
- Category = Qtopia::CATEGORY_ID,
- Description,
- Location,
- Alarm,
- Reminder,
- Recurrence,
- Note,
- Created,
- StartDate,
- EndDate,
- AllDay,
- TimeZone
+ FUid = Qtopia::UID_ID,
+ FCategories = Qtopia::CATEGORY_ID,
+ FDescription = 0,
+ FLocation,
+ FType,
+ FAlarm,
+ FSound,
+ FRType,
+ FRWeekdays,
+ FRPosition,
+ FRFreq,
+ FRHasEndDate,
+ FREndDate,
+ FRCreated,
+ FRExceptions,
+ FStart,
+ FEnd,
+ FNote,
+ FTimeZone,
+ FRecParent,
+ FRecChildren,
};
/**
* Start with an Empty OEvent. UID == 0 means that it is empty
*/
OEvent(int uid = 0);
/**
* copy c'tor
*/
OEvent( const OEvent& );
~OEvent();
OEvent &operator=( const OEvent& );
QString description()const;
void setDescription( const QString& description );
QString location()const;
void setLocation( const QString& loc );
bool hasNotifiers()const;
OPimNotifyManager &notifiers()const;
ORecur recurrence()const;
@@ -111,48 +120,49 @@ public:
/* pin this event to a timezone! FIXME */
void setTimeZone( const QString& timeZone );
QString timeZone()const;
virtual bool match( const QRegExp& )const;
/** For exception to recurrence here is a list of children... */
QArray<int> children()const;
void setChildren( const QArray<int>& );
void addChild( int uid );
void removeChild( int uid );
/** return the parent OEvent */
int parent()const;
void setParent( int uid );
/* needed reimp */
QString toRichText()const;
QString toShortText()const;
QString type()const;
QMap<int, QString> toMap()const;
+ void fromMap( const QMap<int, QString>& map );
QString recordField(int )const;
static int rtti();
bool loadFromStream( QDataStream& );
bool saveToStream( QDataStream& )const;
/* bool operator==( const OEvent& );
bool operator!=( const OEvent& );
bool operator<( const OEvent& );
bool operator<=( const OEvent& );
bool operator>( const OEvent& );
bool operator>=(const OEvent& );
*/
private:
inline void changeOrModify();
void deref();
struct Data;
Data* data;
class Private;
Private* priv;
};