KCal Library
22 #include "confirmsavedialog.h"
26 #include <QtGui/QBoxLayout>
27 #include <QtGui/QLabel>
28 #include <QtGui/QVBoxLayout>
29 #include <QtGui/QTreeWidget>
38 class KCal::ConfirmSaveDialog::Private
43 QTreeWidget *mListView;
47 ConfirmSaveDialog::ConfirmSaveDialog(
const QString &destination,
49 : KDialog( parent ), d( new KCal::ConfirmSaveDialog::Private )
51 setCaption( i18n(
"Confirm Save" ) );
53 setButtons( Ok | Cancel );
54 setDefaultButton( Ok );
55 QFrame *topFrame =
new QFrame(
this );
56 setMainWidget( topFrame );
58 QBoxLayout *topLayout =
new QVBoxLayout( topFrame );
60 QLabel *label =
new QLabel(
61 i18n(
"You have requested to save the following objects to '%1':",
62 destination ), topFrame );
63 topLayout->addWidget( label );
66 headers << i18n(
"Operation" )
71 d->mListView =
new QTreeWidget( topFrame );
72 d->mListView->setColumnCount( 4 );
73 d->mListView->setHeaderLabels( headers );
75 topLayout->addWidget( d->mListView );
78 ConfirmSaveDialog::~ConfirmSaveDialog()
83 void ConfirmSaveDialog::addIncidences(
const Incidence::List &incidences,
84 const QString &operation )
86 Incidence::List::ConstIterator it;
87 for ( it = incidences.begin(); it != incidences.end(); ++it ) {
89 QTreeWidgetItem *item =
new QTreeWidgetItem( d->mListView );
90 item->setText( 0, operation );
91 item->setText( 1, i->
type() );
92 item->setText( 2, i->
summary() );
93 item->setText( 3, i->
uid() );
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed Nov 28 2012 21:56:49 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.