hildon.TimeEditor

A simple widget with entries for hours and minutes and a pm/am indicator as well as a button which pops up a hildon.TimePicker dialog window.

Description

A simple widget with entries for hours and minutes and a pm/am indicator as well as a button which pops up a hildon.TimePicker dialog window.

Ancestry

Up to the first non-hildon ancestor:

...
 +-- gtk.Container
      +-- hildon.TimeEditor

Usage Example

TO DO
      

Properties

Name Access Description
"ticks" Read/Write If editor is in duration mode, contains the duration seconds. If not, contains seconds since midnight.
"show_seconds" Read/Write Controls whether seconds are shown in the editor.
"show_hours" Read/Write Controls whether hours are shown in the editor.
"duration_mode" Read/Write Controls whether the TimeEditor is in duration mode.
"duration_min" Read/Write Minimum allowed duration value.
"duration_max" Read/Write Maximum allowed duration value.

Constructor

Creates a new hildon.TimeEditor widget.

hildon.TimeEditor()
Returns A new hildon.TimeEditor.

Methods

get_time

Gets the time of the hildon.TimeEditor widget. The time returned is always in 24h format.

hildon.TimeEditor.get_time()
Returns A tuple of the form (hours, minutes, seconds).

set_time

Sets the time. If the time specified by the arguments is invalid, the function returns without doing anything else. The time is assumed to be in 24h format.

hildon.TimeEditor.set_time(hours, minutes, seconds)
hours Hours.
minutes Minutes.
seconds Seconds.

get_duration_range

Gets the time range of the duration editor.

hildon.TimeEditor.get_duration_range()
Returns A tuple of the form (min_seconds, max_seconds), with min_seconds being its minimum allowed time in seconds and max_seconds its maximum allowed time in seconds.

set_duration_range

Sets the time range of the duration editor.

hildon.TimeEditor.set_duration_range(min_seconds, max_seconds)
min_seconds Minimum allowed time, in seconds.
max_seconds Maximum allowed time, in seconds.

get_ticks

Returns the current duration, in seconds. This means seconds from midnight, if not in duration mode.

hildon.TimeEditor.get_ticks()
Returns The current duration, in seconds.

set_ticks

Sets the current duration, in seconds. This means seconds from midnight, if not in duration mode.

hildon.TimeEditor.set_ticks(ticks)
ticks The current duration, in seconds.

get_show_seconds

Returns whether the seconds field is being shown or not.

hildon.TimeEditor.get_show_seconds()
Returns True if seconds field is being shown and False otherwise.

set_show_seconds

This method shows or hides the seconds field.

hildon.TimeEditor.set_show_seconds(show_seconds)
show_seconds True to show or False to hide the seconds field.

get_show_hours

Returns whether the hours field is being shown or not.

hildon.TimeEditor.get_show_hours()
Returns True if hours field is being shown and False otherwise.

set_show_hours

This method shows or hides the hours field.

hildon.TimeEditor.set_show_hours(show_hours)
show_hours True to show or False to hide the hours field.

get_duration_mode

hildon.TimeEditor.get_duration_mode()
Returns True if it's in duration mode.

set_duration_mode

This method sets the duration editor mode, in which the maximum hours is 99 and the hildon.TimePicker is disabled.

hildon.TimeEditor.set_duration_mode(duration_mode)
duration_mode True to set it in duration mode.

get_duration_min

Returns the shortest duration hildon.TimeEditor allows in duration mode.

hildon.TimeEditor.get_duration_min()
Returns Mimimum allowed duration, in seconds.

set_duration_min

Sets the minimum allowed duration for the duration mode. Note: Has no effect in time mode.

hildon.TimeEditor.get_duration_min(duration_min)
duration_min Mimimum allowed duration, in seconds.

get_duration_max

Returns the longest duration hildon.TimeEditor allows in duration mode.

hildon.TimeEditor.get_duration_max()
Returns Maximum allowed duration, in seconds.

set_duration_max

Sets the maximum allowed duration for the duration mode. Note: Has no effect in time mode.

hildon.TimeEditor.get_duration_max(duration_max)
duration_max Maximum allowed duration, in seconds.


Improve this page