COPASI API  4.16.103
ChemEqValidator.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2004 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef CHEMEQVAL
16 #define CHEMEQVAL
17 
18 #include <QtGui/QValidator>
19 #include "model/CChemEqInterface.h"
20 
21 class ChemEqValidator : public QValidator
22 {
23 public:
24  ChemEqValidator(QObject * parent)
25  : QValidator(parent)
26  {}
27 
28  virtual State validate(QString & input, int & C_UNUSED(pos)) const
29  {
30  std::string eq = TO_UTF8(input);
31 
33  return Acceptable;
34  else
35  return Intermediate;
36  }
37 };
38 
39 #endif
virtual State validate(QString &input, int &C_UNUSED(pos)) const
#define C_UNUSED(p)
Definition: copasi.h:220
static bool isValidEq(const std::string &eq)
ChemEqValidator(QObject *parent)
#define TO_UTF8(__x)
Definition: qtUtilities.h:74