HildonTimeSelector

HildonTimeSelector — A widget to select the current time.

Synopsis

                    HildonTimeSelector;
GtkWidget*          hildon_time_selector_new            (void);
GtkWidget*          hildon_time_selector_new_step       (guint minutes_step);
gboolean            hildon_time_selector_set_time       (HildonTimeSelector *selector,
                                                         guint hours,
                                                         guint minutes);
void                hildon_time_selector_get_time       (HildonTimeSelector *selector,
                                                         guint *hours,
                                                         guint *minutes);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----HildonTouchSelector
                                             +----HildonTimeSelector

Implemented Interfaces

HildonTimeSelector implements AtkImplementorIface and GtkBuildable.

Properties

  "minutes-step"             guint                 : Read / Write / Construct Only
  "time-format-policy"       HildonTimeSelectorFormatPolicy  : Read / Write / Construct

Description

HildonTimeSelector allows users to choose a time by selecting hour and minute. It also allows choosing between AM or PM format.

The currently selected time can be altered with hildon_time_selector_set_time(), and retrieved using hildon_time_selector_get_time().

Use this widget instead of deprecated HildonTimeEditor widget.

Details

HildonTimeSelector

typedef struct _HildonTimeSelector HildonTimeSelector;


hildon_time_selector_new ()

GtkWidget*          hildon_time_selector_new            (void);

Creates a new HildonTimeSelector

Returns : a new HildonTimeSelector

Since 2.2


hildon_time_selector_new_step ()

GtkWidget*          hildon_time_selector_new_step       (guint minutes_step);

Creates a new HildonTimeSelector, with minutes_step steps between the minutes in the minutes column.

minutes_step : step between the minutes in the selector.
Returns : a new HildonTimeSelector

Since 2.2


hildon_time_selector_set_time ()

gboolean            hildon_time_selector_set_time       (HildonTimeSelector *selector,
                                                         guint hours,
                                                         guint minutes);

Sets the current active hour on the HildonTimeSelector widget

The format of the hours accepted is always 24h format, with a range (0-23):(0-59).

selector : the HildonTimeSelector
hours : the current hour (0-23)
minutes : the current minute (0-59)
Returns : TRUE on success, FALSE otherwise

Since 2.2


hildon_time_selector_get_time ()

void                hildon_time_selector_get_time       (HildonTimeSelector *selector,
                                                         guint *hours,
                                                         guint *minutes);

Gets the current active hour on the HildonTimeSelector widget. Both year and minutes can be NULL.

This method returns the date always in 24h format, with a range (0-23):(0-59)

selector : the HildonTimeSelector
hours : to set the current hour (0-23)
minutes : to set the current minute (0-59)

Since 2.2

Property Details

The "minutes-step" property

  "minutes-step"             guint                 : Read / Write / Construct Only

Step between the minutes in the list of options of the widget .

Allowed values: [1,30]

Default value: 1


The "time-format-policy" property

  "time-format-policy"       HildonTimeSelectorFormatPolicy  : Read / Write / Construct

The visual policy of the time format

Default value: HILDON_TIME_SELECTOR_FORMAT_POLICY_AUTOMATIC

Since 2.2