Maeomm Reference Documentation: hildonsmm
Main Page   Namespaces   Book  

Hildon::TimeEditor Class Reference
[Widgets]

Inheritance diagram for Hildon::TimeEditor:

Inheritance graph
[legend]
List of all members.

Detailed Description

Hildon::TimeEditor is used to edit time or duration.

Time mode is restricted to the normal 24 hour cycle, but Duration mode can select any amount of time up to 99 hours. It consists of entries for hours, minutes and seconds, and a pm/am indicator as well as a button which pops up a Hildon::TimePicker dialog.


Public Member Functions

guint get_duration_max () const
 This function returns the longest duration the Hildon::TimeEditor allows in the duration mode.
guint get_duration_min () const
 This function returns the smallest duration the Hildon::TimeEditor allows in the duration mode.
bool get_duration_mode () const
 This function returns a boolean indicating whether the Hildon::TimeEditor is in the duration mode.
void get_duration_range (guint& min_seconds, guint& max_seconds) const
 Gets the duration editor time range of the Hildon::TimeEditor widget.
bool get_show_hours () const
 This function returns a boolean indicating the visibility of hours in the HildonTimeEditor.
bool get_show_seconds () const
 This function returns a boolean indicating the visibility of seconds in the Hildon::TimeEditor.
guint get_ticks () const
 This function returns the current duration, in seconds.
void get_time (guint& hours, guint& minutes, guint& seconds) const
 Gets the time of the Hildon::TimeEditor widget.
const HildonTimeEditor* gobj () const
 Provides access to the underlying C GtkObject.
HildonTimeEditor* gobj ()
 Provides access to the underlying C GtkObject.
void set_duration_max (guint duration_max)
 Sets the maximum allowed duration in seconds for the duration mode.
void set_duration_min (guint duration_min)
 Sets the minimum allowed duration for the duration mode.
void set_duration_mode (bool duration_mode=true)
 This function sets the duration editor mode in which the maximum hours is 99.
void set_duration_range (guint min_seconds, guint max_seconds)
 Sets the duration editor time range of the Hildon::TimeEditor widget.
void set_show_hours (bool enable=true)
 This function shows or hides the hours field.
void set_show_seconds (bool show_seconds=true)
 This function shows or hides the seconds field.
void set_ticks (guint ticks)
 Sets the current duration in seconds.
void set_time (guint hours, guint minutes, guint seconds)
 This function sets the time on an existing time editor.
Glib::SignalProxy1< bool,
DateTimeError
signal_time_error ()
 
Prototype:
bool time_error(DateTimeError type)

 TimeEditor ()
virtual ~TimeEditor ()

Related Functions

(Note that these are not member functions.)

Hildon::TimeEditorwrap (HildonTimeEditor* object, bool take_copy=false)
 
Parameters:
object The C instance


Constructor & Destructor Documentation

virtual Hildon::TimeEditor::~TimeEditor (  )  [virtual]

Hildon::TimeEditor::TimeEditor (  ) 


Member Function Documentation

guint Hildon::TimeEditor::get_duration_max (  )  const

This function returns the longest duration the Hildon::TimeEditor allows in the duration mode.

Returns:
Maximum allowed duration in seconds.

guint Hildon::TimeEditor::get_duration_min (  )  const

This function returns the smallest duration the Hildon::TimeEditor allows in the duration mode.

Returns:
Minimum allowed duration in seconds.

bool Hildon::TimeEditor::get_duration_mode (  )  const

This function returns a boolean indicating whether the Hildon::TimeEditor is in the duration mode.

Returns:
true if the Hildon::TimeEditor is in duration mode.

void Hildon::TimeEditor::get_duration_range ( guint &  min_seconds,
guint &  max_seconds 
) const

Gets the duration editor time range of the Hildon::TimeEditor widget.

Parameters:
min_seconds Pointer to unsigned int.
max_seconds Pointer to unsigned int.

bool Hildon::TimeEditor::get_show_hours (  )  const

This function returns a boolean indicating the visibility of hours in the HildonTimeEditor.

Returns:
true if hours are visible.

bool Hildon::TimeEditor::get_show_seconds (  )  const

This function returns a boolean indicating the visibility of seconds in the Hildon::TimeEditor.

Returns:
true if the seconds are visible.

guint Hildon::TimeEditor::get_ticks (  )  const

This function returns the current duration, in seconds.

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

Returns:
Current duration in seconds.

void Hildon::TimeEditor::get_time ( guint &  hours,
guint &  minutes,
guint &  seconds 
) const

Gets the time of the Hildon::TimeEditor widget.

The time returned is always in 24h format.

Parameters:
hours Hours.
minutes Minutes.
seconds Seconds.

const HildonTimeEditor* Hildon::TimeEditor::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

HildonTimeEditor* Hildon::TimeEditor::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

void Hildon::TimeEditor::set_duration_max ( guint  duration_max  ) 

Sets the maximum allowed duration in seconds for the duration mode.

Note:
Has no effect in time mode
Parameters:
duration_max Maximum allowed duration in seconds.

void Hildon::TimeEditor::set_duration_min ( guint  duration_min  ) 

Sets the minimum allowed duration for the duration mode.

Note:
Has no effect in time mode
Parameters:
duration_min Mimimum allowed duration.

void Hildon::TimeEditor::set_duration_mode ( bool  duration_mode = true  ) 

This function sets the duration editor mode in which the maximum hours is 99.

Parameters:
duration_mode Enable or disable duration editor mode.

void Hildon::TimeEditor::set_duration_range ( guint  min_seconds,
guint  max_seconds 
)

Sets the duration editor time range of the Hildon::TimeEditor widget.

Parameters:
min_seconds Minimum allowed time in seconds.
max_seconds Maximum allowed time in seconds.

void Hildon::TimeEditor::set_show_hours ( bool  enable = true  ) 

This function shows or hides the hours field.

Parameters:
show_hours Enable or disable showing of hours.

void Hildon::TimeEditor::set_show_seconds ( bool  show_seconds = true  ) 

This function shows or hides the seconds field.

Parameters:
show_seconds Enable or disable showing of seconds.

void Hildon::TimeEditor::set_ticks ( guint  ticks  ) 

Sets the current duration in seconds.

This means seconds from midnight, if not in duration mode. In case of any errors, it tries to fix it.

Parameters:
ticks The duration to set, in seconds.

void Hildon::TimeEditor::set_time ( guint  hours,
guint  minutes,
guint  seconds 
)

This function sets the time on an existing time editor.

If the time specified by the arguments is invalid, it's fixed. The time is assumed to be in 24h format.

Parameters:
hours Hours.
minutes Minutes.
seconds Seconds.

Glib::SignalProxy1<bool,DateTimeError> Hildon::TimeEditor::signal_time_error (  ) 

Prototype:
bool time_error(DateTimeError type)


Friends And Related Function Documentation

Hildon::TimeEditor* wrap ( HildonTimeEditor *  object,
bool  take_copy = false 
) [related]

Parameters:
object The C instance

Parameters:
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for hildonmm by Doxygen 1.5.1 © 1997-2001