summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimnotify.h
authormickeyl <mickeyl>2004-02-23 13:15:42 (UTC)
committer mickeyl <mickeyl>2004-02-23 13:15:42 (UTC)
commitf9f0c26d9ac94586ffc36efa1b582ece3dbc43cf (patch) (side-by-side diff)
tree4044006e676c78370fdeccf960ea4214f13eabd2 /libopie2/opiepim/core/opimnotify.h
parent2d37d653310da0a9d6e2e2e6c9f5bf092e54cbbb (diff)
downloadopie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.zip
opie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.tar.gz
opie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.tar.bz2
cosmetics
Diffstat (limited to 'libopie2/opiepim/core/opimnotify.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimnotify.h67
1 files changed, 36 insertions, 31 deletions
diff --git a/libopie2/opiepim/core/opimnotify.h b/libopie2/opiepim/core/opimnotify.h
index fed3970..d0e40ca 100644
--- a/libopie2/opiepim/core/opimnotify.h
+++ b/libopie2/opiepim/core/opimnotify.h
@@ -26,14 +26,16 @@
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#ifndef OPIE_PIM_NOTIFY_H
-#define OPIE_PIM_NOTIFY_H
+#ifndef OPIMNOTIFY_H
+#define OPIMNOTIFY_H
+
+/* QT */
#include <qdatetime.h>
#include <qvaluelist.h>
-
-namespace Opie {
+namespace Opie
+{
/**
* This is the base class of Notifiers. Possible
* notifiers would be Alarms, Reminders
@@ -47,44 +49,46 @@ namespace Opie {
* given on the Due/Start Date? -zecke
* discuss: do we need a uid for the notify? -zecke
*/
-class OPimNotify {
-public:
+class OPimNotify
+{
+
+ public:
typedef QValueList<OPimNotify> ValueList;
OPimNotify( const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 );
OPimNotify( const OPimNotify& );
virtual ~OPimNotify();
- OPimNotify &operator=(const OPimNotify& );
+ OPimNotify &operator=( const OPimNotify& );
bool operator==( const OPimNotify& );
- virtual QString type()const = 0;
+ virtual QString type() const = 0;
/** start date */
- QDateTime dateTime()const;
- QString service()const;
+ QDateTime dateTime() const;
+ QString service() const;
/**
* RETURN the parent uid
*/
- int parent()const;
+ int parent() const;
/**
* in Seconds
*/
- int duration()const;
+ int duration() const;
/**
* Start Time + Duration
*/
- QDateTime endTime()const;
+ QDateTime endTime() const;
void setDateTime( const QDateTime& );
void setDuration( int dur );
- void setParent(int uid );
+ void setParent( int uid );
void setService( const QString& );
-private:
+ private:
inline void copyIntern();
void deref();
struct Data;
@@ -100,25 +104,26 @@ private:
* at a given time to inform about
* an Event
*/
-class OPimAlarm : public OPimNotify {
-public:
- enum Sound{Loud=1, Silent=0, Custom=2 };
+class OPimAlarm : public OPimNotify
+{
+ public:
+ enum Sound{Loud = 1, Silent = 0, Custom = 2 };
OPimAlarm( int sound = Silent, const QDateTime& start = QDateTime(), int duration = 0, int parent = 0 );
OPimAlarm( const OPimAlarm& );
~OPimAlarm();
OPimAlarm &operator=( const OPimAlarm& );
bool operator==( const OPimAlarm& );
- QString type()const;
+ QString type() const;
- int sound()const;
- QString file()const;
+ int sound() const;
+ QString file() const;
void setSound( int );
/* only when sound is custom... */
void setFile( const QString& sound );
-private:
+ private:
void deref();
void copyIntern();
struct Data;
@@ -135,9 +140,9 @@ private:
* Note that the returned dateTime() may be not valid.
* In these cases one must resolve the uid and get the OEvent
*/
-class OPimReminder : public OPimNotify {
-public:
-
+class OPimReminder : public OPimNotify
+{
+ public:
/**
* c'tor of a reminder
* @param uid The uid of the Record inside the Datebook
@@ -145,12 +150,12 @@ public:
* @param duration The duration of the event ( -1 for all day )
* @param parent The 'parent' record of this reminder
*/
- OPimReminder( int uid = 0, const QDateTime& start = QDateTime(),
- int duration = 0, int parent = 0 );
+ OPimReminder( int uid = 0, const QDateTime& start = QDateTime(),
+ int duration = 0, int parent = 0 );
OPimReminder( const OPimReminder& );
- OPimReminder &operator=(const OPimReminder& );
+ OPimReminder &operator=( const OPimReminder& );
- QString type()const;
+ QString type() const;
bool operator==( const OPimReminder& );
@@ -158,10 +163,10 @@ public:
* the uid of the alarm
* inside the 'datebook' application
*/
- int recordUid()const;
+ int recordUid() const;
void setRecordUid( int uid );
-private:
+ private:
void deref();
void copyIntern();