Gtk2::Ex::DateRange - A simple widget for specifying a range of dates.


Gtk2-Ex-DateRange documentation  | view source Contained in the Gtk2-Ex-DateRange distribution.

Index


NAME

Top

Gtk2::Ex::DateRange - A simple widget for specifying a range of dates. (For example, "before date1 and after date2")

DESCRIPTION

Top

A simple widget for specifying a range of dates. (For example, after '1965-03-12' and before '1989-02-14')

SYNOPSIS

Top

	use Gtk2::Ex::DateRange;
	my $daterange = Gtk2::Ex::DateRange->new;
	$daterange->set_model([ 'after', '1965-03-12', 'and', 'before', '1989-02-14' ]);
	$daterange->signal_connect('changed' =>
		sub {
			print Dumper $daterange->get_model;
		}
	);

METHODS

Top

new;

set_model($model);

The $model is a ref to a list with 5 parameters;

	$daterange->set_model([ 'before', '1965-03-12', 'or', 'after', '1989-02-14' ]);

get_model;

attach_popup_to($parent);

This method returns a Gtk2::Ex::PopupWindow. The popup window will contain a Gtk2::Ex::DateRange widget and two buttons.

to_sql_condition($datefieldname, $model);

Converts the $model into an SQL condition so that it can be used directly in and SQL statement. $datefieldname is the fieldname that will be used inside the SQL condition.

signal_connect($signal, $callback);

See the SIGNALS section to see the supported signals.

SIGNALS

Top

changed;

SEE ALSO

Top

Gtk2::Ex::PopupWindow

COPYRIGHT & LICENSE

Top


Gtk2-Ex-DateRange documentation  | view source Contained in the Gtk2-Ex-DateRange distribution.