[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KProgress::setFormat()
From: Cristian Tibirna <ctibirna () total ! net>
Date: 1999-12-27 21:58:16
[Download RAW message or body]
Hi
This sounds excellent. But could 1, 2 and 3 be replaced by P, C and M?
This would allow for a saner API.
Cristian Tibirna
On Mon, 27 Dec 1999, Rik Hemsley wrote:
> 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