summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/kcal/task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/kolab/kcal/task.cpp')
-rw-r--r--kresources/kolab/kcal/task.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kresources/kolab/kcal/task.cpp b/kresources/kolab/kcal/task.cpp
index b66c9827b..7bbdba978 100644
--- a/kresources/kolab/kcal/task.cpp
+++ b/kresources/kolab/kcal/task.cpp
@@ -39,8 +39,8 @@
using namespace Kolab;
-KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::ResourceKolab *res,
- const QString& subResource, Q_UINT32 sernum )
+KCal::Todo* Task::xmlToTask( const TQString& xml, const TQString& tz, KCal::ResourceKolab *res,
+ const TQString& subResource, Q_UINT32 sernum )
{
Task task( res, subResource, sernum, tz );
task.load( xml );
@@ -49,14 +49,14 @@ KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::Resour
return todo;
}
-QString Task::taskToXML( KCal::Todo* todo, const QString& tz )
+TQString Task::taskToXML( KCal::Todo* todo, const TQString& tz )
{
- Task task( 0, QString::null, 0, tz, todo );
+ Task task( 0, TQString::null, 0, tz, todo );
return task.saveXML();
}
-Task::Task( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Todo* task )
+Task::Task( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Todo* task )
: Incidence( res, subResource, sernum, tz ),
mPriority( 5 ), mPercentCompleted( 0 ),
mStatus( KCal::Incidence::StatusNone ),
@@ -101,23 +101,23 @@ KCal::Incidence::Status Task::status() const
return mStatus;
}
-void Task::setParent( const QString& parentUid )
+void Task::setParent( const TQString& parentUid )
{
mParent = parentUid;
}
-QString Task::parent() const
+TQString Task::parent() const
{
return mParent;
}
-void Task::setDueDate( const QDateTime& date )
+void Task::setDueDate( const TQDateTime& date )
{
mDueDate = date;
mHasDueDate = true;
}
-QDateTime Task::dueDate() const
+TQDateTime Task::dueDate() const
{
return mDueDate;
}
@@ -137,13 +137,13 @@ bool Task::hasDueDate() const
return mHasDueDate;
}
-void Task::setCompletedDate( const QDateTime& date )
+void Task::setCompletedDate( const TQDateTime& date )
{
mCompletedDate = date;
mHasCompletedDate = true;
}
-QDateTime Task::completedDate() const
+TQDateTime Task::completedDate() const
{
return mCompletedDate;
}
@@ -153,9 +153,9 @@ bool Task::hasCompletedDate() const
return mHasCompletedDate;
}
-bool Task::loadAttribute( QDomElement& element )
+bool Task::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "priority" ) {
bool ok;
@@ -198,13 +198,13 @@ bool Task::loadAttribute( QDomElement& element )
return true;
}
-bool Task::saveAttributes( QDomElement& element ) const
+bool Task::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
Incidence::saveAttributes( element );
- writeString( element, "priority", QString::number( priority() ) );
- writeString( element, "completed", QString::number( percentCompleted() ) );
+ writeString( element, "priority", TQString::number( priority() ) );
+ writeString( element, "completed", TQString::number( percentCompleted() ) );
switch( status() ) {
case KCal::Incidence::StatusInProcess:
@@ -245,9 +245,9 @@ bool Task::saveAttributes( QDomElement& element ) const
}
-bool Task::loadXML( const QDomDocument& document )
+bool Task::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "task" ) {
qWarning( "XML error: Top tag was %s instead of the expected task",
@@ -256,11 +256,11 @@ bool Task::loadXML( const QDomDocument& document )
}
setHasStartDate( false ); // todo's don't necessarily have one
- 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();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
kdDebug() << "Warning: Unhandled tag " << e.tagName() << endl;
@@ -272,17 +272,17 @@ bool Task::loadXML( const QDomDocument& document )
return true;
}
-QString Task::saveXML() const
+TQString Task::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "task" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "task" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
if ( !hasStartDate() ) {
// events and journals always have a start date, but tasks don't.
// Remove the entry done by the inherited save above, because we
// don't have one.
- QDomNodeList l = element.elementsByTagName( "start-date" );
+ TQDomNodeList l = element.elementsByTagName( "start-date" );
Q_ASSERT( l.count() == 1 );
element.removeChild( l.item( 0 ) );
}
@@ -308,7 +308,7 @@ void Task::setFields( const KCal::Todo* task )
else if ( !task->relatedToUid().isEmpty() )
setParent( task->relatedToUid() );
else
- setParent( QString::null );
+ setParent( TQString::null );
if ( task->hasCompletedDate() && task->percentComplete() == 100 )
setCompletedDate( localToUTC( task->completed() ) );