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

digraph inheritancecd2cbac4c8 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "QtBoundedTime" [style="setlinewidth(0.5)",URL="enaml.widgets.bounded_time.BoundedTime.html#enaml.qt.qt_bounded_time.QtBoundedTime",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtControl" -> "QtBoundedTime" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.qt.qt_constraints_widget.QtConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtConstraintsWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtTimeSelector" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_time_selector.QtTimeSelector",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtBoundedTime" -> "QtTimeSelector" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtControl" [style="setlinewidth(0.5)",URL="enaml.widgets.control.Control.html#enaml.qt.qt_control.QtControl",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtConstraintsWidget" -> "QtControl" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.qt.qt_widget.QtWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtObject" -> "QtWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; }

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