Page Contents

This Page

TimeSelector

class enaml.widgets.time_selector.TimeSelector(parent=None, **kwargs)[source]

Bases: enaml.widgets.bounded_time.BoundedTime

A time widget that displays a Python datetime.time object using an appropriate toolkit specific control.

time_format = None

A python time format string to format the time. If None is supplied (or is invalid) the system locale setting is used. This may not be supported by all backends.

hug_width = None

How strongly to hugs the content width. A TimeSelector ignores the width hug by default, so it expands freely in width.

snapshot()[source]

Return a dictionary which contains all the state necessary to initialize a client widget.

bind()[source]

A method called after initialization which allows the widget to bind any event handlers necessary.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_time_selector.QtTimeSelector

class enaml.qt.qt_time_selector.QtTimeSelector(object_id, parent, session)[source]

Bases: enaml.qt.qt_bounded_time.QtBoundedTime

A Qt implementation of an Enaml TimeSelector.

create_widget(parent, tree)[source]

Create the underlying QTimeEdit widget.

create(tree)[source]

Create and initialize the underlying widget.

on_action_set_time_format(content)[source]

Handle the ‘set_time_format’ action from the Enaml widget.

get_time()[source]

Return the current time in the control.

Returns:result (QTime) – The current control time as a QTime object.
set_time(time)[source]

Set the widget’s current time.

Parameters:time (QTime) – The QTime object to use for setting the time.
set_max_time(time)[source]

Set the widget’s maximum time.

Parameters:time (QTime) – The QTime object to use for setting the maximum time.
set_min_time(time)[source]

Set the widget’s minimum time.

Parameters:time (QTime) – The QTime object to use for setting the minimum time.
set_time_format(time_format)[source]

Set the widget’s time format.

Parameters:time_format (str) – A Python time formatting string.

Wx