summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/orecur.cpp
authorzecke <zecke>2002-11-02 12:36:34 (UTC)
committer zecke <zecke>2002-11-02 12:36:34 (UTC)
commitffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a (patch) (side-by-side diff)
tree601ac645a3768c1fe89fce01243f54a24f08dc15 /libopie2/opiepim/core/orecur.cpp
parent74f49994a9c19bdfdbfdfb57a5cf5e1a1f966b53 (diff)
downloadopie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.zip
opie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.tar.gz
opie-ffd0a764e4ac7f9bf29edf3b9b4d341e153ecf4a.tar.bz2
Fix a vCard problem in OContact
cell phones do not set the UId property... add some more states to otodo
Diffstat (limited to 'libopie2/opiepim/core/orecur.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/orecur.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp
index 6c81f8f..257d4fd 100644
--- a/libopie2/opiepim/core/orecur.cpp
+++ b/libopie2/opiepim/core/orecur.cpp
@@ -12,24 +12,25 @@ struct ORecur::Data : public QShared {
pos = 0;
create = -1;
hasEnd = FALSE;
end = 0;
}
char days; // Q_UINT8 for 8 seven days;)
ORecur::RepeatType type;
int freq;
int pos;
bool hasEnd : 1;
time_t end;
time_t create;
+ int rep;
};
ORecur::ORecur() {
data = new Data;
}
ORecur::ORecur( const ORecur& rec)
: data( rec.data )
{
data->ref();
}
ORecur::~ORecur() {
@@ -69,24 +70,27 @@ char ORecur::days() const{
bool ORecur::hasEndDate()const {
return data->hasEnd;
}
QDate ORecur::endDate()const {
return TimeConversion::fromUTC( data->end ).date();
}
time_t ORecur::endDateUTC()const {
return data->end;
}
time_t ORecur::createTime()const {
return data->create;
}
+int ORecur::repetition()const {
+ return data->rep;
+}
void ORecur::setType( const RepeatType& z) {
checkOrModify();
data->type = z;
}
void ORecur::setFrequency( int freq ) {
checkOrModify();
data->freq = freq;
}
void ORecur::setPosition( int pos ) {
checkOrModify();
data->pos = pos;
}
@@ -101,27 +105,32 @@ void ORecur::setEndDate( const QDate& dt) {
void ORecur::setEndDateUTC( time_t t) {
checkOrModify();
data->end = t;
}
void ORecur::setCreateTime( time_t t) {
checkOrModify();
data->create = t;
}
void ORecur::setHasEndDate( bool b) {
checkOrModify();
data->hasEnd = b;
}
+void ORecur::setRepitition( int rep ) {
+ checkOrModify();
+ data->rep = rep;
+}
void ORecur::checkOrModify() {
if ( data->count != 1 ) {
data->deref();
Data* d2 = new Data;
d2->days = data->days;
d2->type = data->type;
d2->freq = data->freq;
d2->pos = data->pos;
d2->hasEnd = data->hasEnd;
d2->end = data->end;
d2->create = data->create;
+ d2->rep = data->rep;
data = d2;
}
}