KCal Library
22 #include "confirmsavedialog.h"
24 #include <klocalizedstring.h>
28 #include <QVBoxLayout>
29 #include <QTreeWidget>
38 class KCal::ConfirmSaveDialog::Private
44 QTreeWidget *mListView;
48 ConfirmSaveDialog::ConfirmSaveDialog(
const QString &destination,
50 : KDialog( parent ), d( new KCal::ConfirmSaveDialog::Private )
52 setCaption( i18n(
"Confirm Save" ) );
54 setButtons( Ok | Cancel );
55 setDefaultButton( Ok );
56 QFrame *topFrame =
new QFrame(
this );
57 setMainWidget( topFrame );
59 QBoxLayout *topLayout =
new QVBoxLayout( topFrame );
61 QLabel *label =
new QLabel(
62 i18n(
"You have requested to save the following objects to '%1':",
63 destination ), topFrame );
64 topLayout->addWidget( label );
67 headers << i18n(
"Operation" )
72 d->mListView =
new QTreeWidget( topFrame );
73 d->mListView->setColumnCount( 4 );
74 d->mListView->setHeaderLabels( headers );
76 topLayout->addWidget( d->mListView );
79 ConfirmSaveDialog::~ConfirmSaveDialog()
84 void ConfirmSaveDialog::addIncidences(
const Incidence::List &incidences,
85 const QString &operation )
87 Incidence::List::ConstIterator it;
88 for ( it = incidences.begin(); it != incidences.end(); ++it ) {
90 QTreeWidgetItem *item =
new QTreeWidgetItem( d->mListView );
91 item->setText( 0, operation );
92 item->setText( 1, i->
type() );
93 item->setText( 2, i->
summary() );
94 item->setText( 3, i->
uid() );
QString uid() const
Returns the unique id (uid) for the incidence.
virtual QByteArray type() const =0
Prints the type of Incidence as a string.
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
This class provides a template for lists of pointers.
QString summary() const
Returns the incidence summary.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:57 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.