Progressbar

../_images/progressbar-preview.png

Widget description

The progress bar is a widget for visually representing the progress status of a given job/task.

A progress bar may be horizontal or vertical. It may display an icon besides it, as well as primary and units labels. The former is meant to label the widget as a whole, while the latter, which is formatted with floating point values (and thus accepts a printf-style format string, like "%1.2f units"), is meant to label the widget’s progress value. Label, icon and unit strings/objects are optional for progress bars.

A progress bar may be inverted, in which case it gets its values inverted, i.e., high values being on the left or top and low values on the right or bottom, for horizontal and vertical modes respectively.

The span of the progress, as set by span_size, is its length (horizontally or vertically), unless one puts size hints on the widget to expand on desired directions, by any container. That length will be scaled by the object or applications scaling factor. Applications can query the progress bar for its value with value.

This widget emits the following signals, besides the ones sent from LayoutClass:

  • changed - when the value is changed

This widget has the following styles:

  • default

  • wheel (simple style, no text, no progression, only “pulse” effect is available)

  • double (style with two independent progress indicators)

Default text parts of the progressbar widget that you can use for are:

  • default - Label of the progressbar

Default content parts of the progressbar widget that you can use for are:

  • icon - An icon of the progressbar

Default part names for the “recording” style:

  • elm.cur.progressbar - The “main” indicator bar

  • elm.cur.progressbar1 - The “secondary” indicator bar

Inheritance diagram

Inheritance diagram of Progressbar
class efl.elementary.Progressbar(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.LayoutClass

This is the class that actually implements the widget.

Parameters
  • parent (efl.evas.Object) – The parent object

  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance

callback_changed_add(func, *args, **kwargs)

When the value is changed.

callback_changed_del(func)
horizontal

The orientation of a given progress bar widget.

This property reflects how your progress bar is to be disposed: vertically or horizontally.

Type

bool

horizontal_get()
horizontal_set(horizontal)
inverted

Whether a given progress bar widget’s displaying values are inverted or not.

A progress bar may be inverted, in which state it gets its values inverted, with high values being on the left or top and low values on the right or bottom, as opposed to normally have the low values on the former and high values on the latter, respectively, for horizontal and vertical modes.

Type

bool

inverted_get()
inverted_set(inverted)
is_pulsing

Get the pulsing state on a given progressbar widget.

Type

bool (readonly)

New in version 1.19.

is_pulsing_get()
part_value_get(part)

Get the progress status (in percentage) for the given part.

This can be used with a progressbar of style: “recording”. The recording style have two different part that can represent two different progress operation on the same progressbar at the same time. The default theme provide two parts by default: “elm.cur.progressbar” and “elm.cur.progressbar1”

New in version 1.8.

part_value_set(part, value)

Set the progress status (in percentage) for the given part.

See

part_value_get() for more info.

New in version 1.8.

pulse(state)

Start (state=True) or stop (state=False) the pulsing animation.

Note that pulse_mode must be enabled for this to work.

Parameters

state (bool) – Whenever to start or stop the pulse animation.

pulse_mode

Whether a given progress bar widget is at “pulsing mode” or not.

By default, progress bars will display values from the low to high value boundaries. There are, though, contexts in which the progress of a given task is unknown. For such cases, one can set a progress bar widget to a “pulsing state”, to give the user an idea that some computation is being held, but without exact progress values. In the default theme, it will animate its bar with the contents filling in constantly and back to non-filled, in a loop. To start and stop this pulsing animation, one has to explicitly call pulse(True) or pulse(False).

Type

bool

pulse_mode_get()
pulse_mode_set(state)
span_size

The (exact) length of the bar region of a given progress bar widget.

This property is the minimum width (when in horizontal mode) or height (when in vertical mode) of the actual bar area of the progress bar. This in turn affects the object’s minimum size. Use this when you’re not setting other size hints expanding on the given direction (like weight and alignment hints) and you would like it to have a specific size.

Note

Icon, label and unit text around the object will require their own space, which will make the object to actually require more size.

Type

Evas_Coord (int)

span_size_get()
span_size_set(size)
unit_format

The format string for a given progress bar widget’s units label.

If this is set to None, it will make the objects units area to be hidden completely. If not, it’ll set the format string for the units label’s text. The units label is provided a floating point value, so the units text is up display at most one floating point value. Note that the units label is optional. Use a format string such as “%1.2f meters” for example.

Note

The default format string for a progress bar is an integer percentage, as in "%.0f %%".

Type

string

unit_format_get()
unit_format_set(unit_format)
value

The progress value (in percentage) on a given progress bar widget.

The progress value (must be between 0.0 and 1.0)

Note

If you set a value out of the specified range for val, it will be interpreted as the closest of the boundary values in the range.

Type

float

value_get()
value_set(value)