21 #include "confirmsavedialog.h"
23 #include <tdelistview.h>
24 #include <tdelocale.h>
32 ConfirmSaveDialog::ConfirmSaveDialog( const TQString &destination,
33 TQWidget *parent, const char *name )
34 : KDialogBase( parent, name, true, i18n( "Confirm Save"), Ok | Cancel )
36 TQFrame *topFrame = makeMainWidget();
38 TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
39 topLayout->setSpacing( spacingHint() );
41 TQLabel *label = new TQLabel(
42 i18n( "You have requested to save the following objects to '%1':")
43 .arg( destination ), topFrame );
44 topLayout->addWidget( label );
46 mListView = new TDEListView( topFrame );
47 mListView->addColumn( i18n( "Operation") );
48 mListView->addColumn( i18n( "Type") );
49 mListView->addColumn( i18n( "Summary") );
50 mListView->addColumn( i18n( "UID") );
51 topLayout->addWidget( mListView );
54 void ConfirmSaveDialog::addIncidences( const Incidence::List &incidences,
55 const TQString &operation )
57 Incidence::List::ConstIterator it;
58 for( it = incidences.begin(); it != incidences.end(); ++it ) {
60 TDEListViewItem *item = new TDEListViewItem( mListView );
61 item->setText( 0, operation );
62 item->setText( 1, i->type() );
63 item->setText( 2, i-> summary() );
64 item->setText( 3, i-> uid() );
This class provides the base class common to all calendar components.
TQString uid() const Return the unique id for the event.
TQString summary() const Return short summary.
|