Form Class Reference
[Form example]

A simple Form. More...

#include <Form.h>

Inheritance diagram for Form:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 Form (WContainerWidget *parent=0)
 Instantiate a new form.

Private Slots

void countryChanged ()
 The user selected a new country: adjust the cities combo box.
void submit ()
 Submit the form.

Private Member Functions

void createUI ()
void addValidationStatus (int row, WFormWidget *field)
 Add a validation feedback for a field.
bool validate ()
 Validate the form, and return whether succesfull.
bool checkValid (WFormWidget *edit, const WMessage &text)
 Validate a single form field.

Private Attributes

WContainerWidgetfeedbackMessages_
WLineEditnameEdit_
WLineEditfirstNameEdit_
WComboBoxcountryEdit_
WComboBoxcityEdit_
WLineEditbirthDateEdit_
WLineEditchildCountEdit_
WLineEditweightEdit_
WTextArearemarksEdit_


Detailed Description

A simple Form.

Shows how a simple form can made, with an emphasis on how to handle validation.

Definition at line 34 of file Form.h.


Constructor & Destructor Documentation

Form::Form ( WContainerWidget parent = 0  ) 

Instantiate a new form.

Definition at line 20 of file Form.C.


Member Function Documentation

void Form::countryChanged (  )  [private, slot]

The user selected a new country: adjust the cities combo box.

Definition at line 131 of file Form.C.

void Form::submit (  )  [private, slot]

Submit the form.

Definition at line 199 of file Form.C.

void Form::createUI (  )  [private]

Definition at line 26 of file Form.C.

void Form::addValidationStatus ( int  row,
WFormWidget field 
) [private]

Add a validation feedback for a field.

bool Form::validate (  )  [private]

Validate the form, and return whether succesfull.

Definition at line 182 of file Form.C.

bool Form::checkValid ( WFormWidget edit,
const WMessage &  text 
) [private]

Validate a single form field.

Checks the given field, and appends the given text to the error messages on problems.

Definition at line 165 of file Form.C.


Member Data Documentation

Definition at line 53 of file Form.h.

Definition at line 55 of file Form.h.

Definition at line 56 of file Form.h.

Definition at line 58 of file Form.h.

Definition at line 59 of file Form.h.

Definition at line 61 of file Form.h.

Definition at line 62 of file Form.h.

Definition at line 63 of file Form.h.

Definition at line 65 of file Form.h.


The documentation for this class was generated from the following files:

Generated on Fri Sep 12 16:53:53 2008 for Wt by doxygen 1.5.6