kaddressbook
Go to the documentation of this file.
26 #include <KApplication>
30 #include <KTextBrowser>
32 #include <QGridLayout>
33 #include <QProgressBar>
35 using namespace KABPrinting;
40 setObjectName( QLatin1String(name) );
41 setWindowTitle( i18n(
"Printing: Progress" ) );
43 QGridLayout *topLayout =
new QGridLayout(
this );
44 topLayout->setSpacing( KDialog::spacingHint() );
45 topLayout->setMargin( KDialog::marginHint() );
47 mLogBrowser =
new KTextBrowser(
this );
48 topLayout->addWidget( mLogBrowser, 0, 0 );
50 mProgressBar =
new QProgressBar(
this );
51 mProgressBar->setValue( 0 );
52 topLayout->addWidget( mProgressBar, 1, 0 );
54 resize( QSize( 370, 220 ).expandedTo( minimumSizeHint() ) );
63 mMessages.append( msg );
65 QString head = QLatin1String(
"<qt><b>" ) + i18n(
"Progress" ) +
66 QLatin1String(
":</b><ul>" );
68 QString foot = QLatin1String(
"</ul></qt>" );
71 QStringList::ConstIterator it;
72 QStringList::ConstIterator end(mMessages.constEnd());
73 for ( it = mMessages.constBegin(); it != end; ++it ) {
74 body.append( QLatin1String(
"<li>" ) + (*it) + QLatin1String(
"</li>" ) );
77 mLogBrowser->setText( head + body + foot );
78 kapp->processEvents();
83 mProgressBar->setValue( step );
84 kapp->processEvents();
87 #include "printprogress.moc"
PrintProgress(QWidget *parent, const char *name=0)
void addMessage(const QString &)
Add a message to the message log.
void setProgress(int)
Set the progress to a certain amount.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:51 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.