summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/orecur.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/orecur.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/orecur.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h
index 60508f5..7808897 100644
--- a/libopie2/opiepim/core/orecur.h
+++ b/libopie2/opiepim/core/orecur.h
@@ -18,48 +18,50 @@
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
-#ifndef OPIE_RECUR_H
-#define OPIE_RECUR_H
-
-#include <sys/types.h>
+#ifndef ORECUR_H
+#define ORECUR_H
+/* QT */
#include <qdatetime.h>
#include <qvaluelist.h>
#include <qmap.h>
+/* STD */
+#include <sys/types.h>
namespace Opie {
/**
* Class to handle Recurrencies..
*/
class ORecur {
-public:
+
+ public:
typedef QValueList<QDate> ExceptionList;
enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay,
MonthlyDate, Yearly };
enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08,
FRI = 0x10, SAT = 0x20, SUN = 0x40 };
enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate,
- EndDate, Created, Exceptions };
+ EndDate, Created, Exceptions };
ORecur();
ORecur( const QMap<int, QString>& map );
ORecur( const ORecur& );
~ORecur();
ORecur &operator=( const ORecur& );
bool operator==(const ORecur& )const;
bool doesRecur()const;
/* if it recurrs on that day */
bool doesRecur( const QDate& );
@@ -105,25 +107,26 @@ public:
void setStart( const QDate& dt );
void setCreatedDateTime( const QDateTime& );
void setHasEndDate( bool b );
void setRepitition(int );
void setService( const QString& ser );
QMap<int, QString> toMap() const;
void fromMap( const QMap<int, QString>& map );
/* almost internal */
QString toString()const;
-private:
+
+ private:
bool p_nextOccurrence( const QDate& from, QDate& next );
void deref();
inline void checkOrModify();
/* Converts rType to String */
QString rTypeString() const;
/* Returns a map to convert Stringname for RType to RepeatType */
QMap<QString, RepeatType> rTypeValueConvertMap() const;
class Data;
Data* data;
class ORecurPrivate;