Go to the documentation of this file.
36#include <tqdatetime.h>
41#include <libkcal/calendarlocal.h>
42#include <libkcal/calendar.h>
43#include <libkcal/event.h>
62 Event *event, TQDate date )
80 *ts << i18n( "Date:" )
82 << TDEGlobal::locale()->formatDate( date )
86 if ( !event->doesFloat() ) {
88 << TDEGlobal::locale()->formatTime( event->dtStart().time() )
90 << TDEGlobal::locale()->formatTime( event->dtEnd().time() );
95 *ts << i18n( "Summary:" )
97 if ( !event->summary().isEmpty() ) {
103 << i18n( "(no summary available)" )
108 *ts << i18n( "Location:" )
110 if ( !event->location().isEmpty() ) {
116 << i18n( "(no location available)" )
121 *ts << i18n( "Description:" )
123 if ( !event->description().isEmpty() ) {
125 << event->description()
129 << i18n( "(no description available)" )
134 *ts << i18n( "UID:" )
141 *ts << "--------------------------------------------------"
148 Event *event, TQDate date,
162 *ts << TDEGlobal::locale()->formatDate( date ) << ":"
167 if ( !event->doesFloat() ) {
168 *ts << TDEGlobal::locale()->formatTime( event->dtStart().time() )
170 << TDEGlobal::locale()->formatTime( event->dtEnd().time() );
172 *ts << i18n( "[all day]\t" );
177 *ts << event->summary().replace( TQChar( '\n' ), TQChar( ' ' ) );
180 if ( !event->location().isEmpty() ) {
181 if ( !event->summary().isEmpty() ) {
184 *ts << event->location().replace( TQChar( '\n' ), TQChar( ' ' ) );
189 if ( !event->description().isEmpty() ) {
191 << event->description().replace( TQChar( '\n' ), TQChar( ' ' ) )
200TQString KonsoleKalendarExports::processField( TQString field, TQString dquote )
206 TQString double_dquote = dquote + dquote;
207 TQString retField = dquote + field.replace( dquote, double_dquote ) + dquote;
211#define pF( x ) processField( ( x ), dquote )
214 Event *event, TQDate date )
221 TQString delim = i18n( "," );
222 TQString dquote = i18n( "\"" );
224 if ( !event->doesFloat() ) {
225 *ts << pF( TDEGlobal::locale()->formatDate( date ) )
226 << delim << pF( TDEGlobal::locale()->formatTime( event->dtStart().time() ) )
227 << delim << pF( TDEGlobal::locale()->formatDate( date ) )
228 << delim << pF( TDEGlobal::locale()->formatTime( event->dtEnd().time() ) );
230 *ts << pF( TDEGlobal::locale()->formatDate( date ) )
232 << delim << pF( TDEGlobal::locale()->formatDate( date ) )
233 << delim << pF( "" );
236 *ts << delim << pF( event->summary().replace( TQChar( '\n'), TQChar( ' ') ) )
237 << delim << pF( event->location().replace( TQChar( '\n'), TQChar( ' ') ) )
238 << delim << pF( event->description().replace( TQChar( '\n'), TQChar( ' ') ) )
239 << delim << pF( event->uid() )
bool exportAsTxtShort(TQTextStream *ts, Event *event, TQDate date, bool sameday) Export the Event in Short Text Mode.
bool exportAsCSV(TQTextStream *ts, Event *event, TQDate date) Export the Event in Comma-Separated Values (CSV) Mode.
KonsoleKalendarExports(KonsoleKalendarVariables *vars=0) Constructs a KonsoleKalendarChange object from command line arguments.
bool exportAsTxt(TQTextStream *ts, Event *event, TQDate date) Export the Event in Text Mode.
~KonsoleKalendarExports() Destructor.
This class provides all the variables for the program.
Provides the KonsoleKalendarExports class definition.
|