COPASI API
4.16.103
Main Page
Namespaces
Classes
Files
File List
File Members
copasi
UI
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
32
if
(
CChemEqInterface::isValidEq
(eq))
33
return
Acceptable;
34
else
35
return
Intermediate;
36
}
37
};
38
39
#endif
CChemEqInterface.h
ChemEqValidator::validate
virtual State validate(QString &input, int &C_UNUSED(pos)) const
Definition:
ChemEqValidator.h:28
C_UNUSED
#define C_UNUSED(p)
Definition:
copasi.h:220
CChemEqInterface::isValidEq
static bool isValidEq(const std::string &eq)
Definition:
CChemEqInterface.cpp:756
ChemEqValidator
Definition:
ChemEqValidator.h:21
ChemEqValidator::ChemEqValidator
ChemEqValidator(QObject *parent)
Definition:
ChemEqValidator.h:24
TO_UTF8
#define TO_UTF8(__x)
Definition:
qtUtilities.h:74
Generated on Thu Jul 2 2015 14:50:14 for COPASI API by
1.8.6