hildon.VVolumebar

hildon.VVolumebar

A widget that displays a vertical volume bar.

Description

The hildon.VVolumebar widget displays a vertical volume bar that allows increasing or decreasing volume within a pre-defined range, and muting the volume by clicking on a specific mute icon.

Ancestry

Up to the first non-hildon ancestor:

...
 +-- gtk.Container
      +-- hildon.Volumebar
           +-- hildon.VVolumebar

Usage Example

import gtk
import hildon

def level_changed(volumebar, label):
    label.set_text("Volume level: %s" % volumebar.get_level())
    
def mute_toggled(volumebar, label):
    if volumebar.get_mute():
      label.set_text("Volume level: Mute")
    else:
      level_changed(volumebar, label)

window = hildon.Window()
window.set_title("Test App")

label = gtk.Label()

volumebar = hildon.VVolumebar()
volumebar.connect("level_changed", level_changed, label)
volumebar.connect("mute_toggled", mute_toggled, label)

level_changed(volumebar, label) #Init label text

vbox = gtk.VBox(False, 10)
vbox.pack_start (volumebar)
vbox.pack_start (label)
window.add(vbox)

window.show_all()

gtk.main()
      

Constructor

Creates a new hildon.VVolumebar widget.

hildon.VVolumebar()
Returns A new hildon.VVolumebar widget.


Improve this page