/home/koen/project/wt/cvs/wt/examples/form/Form.h

Go to the documentation of this file.
00001 // This may look like C code, but it's really -*- C++ -*-
00002 /*
00003  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00004  *
00005  * See the LICENSE file for terms of use.
00006  */
00007 
00008 #ifndef FORM_H_
00009 #define FORM_H_
00010 
00011 #include <Wt/WTable>
00012 
00013 using namespace Wt;
00014 
00015 namespace Wt {
00016   class WContainerWidget;
00017   class WText;
00018   class WTextArea;
00019   class WLineEdit;
00020   class WComboBox;
00021   class WFormWidget;
00022 }
00023 
00028 
00034 class Form : public WTable
00035 {
00036 public:
00039   Form(WContainerWidget *parent = 0);
00040 
00041 private slots:
00044   void countryChanged();
00045 
00048   void submit(); 
00049 
00050 private:
00051   void createUI();
00052  
00053   WContainerWidget *feedbackMessages_;
00054 
00055   WLineEdit *nameEdit_;
00056   WLineEdit *firstNameEdit_;
00057 
00058   WComboBox *countryEdit_;
00059   WComboBox *cityEdit_;
00060 
00061   WLineEdit *birthDateEdit_;
00062   WLineEdit *childCountEdit_;
00063   WLineEdit *weightEdit_;
00064 
00065   WTextArea *remarksEdit_;
00066 
00069   void addValidationStatus(int row, WFormWidget *field);
00070 
00073   bool validate();
00074 
00080   bool checkValid(WFormWidget *edit, const WMessage& text);
00081 };
00082 
00085 #endif // FORM_H_

Generated on Fri Jul 25 17:05:59 2008 for Wt by doxygen 1.5.3