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/egroupware/todostatemapper.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/egroupware/todostatemapper.cpp')
-rw-r--r-- | kresources/egroupware/todostatemapper.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kresources/egroupware/todostatemapper.cpp b/kresources/egroupware/todostatemapper.cpp index 6c81ded33..e983c3c99 100644 --- a/kresources/egroupware/todostatemapper.cpp +++ b/kresources/egroupware/todostatemapper.cpp @@ -19,22 +19,22 @@ Boston, MA 02110-1301, USA. */ -#include <qdatastream.h> -#include <qfile.h> +#include <tqdatastream.h> +#include <tqfile.h> #include <kdebug.h> #include <kstandarddirs.h> #include "todostatemapper.h" -QDataStream& operator<<( QDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry ) +TQDataStream& operator<<( TQDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry ) { stream << entry.uid << entry.localState << entry.remoteState; return stream; } -QDataStream& operator>>( QDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry ) +TQDataStream& operator>>( TQDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry ) { stream >> entry.uid >> entry.localState >> entry.remoteState; @@ -49,19 +49,19 @@ TodoStateMapper::~TodoStateMapper() { } -void TodoStateMapper::setPath( const QString &path ) +void TodoStateMapper::setPath( const TQString &path ) { mPath = path; } -void TodoStateMapper::setIdentifier( const QString &identifier ) +void TodoStateMapper::setIdentifier( const TQString &identifier ) { mIdentifier = identifier; } bool TodoStateMapper::load() { - QFile file( filename() ); + TQFile file( filename() ); if ( !file.open( IO_ReadOnly ) ) { kdError() << "Can't read uid map file '" << filename() << "'" << endl; return false; @@ -69,7 +69,7 @@ bool TodoStateMapper::load() clear(); - QDataStream stream; + TQDataStream stream; stream.setVersion( 6 ); stream.setDevice( &file ); stream >> mTodoStateMap; @@ -81,13 +81,13 @@ bool TodoStateMapper::load() bool TodoStateMapper::save() { - QFile file( filename() ); + TQFile file( filename() ); if ( !file.open( IO_WriteOnly ) ) { kdError() << "Can't write uid map file '" << filename() << "'" << endl; return false; } - QDataStream stream; + TQDataStream stream; stream.setVersion( 6 ); stream.setDevice( &file ); stream << mTodoStateMap; @@ -102,7 +102,7 @@ void TodoStateMapper::clear() mTodoStateMap.clear(); } -void TodoStateMapper::addTodoState( const QString &uid, int localState, const QString &remoteState ) +void TodoStateMapper::addTodoState( const TQString &uid, int localState, const TQString &remoteState ) { TodoStateMapEntry entry; entry.uid = uid; @@ -112,7 +112,7 @@ void TodoStateMapper::addTodoState( const QString &uid, int localState, const QS mTodoStateMap.insert( uid, entry ); } -QString TodoStateMapper::remoteState( const QString &uid, int localState ) +TQString TodoStateMapper::remoteState( const TQString &uid, int localState ) { if ( mTodoStateMap.find( uid ) == mTodoStateMap.end() ) kdError() << "TodoStateMapper: no entry for " << uid << " found" << endl; @@ -124,12 +124,12 @@ QString TodoStateMapper::remoteState( const QString &uid, int localState ) return toRemote( localState ); } -void TodoStateMapper::remove( const QString &uid ) +void TodoStateMapper::remove( const TQString &uid ) { mTodoStateMap.remove( uid ); } -int TodoStateMapper::toLocal( const QString &remoteState ) +int TodoStateMapper::toLocal( const TQString &remoteState ) { if ( remoteState == "offer" ) return 0; @@ -138,13 +138,13 @@ int TodoStateMapper::toLocal( const QString &remoteState ) else if ( remoteState == "done" || remoteState == "billed" ) return 100; else { - QString number( remoteState ); + TQString number( remoteState ); number.replace( "%", "" ); return number.toInt(); } } -QString TodoStateMapper::toRemote( int localState ) +TQString TodoStateMapper::toRemote( int localState ) { if ( localState == 0 ) return "offer"; @@ -153,12 +153,12 @@ QString TodoStateMapper::toRemote( int localState ) else if ( localState == 100 ) return "done"; else - return QString( "%1%" ).arg( localState ); + return TQString( "%1%" ).arg( localState ); } -QString TodoStateMapper::filename() +TQString TodoStateMapper::filename() { - QString file = mPath; + TQString file = mPath; if ( !file.endsWith( "/" ) ) file += "/"; file += mIdentifier; |