Gtk2::Ex::ICal::Recur - A widget for scheduling a recurring


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

Index


NAME

Top

Gtk2::Ex::ICal::Recur - A widget for scheduling a recurring set of 'events' (events in the calendar sense). Like a meeting appointment for example, on all mondays and thursdays for the next 3 months. Kinda like Evolution or Outlook meeting schedule.

DESCRIPTION

Top

SYNOPSIS

Top

	my $recur = Gtk2::Ex::ICal::Recur->new;
	my $model = {
		'dtstart' => { 
			year => 2000,
			month  => 6,
			day    => 20,
		},
		'count' => 17,
		'freq' => 'yearly',
		'interval' => '5',
		'byweekno' => [1, -1],
		'byday' => ['su','fr', 'mo'],
	};
	$recur->set_model($model);

	my $window = Gtk2::Window->new;
	$window->signal_connect(destroy => sub { Gtk2->main_quit; });

	my $vbox = Gtk2::VBox->new(FALSE);
	my $hbox = Gtk2::HBox->new(FALSE);
	my $preview = Gtk2::Button->new_from_stock('gtk-preview');
	$preview->signal_connect('clicked' => 
		sub {
			$recur->update_preview;		
		}
	);

	my $done = Gtk2::Button->new_from_stock('gtk-done');
	$done->signal_connect('clicked' => 
		sub {
			print Dumper $recur->get_model;
		}
	);

METHODS

Top

Gtk2::Ex::ICal::Recur->new()

Accepts no arguments. Returns the object.

Gtk2::Ex::ICal::Recur->set_model($model)

The model is designed based on the the ICal spec. Please look at the DateTime::Event::ICal. The structure of this hash is based on that module.

	my $model = {
		'dtstart' => { 
			year => 2000,
			month  => 6,
			day    => 20,
		},
		'count' => 17,
		'freq' => 'yearly',
		'interval' => '5',
		'byweekno' => [1, -1],
		'byday' => ['su','fr', 'mo'],
	};
	$recur->set_model($model);




Gtk2::Ex::ICal::Recur->get_model()

Returns a model as described in the section above.

Gtk2::Ex::ICal::Recur->update_preview()

This method retrieves the model and sends it to an instance of DateTime::Event::ICal internally and gets a list of dates. The list is then displayed in a listview.

AUTHOR

Top

Ofey Aikon, <ofey.aikon at gmail dot com>

BUGS

Top

You tell me. Send me an email !

ACKNOWLEDGEMENTS

Top

To the wonderful gtk-perl-list.

COPYRIGHT & LICENSE

Top

SEE ALSO

Top

DateTime::Event::ICal


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