FACT++  1.0
QValidator::State SpinBox4ns::validate ( QString &  input,
int &  p 
) const
inline

Definition at line 13 of file SpinBox4ns.h.

14  {
15  const QValidator::State rc = QSpinBox::validate(input, p);
16  if (rc!=QValidator::Acceptable)
17  return rc;
18 
19  const int pf = prefix().length();
20  const int sf = suffix().length();
21  const int len = input.length();
22 
23  return input.mid(pf, len-sf-pf).toUInt()%4==0 ? QValidator::Acceptable : QValidator::Intermediate;
24  }