NAME
QWizard::API - Generate questions using an API.
SYNOPSIS
use QWizard::API;
my $primaries =
(
qw_primary('aprim', 'My title', 'An introduction',
[ qw_text('textresult', 'Enter something'),
qw_checkbox('checkresult', 'display results?', 1, 0)]);
# ...
);
DESCRIPTION
QWizard::API is a wrapper around generating questions for use within a QWizard question set. Functionally, the only reason for doing this is to use an API instead of hand-encoding HASH and ARRAY structures. The result might be slightly less verbose, however, since the tags can be left off (I.E, name => 'something' becomes just 'something').
API
All of the APIs mentioned here take additional arguments at the end which can be other hash pairs passed to the created objects beyond the defaults that the APIs create.
Primary creation To create a primary: qw_primary(name, title, introduction, [questions], [post_answers], [actions])
Widget creation
Text entry: qw_text(name, question text); qw_textbox(name, question text);
Chekboxes: qw_checkbox(name, question text, optional:onval, optional:offval);
Menus/radios: qw_menu(name, question text, [values] | {labels}); qw_radio(name, question text, [values] | {labels});
Labels: qw_label(lefttext, righttext); qw_paragraph(lefttext, rightparagraph);
Hidden vars: qw_hidden(name, value);
Buttons: qw_button(name, question text, clicked value, button label);
TODO
OO interface.
EXPORT
qw_primary
qw_text
qw_textbox
qw_checkbox
qw_radio
qw_menu
AUTHOR
Wes Hardaker <hardaker@tislabs.com>
SEE ALSO
perl(1).