summaryrefslogtreecommitdiff
authortille <tille>2003-05-15 13:20:20 (UTC)
committer tille <tille>2003-05-15 13:20:20 (UTC)
commit7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94 (patch) (side-by-side diff)
treee7503907e2ef21dae71141abb0954a5f3c43fe34
parent5b0993378eb33f4bf576b91286ece24d49806ccf (diff)
downloadopie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.zip
opie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.tar.gz
opie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.tar.bz2
how did this compile last time...? ;)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/oevent.cpp10
-rw-r--r--libopie2/opiepim/oevent.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp
index 2b138c0..83b191f 100644
--- a/libopie/pim/oevent.cpp
+++ b/libopie/pim/oevent.cpp
@@ -168,113 +168,113 @@ QDateTime OEvent::startDateTimeInZone()const {
OTimeZone zone(data->timezone );
return zone.toDateTime( data->start, OTimeZone::current() );
}
void OEvent::setStartDateTime( const QDateTime& dt ) {
changeOrModify();
data->start = dt;
}
QDateTime OEvent::endDateTime()const {
/*
* if all Day event the end time needs
* to be on the same day as the start
*/
if ( data->isAllDay )
return QDateTime( data->start.date(), QTime(23, 59, 59 ) );
return data->end;
}
QDateTime OEvent::endDateTimeInZone()const {
/* if no timezone, or all day event or if the current and this timeZone match... */
if (data->timezone.isEmpty() || data->isAllDay || data->timezone == OTimeZone::current().timeZone() ) return endDateTime();
OTimeZone zone(data->timezone );
return zone.toDateTime( data->end, OTimeZone::current() );
}
void OEvent::setEndDateTime( const QDateTime& dt ) {
changeOrModify();
data->end = dt;
}
bool OEvent::isMultipleDay()const {
return data->end.date().day() - data->start.date().day();
}
bool OEvent::isAllDay()const {
return data->isAllDay;
}
void OEvent::setAllDay( bool allDay ) {
changeOrModify();
data->isAllDay = allDay;
if (allDay ) data->timezone = "UTC";
}
void OEvent::setTimeZone( const QString& tz ) {
changeOrModify();
data->timezone = tz;
}
QString OEvent::timeZone()const {
if (data->isAllDay ) return QString::fromLatin1("UTC");
return data->timezone;
}
bool OEvent::match( const QRegExp& re )const {
if ( re.match( data->description ) != -1 ){
- setLastHitField( DatebookDescription );
+ setLastHitField( Qtopia::DatebookDescription );
return true;
}
if ( re.match( data->note ) != -1 ){
- setLastHitField( Note );
+ setLastHitField( Qtopia::Note );
return true;
}
if ( re.match( data->location ) != -1 ){
- setLastHitField( Location );
+ setLastHitField( Qtopia::Location );
return true;
}
if ( re.match( data->start.toString() ) != -1 ){
- setLastHitField( StartDateTime );
+ setLastHitField( Qtopia::StartDateTime );
return true;
}
if ( re.match( data->end.toString() ) != -1 ){
- setLastHitField( EndDateTime );
+ setLastHitField( Qtopia::EndDateTime );
return true;
}
return false;
}
QString OEvent::toRichText()const {
QString text;
if ( !description().isEmpty() ) {
text += "<b>" + QObject::tr( "Description:") + "</b><br>";
text += Qtopia::escapeString(description() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( startDateTime().isValid() ) {
text += "<b>" + QObject::tr( "Start:") + "</b> ";
text += Qtopia::escapeString(startDateTime().toString() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( endDateTime().isValid() ) {
text += "<b>" + QObject::tr( "End:") + "</b> ";
text += Qtopia::escapeString(endDateTime().toString() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( !note().isEmpty() ) {
text += "<b>" + QObject::tr( "Note:") + "</b><br>";
text += note();
// text += Qtopia::escapeString(note() ).
// replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
return text;
}
QString OEvent::toShortText()const {
QString text;
text += QString::number( startDateTime().date().day() );
text += ".";
text += QString::number( startDateTime().date().month() );
text += ".";
text += QString::number( startDateTime().date().year() );
text += " ";
text += QString::number( startDateTime().time().hour() );
text += ":";
text += QString::number( startDateTime().time().minute() );
text += " - ";
text += description();
return text;
}
QString OEvent::type()const {
return QString::fromLatin1("OEvent");
}
QString OEvent::recordField( int /*id */ )const {
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp
index 2b138c0..83b191f 100644
--- a/libopie2/opiepim/oevent.cpp
+++ b/libopie2/opiepim/oevent.cpp
@@ -168,113 +168,113 @@ QDateTime OEvent::startDateTimeInZone()const {
OTimeZone zone(data->timezone );
return zone.toDateTime( data->start, OTimeZone::current() );
}
void OEvent::setStartDateTime( const QDateTime& dt ) {
changeOrModify();
data->start = dt;
}
QDateTime OEvent::endDateTime()const {
/*
* if all Day event the end time needs
* to be on the same day as the start
*/
if ( data->isAllDay )
return QDateTime( data->start.date(), QTime(23, 59, 59 ) );
return data->end;
}
QDateTime OEvent::endDateTimeInZone()const {
/* if no timezone, or all day event or if the current and this timeZone match... */
if (data->timezone.isEmpty() || data->isAllDay || data->timezone == OTimeZone::current().timeZone() ) return endDateTime();
OTimeZone zone(data->timezone );
return zone.toDateTime( data->end, OTimeZone::current() );
}
void OEvent::setEndDateTime( const QDateTime& dt ) {
changeOrModify();
data->end = dt;
}
bool OEvent::isMultipleDay()const {
return data->end.date().day() - data->start.date().day();
}
bool OEvent::isAllDay()const {
return data->isAllDay;
}
void OEvent::setAllDay( bool allDay ) {
changeOrModify();
data->isAllDay = allDay;
if (allDay ) data->timezone = "UTC";
}
void OEvent::setTimeZone( const QString& tz ) {
changeOrModify();
data->timezone = tz;
}
QString OEvent::timeZone()const {
if (data->isAllDay ) return QString::fromLatin1("UTC");
return data->timezone;
}
bool OEvent::match( const QRegExp& re )const {
if ( re.match( data->description ) != -1 ){
- setLastHitField( DatebookDescription );
+ setLastHitField( Qtopia::DatebookDescription );
return true;
}
if ( re.match( data->note ) != -1 ){
- setLastHitField( Note );
+ setLastHitField( Qtopia::Note );
return true;
}
if ( re.match( data->location ) != -1 ){
- setLastHitField( Location );
+ setLastHitField( Qtopia::Location );
return true;
}
if ( re.match( data->start.toString() ) != -1 ){
- setLastHitField( StartDateTime );
+ setLastHitField( Qtopia::StartDateTime );
return true;
}
if ( re.match( data->end.toString() ) != -1 ){
- setLastHitField( EndDateTime );
+ setLastHitField( Qtopia::EndDateTime );
return true;
}
return false;
}
QString OEvent::toRichText()const {
QString text;
if ( !description().isEmpty() ) {
text += "<b>" + QObject::tr( "Description:") + "</b><br>";
text += Qtopia::escapeString(description() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( startDateTime().isValid() ) {
text += "<b>" + QObject::tr( "Start:") + "</b> ";
text += Qtopia::escapeString(startDateTime().toString() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( endDateTime().isValid() ) {
text += "<b>" + QObject::tr( "End:") + "</b> ";
text += Qtopia::escapeString(endDateTime().toString() ).
replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
if ( !note().isEmpty() ) {
text += "<b>" + QObject::tr( "Note:") + "</b><br>";
text += note();
// text += Qtopia::escapeString(note() ).
// replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
}
return text;
}
QString OEvent::toShortText()const {
QString text;
text += QString::number( startDateTime().date().day() );
text += ".";
text += QString::number( startDateTime().date().month() );
text += ".";
text += QString::number( startDateTime().date().year() );
text += " ";
text += QString::number( startDateTime().time().hour() );
text += ":";
text += QString::number( startDateTime().time().minute() );
text += " - ";
text += description();
return text;
}
QString OEvent::type()const {
return QString::fromLatin1("OEvent");
}
QString OEvent::recordField( int /*id */ )const {