#include <Form.h>
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 | |
WContainerWidget * | feedbackMessages_ |
WLineEdit * | nameEdit_ |
WLineEdit * | firstNameEdit_ |
WComboBox * | countryEdit_ |
WComboBox * | cityEdit_ |
WLineEdit * | birthDateEdit_ |
WLineEdit * | childCountEdit_ |
WLineEdit * | weightEdit_ |
WTextArea * | remarksEdit_ |
Shows how a simple form can made, with an emphasis on how to handle validation.
Definition at line 34 of file Form.h.
Form::Form | ( | WContainerWidget * | parent = 0 |
) |
void Form::countryChanged | ( | ) | [private, slot] |
void Form::addValidationStatus | ( | int | row, | |
WFormWidget * | field | |||
) | [private] |
bool Form::validate | ( | ) | [private] |
bool Form::checkValid | ( | WFormWidget * | edit, | |
const WMessage & | text | |||
) | [private] |
WContainerWidget* Form::feedbackMessages_ [private] |
WLineEdit* Form::nameEdit_ [private] |
WLineEdit* Form::firstNameEdit_ [private] |
WComboBox* Form::countryEdit_ [private] |
WComboBox* Form::cityEdit_ [private] |
WLineEdit* Form::birthDateEdit_ [private] |
WLineEdit* Form::childCountEdit_ [private] |
WLineEdit* Form::weightEdit_ [private] |
WTextArea* Form::remarksEdit_ [private] |