diff options
Diffstat (limited to 'konsolekalendar/konsolekalendarexports.cpp')
-rw-r--r-- | konsolekalendar/konsolekalendarexports.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/konsolekalendar/konsolekalendarexports.cpp b/konsolekalendar/konsolekalendarexports.cpp index cad79964a..f1d93b0ab 100644 --- a/konsolekalendar/konsolekalendarexports.cpp +++ b/konsolekalendar/konsolekalendarexports.cpp @@ -33,7 +33,7 @@ #include <stdlib.h> #include <iostream> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kdebug.h> #include <klocale.h> @@ -58,8 +58,8 @@ KonsoleKalendarExports::~KonsoleKalendarExports() { } -bool KonsoleKalendarExports::exportAsTxt( QTextStream *ts, - Event *event, QDate date ) +bool KonsoleKalendarExports::exportAsTxt( TQTextStream *ts, + Event *event, TQDate date ) { // Export "Text" Format: @@ -144,8 +144,8 @@ bool KonsoleKalendarExports::exportAsTxt( QTextStream *ts, return true; } -bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts, - Event *event, QDate date, +bool KonsoleKalendarExports::exportAsTxtShort( TQTextStream *ts, + Event *event, TQDate date, bool sameday ) { @@ -174,21 +174,21 @@ bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts, *ts << "\t"; // Print Event Summary - *ts << event->summary().replace( QChar( '\n' ), QChar( ' ' ) ); + *ts << event->summary().replace( TQChar( '\n' ), TQChar( ' ' ) ); // Print Event Location if ( !event->location().isEmpty() ) { if ( !event->summary().isEmpty() ) { *ts << ", "; } - *ts << event->location().replace( QChar( '\n' ), QChar( ' ' ) ); + *ts << event->location().replace( TQChar( '\n' ), TQChar( ' ' ) ); } *ts << endl; // Print Event Description if ( !event->description().isEmpty() ) { *ts << "\t\t\t" - << event->description().replace( QChar( '\n' ), QChar( ' ' ) ) + << event->description().replace( TQChar( '\n' ), TQChar( ' ' ) ) << endl; } @@ -197,29 +197,29 @@ bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts, return true; } -QString KonsoleKalendarExports::processField( QString field, QString dquote ) +TQString KonsoleKalendarExports::processField( TQString field, TQString dquote ) { // little function that processes a field for CSV compliance: // 1. Replaces double quotes by a pair of consecutive double quotes // 2. Surrounds field with double quotes - QString double_dquote = dquote + dquote; - QString retField = dquote + field.replace( dquote, double_dquote ) + dquote; + TQString double_dquote = dquote + dquote; + TQString retField = dquote + field.replace( dquote, double_dquote ) + dquote; return retField; } #define pF( x ) processField( ( x ), dquote ) -bool KonsoleKalendarExports::exportAsCSV( QTextStream *ts, - Event *event, QDate date ) +bool KonsoleKalendarExports::exportAsCSV( TQTextStream *ts, + Event *event, TQDate date ) { // Export "CSV" Format: // // startdate,starttime,enddate,endtime,summary,location,description,UID - QString delim = i18n( "," ); // character to use as CSV field delimiter - QString dquote = i18n( "\"" ); // character to use to quote CSV fields + TQString delim = i18n( "," ); // character to use as CSV field delimiter + TQString dquote = i18n( "\"" ); // character to use to quote CSV fields if ( !event->doesFloat() ) { *ts << pF( KGlobal::locale()->formatDate( date ) ) @@ -233,9 +233,9 @@ bool KonsoleKalendarExports::exportAsCSV( QTextStream *ts, << delim << pF( "" ); } - *ts << delim << pF( event->summary().replace( QChar('\n'), QChar(' ') ) ) - << delim << pF( event->location().replace( QChar('\n'), QChar(' ') ) ) - << delim << pF( event->description().replace( QChar('\n'), QChar(' ') ) ) + *ts << delim << pF( event->summary().replace( TQChar('\n'), TQChar(' ') ) ) + << delim << pF( event->location().replace( TQChar('\n'), TQChar(' ') ) ) + << delim << pF( event->description().replace( TQChar('\n'), TQChar(' ') ) ) << delim << pF( event->uid() ) << endl; |