[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KProgress::setFormat()
From: Rik Hemsley <rik () kde ! org>
Date: 1999-12-27 18:29:29
[Download RAW message or body]
On IRC the other day, Mr. Desert Angel (or Dessert Angle ?) sent me a patch
for KProgress that allows changing the way the text is displayed.
Previously, KProgress would only show "n%", where n == current percentage
complete.
This allows the user to do KProgress::setFormat("%1 %2 %3"), where:
%1 is replaced by the current percentage complete.
%2 is replaced by the current value.
%3 is replaced by the maximum value.
This means you can have something like:
"Copied %2 of %3 files (%1% complete)"
-> "Copied 16 of 32 files (50% complete)"
Of course, you're not likely to want a string as long as that, but at least
you now have the capability.
For example, within Empath I can now do:
progressMeter->setFormat("%2 of %3");
This will be very useful when downloading messages from a pop3 server.
Is it ok to commit this ?
Notes:
* Two methods are added:
void setFormat(const QString &)
QString format() const
* The default format is "%1%"
Cheers,
Rik
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic