HildonDateEditor

HildonDateEditor — A widget which queries a date from user or opens a HildonCalendarPopup.

Synopsis




            HildonDateEditor;
GtkWidget*  hildon_date_editor_new          (void);
void        hildon_date_editor_set_date     (HildonDateEditor *date,
                                             guint year,
                                             guint month,
                                             guint day);
void        hildon_date_editor_get_date     (HildonDateEditor *date,
                                             guint *year,
                                             guint *month,
                                             guint *day);
gboolean    hildon_date_editor_set_year     (HildonDateEditor *editor,
                                             guint year);
gboolean    hildon_date_editor_set_month    (HildonDateEditor *editor,
                                             guint month);
gboolean    hildon_date_editor_set_day      (HildonDateEditor *editor,
                                             guint day);
guint       hildon_date_editor_get_year     (HildonDateEditor *editor);
guint       hildon_date_editor_get_month    (HildonDateEditor *editor);
guint       hildon_date_editor_get_day      (HildonDateEditor *editor);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----HildonDateEditor

Implemented Interfaces

HildonDateEditor implements GtkBuildable and AtkImplementorIface.

Properties


  "day"                  guint                 : Read / Write
  "max-year"             guint                 : Read / Write
  "min-year"             guint                 : Read / Write
  "month"                guint                 : Read / Write
  "year"                 guint                 : Read / Write

Signals


"date-error"
            gboolean    user_function      (HildonDateEditor    *hildondateeditor,
                                            HildonDateTimeError *arg1,
                                            gpointer             user_data)             : Run last

Description

HildonDateEditor is a widget with three entry fields (day, month, year) and an icon (button): clicking on the icon opens up a HildonCalendarPopup.

Example 13. 

gint y, m, d;

date_editor = hildon_date_editor_new();

hildon_date_editor_get_date(date_editor, &y, &m, &d);


Details

HildonDateEditor

typedef struct _HildonDateEditor HildonDateEditor;


hildon_date_editor_new ()

GtkWidget*  hildon_date_editor_new          (void);

Creates a new date editor. The current system date is shown in the editor.

Returns : pointer to a new HildonDateEditor widget.

hildon_date_editor_set_date ()

void        hildon_date_editor_set_date     (HildonDateEditor *date,
                                             guint year,
                                             guint month,
                                             guint day);

Sets the date shown in the editor.

date : the HildonDateEditor widget
year : year
month : month
day : day

hildon_date_editor_get_date ()

void        hildon_date_editor_get_date     (HildonDateEditor *date,
                                             guint *year,
                                             guint *month,
                                             guint *day);

Gets the date represented by the date editor. You can pass NULL to any of the pointers if you're not interested in obtaining it.

date : the HildonDateEditor widget
year : year
month : month
day : day

hildon_date_editor_set_year ()

gboolean    hildon_date_editor_set_year     (HildonDateEditor *editor,
                                             guint year);

Sets the year shown in the editor.

editor : the HildonDateEditor widget
year : year
Returns : TRUE if the year is valid and has been set.

hildon_date_editor_set_month ()

gboolean    hildon_date_editor_set_month    (HildonDateEditor *editor,
                                             guint month);

Sets the month shown in the editor.

editor : the HildonDateEditor widget
month : month
Returns : TRUE if the month is valid and has been set.

hildon_date_editor_set_day ()

gboolean    hildon_date_editor_set_day      (HildonDateEditor *editor,
                                             guint day);

Sets the day shown in the editor.

editor : the HildonDateEditor widget
day : day
Returns : TRUE if the day is valid and has been set.

hildon_date_editor_get_year ()

guint       hildon_date_editor_get_year     (HildonDateEditor *editor);

editor : the HildonDateEditor widget
Returns : the current year shown in the editor.

hildon_date_editor_get_month ()

guint       hildon_date_editor_get_month    (HildonDateEditor *editor);

Gets the month shown in the editor.

editor : the HildonDateEditor widget
Returns : the current month shown in the editor.

hildon_date_editor_get_day ()

guint       hildon_date_editor_get_day      (HildonDateEditor *editor);

Gets the day shown in the editor.

editor : the HildonDateEditor widget
Returns : the current day shown in the editor

Property Details

The "day" property

  "day"                  guint                 : Read / Write

Current day.

Allowed values: [1,31]

Default value: 1


The "max-year" property

  "max-year"             guint                 : Read / Write

Maximum valid year.

Allowed values: [1,10000]

Default value: 2037


The "min-year" property

  "min-year"             guint                 : Read / Write

Minimum valid year.

Allowed values: [1,10000]

Default value: 1970


The "month" property

  "month"                guint                 : Read / Write

Current month.

Allowed values: [1,12]

Default value: 1


The "year" property

  "year"                 guint                 : Read / Write

Current year.

Allowed values: [1,10000]

Default value: 2007

Signal Details

The "date-error" signal

gboolean    user_function                  (HildonDateEditor    *hildondateeditor,
                                            HildonDateTimeError *arg1,
                                            gpointer             user_data)             : Run last

hildondateeditor : the object which received the signal.
arg1 :
user_data : user data set when the signal handler was connected.
Returns :

See Also

HildonCalendarPopup, HildonTimeEditor