diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/kolab/kcal/event.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/kolab/kcal/event.cpp')
-rw-r--r-- | kresources/kolab/kcal/event.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kresources/kolab/kcal/event.cpp b/kresources/kolab/kcal/event.cpp index a53ca4162..0f25eb73d 100644 --- a/kresources/kolab/kcal/event.cpp +++ b/kresources/kolab/kcal/event.cpp @@ -39,8 +39,8 @@ using namespace Kolab; -KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::ResourceKolab* res, - const QString& subResource, Q_UINT32 sernum ) +KCal::Event* Event::xmlToEvent( const TQString& xml, const TQString& tz, KCal::ResourceKolab* res, + const TQString& subResource, Q_UINT32 sernum ) { Event event( res, subResource, sernum, tz ); event.load( xml ); @@ -49,14 +49,14 @@ KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::Res return kcalEvent; } -QString Event::eventToXML( KCal::Event* kcalEvent, const QString& tz ) +TQString Event::eventToXML( KCal::Event* kcalEvent, const TQString& tz ) { - Event event( 0, QString::null, 0, tz, kcalEvent ); + Event event( 0, TQString::null, 0, tz, kcalEvent ); return event.saveXML(); } -Event::Event( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum, - const QString& tz, KCal::Event* event ) +Event::Event( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum, + const TQString& tz, KCal::Event* event ) : Incidence( res, subResource, sernum, tz ), mShowTimeAs( KCal::Event::Opaque ), mHasEndDate( false ) { @@ -78,7 +78,7 @@ KCal::Event::Transparency Event::transparency() const return mShowTimeAs; } -void Event::setEndDate( const QDateTime& date ) +void Event::setEndDate( const TQDateTime& date ) { mEndDate = date; mHasEndDate = true; @@ -87,7 +87,7 @@ void Event::setEndDate( const QDateTime& date ) mFloatingStatus = HasTime; } -void Event::setEndDate( const QDate& date ) +void Event::setEndDate( const TQDate& date ) { mEndDate = date; mHasEndDate = true; @@ -96,7 +96,7 @@ void Event::setEndDate( const QDate& date ) mFloatingStatus = AllDay; } -void Event::setEndDate( const QString& endDate ) +void Event::setEndDate( const TQString& endDate ) { if ( endDate.length() > 10 ) // This is a date + time @@ -106,15 +106,15 @@ void Event::setEndDate( const QString& endDate ) setEndDate( stringToDate( endDate ) ); } -QDateTime Event::endDate() const +TQDateTime Event::endDate() const { return mEndDate; } -bool Event::loadAttribute( QDomElement& element ) +bool Event::loadAttribute( TQDomElement& element ) { // This method doesn't handle the color-label tag yet - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if ( tagName == "show-time-as" ) { // TODO: Support tentative and outofoffice @@ -131,7 +131,7 @@ bool Event::loadAttribute( QDomElement& element ) return true; } -bool Event::saveAttributes( QDomElement& element ) const +bool Event::saveAttributes( TQDomElement& element ) const { // Save the base class elements Incidence::saveAttributes( element ); @@ -152,9 +152,9 @@ bool Event::saveAttributes( QDomElement& element ) const } -bool Event::loadXML( const QDomDocument& document ) +bool Event::loadXML( const TQDomDocument& document ) { - QDomElement top = document.documentElement(); + TQDomElement top = document.documentElement(); if ( top.tagName() != "event" ) { qWarning( "XML error: Top tag was %s instead of the expected event", @@ -162,11 +162,11 @@ bool Event::loadXML( const QDomDocument& document ) return false; } - for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { + for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) { if ( n.isComment() ) continue; if ( n.isElement() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); loadAttribute( e ); } else kdDebug() << "Node is not a comment or an element???" << endl; @@ -176,10 +176,10 @@ bool Event::loadXML( const QDomDocument& document ) return true; } -QString Event::saveXML() const +TQString Event::saveXML() const { - QDomDocument document = domTree(); - QDomElement element = document.createElement( "event" ); + TQDomDocument document = domTree(); + TQDomElement element = document.createElement( "event" ); element.setAttribute( "version", "1.0" ); saveAttributes( element ); document.appendChild( element ); |