allpy
changeset 42:901ca2aa9375
validators mandatory
author | boris <bnagaev@gmail.com> |
---|---|
date | Wed, 15 Sep 2010 21:28:43 +0400 |
parents | b71e170354f3 |
children | cda84bb3f686 |
files | blocks3d-wt-widget.C |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/blocks3d-wt-widget.C Wed Sep 15 21:25:03 2010 +0400 1.2 +++ b/blocks3d-wt-widget.C Wed Sep 15 21:28:43 2010 +0400 1.3 @@ -47,6 +47,7 @@ 1.4 new Wt::WBreak(this); 1.5 delta_input = new Wt::WLineEdit(Malakite::defaults::delta, this); 1.6 delta_validator = new Wt::WDoubleValidator(0.0, 10.0); // FIXME: not to allow empty 1.7 + delta_validator->setMandatory(true); 1.8 delta_input->setValidator(delta_validator); 1.9 Wt::WLabel *delta_label = new Wt::WLabel("Distance spreading", this); 1.10 delta_label->setBuddy(delta_input); 1.11 @@ -54,6 +55,7 @@ 1.12 new Wt::WBreak(this); 1.13 min_block_width_input = new Wt::WLineEdit(Malakite::defaults::min_block_width, this); 1.14 min_block_width_validator = new Wt::WIntValidator(3, 9999); 1.15 + min_block_width_validator->setMandatory(true); 1.16 min_block_width_input->setValidator(min_block_width_validator); 1.17 Wt::WLabel *min_block_width_label = new Wt::WLabel("Min block width", this); 1.18 min_block_width_label->setBuddy(min_block_width_input); 1.19 @@ -61,6 +63,7 @@ 1.20 new Wt::WBreak(this); 1.21 timeout_input = new Wt::WLineEdit(Malakite::defaults::timeout, this); 1.22 timeout_validator = new Wt::WIntValidator(-1, 30*24*3600); 1.23 + timeout_validator->setMandatory(true); 1.24 timeout_input->setValidator(timeout_validator); 1.25 Wt::WLabel *timeout_label = new Wt::WLabel( 1.26 "Bron-Kerbosh (couple cores) timeout", this); 1.27 @@ -69,6 +72,7 @@ 1.28 new Wt::WBreak(this); 1.29 timeout2_input = new Wt::WLineEdit(Malakite::defaults::timeout2, this); 1.30 timeout2_validator = new Wt::WIntValidator(-1, 30*24*3600); 1.31 + timeout2_validator->setMandatory(true); 1.32 timeout2_input->setValidator(timeout2_validator); 1.33 Wt::WLabel *timeout2_label = new Wt::WLabel( 1.34 "Bron-Kerbosh (blocks) timeout", this);