Diffstat (limited to 'libopie2/opiepim/core/orecur.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/orecur.cpp | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp index f46f22e..033f264 100644 --- a/libopie2/opiepim/core/orecur.cpp +++ b/libopie2/opiepim/core/orecur.cpp @@ -1,33 +1,63 @@ +/* + This file is part of the Opie Project + Copyright (C) The Main Author <main-author@whereever.org> + =. Copyright (C) The Opie Team <opie-devel@handhelds.org> + .=l. + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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. +*/ + #include <time.h> #include <qshared.h> #include <qtopia/timeconversion.h> -#include "otimezone.h" -#include "orecur.h" +#include <opie2/otimezone.h> +#include <opie2/orecur.h> +namespace Opie { struct ORecur::Data : public QShared { Data() : QShared() { type = ORecur::NoRepeat; freq = -1; days = 0; pos = 0; create = QDateTime::currentDateTime(); hasEnd = FALSE; end = QDate::currentDate(); } char days; // Q_UINT8 for 8 seven days;) ORecur::RepeatType type; int freq; int pos; bool hasEnd : 1; QDate end; QDateTime create; int rep; QString app; ExceptionList list; QDate start; }; @@ -570,24 +600,26 @@ void ORecur::fromMap( const QMap<int, QString>& map ) QMap<QString, RepeatType> repTypeMap = rTypeValueConvertMap(); data -> type = repTypeMap[ map [ORecur::RType] ]; data -> days = (char) map[ ORecur::RWeekdays ].toInt(); data -> pos = map[ ORecur::RPosition ].toInt(); data -> freq = map[ ORecur::RFreq ].toInt(); data -> hasEnd= map[ ORecur::RHasEndDate ].toInt() ? true : false; OTimeZone utc = OTimeZone::utc(); if ( data -> hasEnd ){ data -> end = utc.fromUTCDateTime( (time_t) map[ ORecur::EndDate ].toLong() ).date(); } data -> create = utc.fromUTCDateTime( (time_t) map[ ORecur::Created ].toLong() ).date(); #if 0 // FIXME: Exceptions currently not supported... // Convert the list of exceptions from QString into ExceptionList data -> list.clear(); QString exceptStr = map[ ORecur::Exceptions ]; QStringList exceptList = QStringList::split( " ", exceptStr ); ... #endif } + +}
\ No newline at end of file |