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

WContainerWidget* Form::feedbackMessages_ [private]

Definition at line 53 of file Form.h.

WLineEdit* Form::nameEdit_ [private]

Definition at line 55 of file Form.h.

WLineEdit* Form::firstNameEdit_ [private]

Definition at line 56 of file Form.h.

WComboBox* Form::countryEdit_ [private]

Definition at line 58 of file Form.h.

WComboBox* Form::cityEdit_ [private]

Definition at line 59 of file Form.h.

WLineEdit* Form::birthDateEdit_ [private]

Definition at line 61 of file Form.h.

WLineEdit* Form::childCountEdit_ [private]

Definition at line 62 of file Form.h.

WLineEdit* Form::weightEdit_ [private]

Definition at line 63 of file Form.h.

WTextArea* Form::remarksEdit_ [private]

Definition at line 65 of file Form.h.


The documentation for this class was generated from the following files:
Generated on Fri Jul 25 17:06:01 2008 for Wt by doxygen 1.5.3