[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KProgressDialog
From: Yannick Koehler <yannick.koehler () colubris ! com>
Date: 2002-04-17 18:25:02
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On April 17, 2002 08:24 am, Aaron J. Seigo wrote:
>
> KProgressDialog* progress = new KProgressDialog(0, "compactingProgress",
> i18n("Compacting All Mail Folders"),
> i18n("Determining which folders require
> compacting..."), true);
> progress->progressBar()->setFormat("%v / %m");
> progress->show();
>
> // bunch of tree traversal code counting folders to compact snipped
>
> progress->progressBar()->setTotalSteps(inNeed.count());
>
> for (KMFolder* compacting = inNeed.first();
> compacting; compacting = inNeed.next())
> {
> progress->setLabel(i18n("Compacting %1").arg(compacting->name()));
>
> // compacting folders
>
> progress->progressBar()->advance(1);
> }
>
> this obviously doesn't use all the features available in kprogressdialog,
> but it shows basic usage at least. =) in combo with the docu it should
> hopefullly get you started. feel free to ask questions or thunk me over the
> head for its design at will ;-)
Is this normal then that when I do that code I only get the caption but do not
see anywhere the text "Determining which folders require compacting...".
I see only a small window (the icon is not even my app icon but is a black X)
with the proper title, the progressBar is working and that's it. No text, no
cancel button (I did call showCancelButton(true)).
Here's my code
KProgressDialog* lpb = new KProgressDialog(this, 0, i18n("Kemerge"),
i18n("Building list.\nPlease wait."), true);
lpb->setAllowCancel(true);
lpb->showButtonCancel(true);
lpb->progressBar()->setTotalSteps(nbrOfCategories);
lpb->show();
uint i = 0;
for (i = 0; i < nbrOfCategories; i++) {
lpb->progressBar()->setValue(i);
if ( lpb->wasCancelled() )
break;
}
delete lpb;
- --
Yannick Koehler
Software Designer - Colubris Networks Inc. - http://www.colubris.com
"Free as in bird!'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8vb4AfuKOJNEyL1URAswZAKCOBZvsdEJaQWwMc1apiAaJFYSi/QCbB+p3
xjRP5txXqihbVsnUYLLMx/k=
=JyI5
-----END PGP SIGNATURE-----
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic