COPASI API  4.16.103
FunctionWidget1.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) 2002 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef FUNCTION_WIDGET1_H
16 #define FUNCTION_WIDGET1_H
17 
18 #include "copasi/UI/ui_FunctionWidget1.h"
19 
20 class CFunction;
21 
22 template <class CType> class CCopasiVectorN;
23 
24 /*!
25  \brief A widget class for Functions branch
26 
27  This widget shows detailed description of an individual function
28  */
29 class FunctionWidget1 : public CopasiWidget, public Ui::FunctionWidget1
30 {
31  Q_OBJECT
32 
33 public:
34  FunctionWidget1(QWidget *parent, const char * name = 0, Qt::WFlags f = 0);
35  virtual ~FunctionWidget1();
36 
37  virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string & key);
38  virtual bool leave();
39 
40 protected slots:
41  void slotBtnNew();
42  void slotBtnCopy();
43  void slotBtnDelete();
44 
45  virtual void slotFcnDescriptionChanged(bool);
46  virtual void slotReversibilityChanged();
47 
48  void slotTableValueChanged(const QString &);
49 
50 protected:
51  virtual bool enterProtected();
52  bool loadFromFunction(const CFunction* = NULL);
53  bool loadParameterTable();
54  bool loadUsageTable(/*const CCopasiVectorN<CUsageRange>& usages*/);
55  bool loadReversibility(TriLogic rev);
56  void updateApplication();
57  bool saveToFunction();
58  bool copyFunctionContentsToFunction(const CFunction* src, CFunction* target);
59 
61 
63  bool isValid;
65 
67 
68 private:
69  void init();
70 
71  bool mReadOnly;
72 
73  std::string mKeyToCopy;
74 };
75 
76 #endif // FunctionWidget1
bool mIgnoreFcnDescriptionChange
void slotBtnNew()
Slot for being activated wehenver New button is clicked.
virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
Function to update the COPASI widgets.
virtual void slotFcnDescriptionChanged(bool)
Slot for changing the function description.
objectType
A widget class for Functions branch.
bool loadReversibility(TriLogic rev)
TriLogic
Definition: copasi.h:125
FunctionWidget1(QWidget *parent, const char *name=0, Qt::WFlags f=0)
CFunction * mpFunction
bool functionParametersChanged()
virtual ~FunctionWidget1()
Destructor.
void updateApplication()
virtual bool leave()
void slotTableValueChanged(const QString &)
Slot for changing the table value.
virtual void slotReversibilityChanged()
Slot for changing the reversibility of the function.
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
bool loadFromFunction(const CFunction *=NULL)
void slotBtnDelete()
Slot for being activated whenever Delete button is clicked.
virtual bool enterProtected()
std::string mKeyToCopy
bool copyFunctionContentsToFunction(const CFunction *src, CFunction *target)
bool loadUsageTable()
Function to generate the text representation of the usage restrictions.