Gtk2::Ex::NumberRange - A simple widget for specifying a number range.


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

Index


NAME

Top

Gtk2::Ex::NumberRange - A simple widget for specifying a number range. (For example, "> 10 and <= 20")

DESCRIPTION

Top

A simple widget for specifying a number range. (For example, "> 10 and <= 20")

SYNOPSIS

Top

	use Gtk2::Ex::NumberRange;
	my $numberrange = Gtk2::Ex::NumberRange->new;
	$numberrange->set_model(['>', 10, 'and', '<=', 20]);
	$numberrange->signal_connect('changed' =>
		sub {
			print Dumper $numberrange->get_model;
		}
	);

METHODS

Top

new;

set_model($model);

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

	$numberrange->set_model(['>', 10, 'and', '<=', 20]);

Will also accept a list with 2 parameters.

	$numberrange->set_model(['>', 10]);

get_model;

Returns the model.

attach_popup_to($parent);

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

to_sql_condition($numberfieldname, $model);

Converts the $model into an SQL condition so that it can be used directly in and SQL statement. $numberfieldname 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-NumberRange documentation  | view source Contained in the Gtk2-Ex-NumberRange distribution.