24 #include <tdeapplication.h>
27 #include <libkcal/calendarlocal.h>
28 #include <libkcal/filestorage.h>
31 #include "calendarview.h"
33 #include "konewstuff.h"
36 TDENewStuff( "korganizer calendar", view ),
41 bool KONewStuff::install( const TQString &fileName )
43 kdDebug(5850) << "KONewStuff::install(): " << fileName << endl;
47 if ( !storage.load() ) {
48 KMessageBox::error( mView, i18n( "Could not load calendar.") );
52 Event::List events = cal.events();
54 TQStringList eventList;
56 Event::List::ConstIterator it;
57 for( it = events.begin(); it != events.end(); ++it ) {
58 TQString text = (*it)->summary();
59 eventList.append( text );
62 int result = KMessageBox::warningContinueCancelList( mView,
63 i18n( "The downloaded events will be merged into your current calendar."),
66 if ( result != KMessageBox::Continue ) return false;
68 return mView->openCalendar( fileName, true );
71 bool KONewStuff::createUploadFile( const TQString &fileName )
73 return mView->saveCalendar( fileName );
This is the main calendar widget.
bool view(TQWidget *parent, Attachment *attachment)
|