COPASI API  4.16.103
CQFittingItemWidget.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) 2005 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 #ifndef CQFITTINGITEMWIDGET_H
16 #define CQFITTINGITEMWIDGET_H
17 
18 #include <QtCore/QVariant>
19 
20 #include "copasi/UI/ui_CQFittingItemWidget.h"
21 
22 #include <QtGui/QHBoxLayout>
23 #include <QtGui/QGridLayout>
24 #include <QtGui/QVBoxLayout>
25 
26 #include <QtGui/QLabel>
27 #include <QtGui/QPixmap>
28 
29 class CCopasiDataModel;
31 class COptItem;
32 class CCopasiObject;
33 class CCopasiObjectName;
34 class CQValidatorBound;
36 class QColor;
37 class CExperimentSet;
40 
41 class CQFittingItemWidget : public QWidget, public Ui::CQFittingItemWidget
42 {
43  Q_OBJECT
44 
45 public:
46  CQFittingItemWidget(QWidget * parent = 0, Qt::WindowFlags f = 0);
48 
50 
51  virtual bool load(CCopasiDataModel * pDataModel,
52  CCopasiParameterGroup * pItems,
53  const std::map<std::string, std::string> * pExperimentMap,
54  const std::map<std::string, std::string> * pCrossValidationMap);
55  virtual bool save(const std::map<std::string, std::string> * pExperimentMap,
56  const std::map<std::string, std::string> * pCrossValidationMap);
57  void setItemType(const ItemType & type);
58  void setExperimentSet(const CExperimentSet * & pExperimentSet);
59  void setCrossValidationSet(const CCrossValidationSet * & pCrossValidationSet);
60 
61 signals:
62  void numberChanged(int);
63 
64 protected:
67  std::set< size_t > mSelection;
68  size_t mCurrentRow;
69  std::vector< COptItem * > * mpItemsCopy;
71  QColor mChangedColor;
72  QColor mSavedColor;
83 
84 protected slots:
85 
86 private:
87  void init();
88  void destroy();
89  void setTableText(const int & row, const COptItem * pItem);
90  size_t currentRow();
91  void loadSelection();
92  void saveSelection();
93  void selectRow(const size_t & row);
94  void setItemSelection(const std::set<size_t> & selection);
95 
96 private slots:
97  void slotCheckLowerInf(bool checked);
98  void slotCheckUpperInf(bool checked);
99  void slotLowerEdit();
100  void slotUpperEdit();
101  void slotParamEdit();
102  void slotExperiments();
103  void slotExperimentChanged();
104  void slotDelete();
105  void slotCopy();
106  void slotUp();
107  void slotDown();
109  void slotNew();
110  void slotSelectionChanged();
111  void slotLowerLostFocus();
112  void slotUpperLostFocus();
113  void slotReset();
114  void slotStartLostFocus();
115  void slotCrossValidations();
117  void slotCheckAllCrossValidations(bool checked);
118  void slotCheckAllExperiments(bool checked);
119 };
120 
121 #endif // CQFITTINGITEMWIDGET_H
void setItemType(const ItemType &type)
void numberChanged(int)
std::set< size_t > mSelection
void setExperimentSet(const CExperimentSet *&pExperimentSet)
std::vector< COptItem * > * mpItemsCopy
virtual bool save(const std::map< std::string, std::string > *pExperimentMap, const std::map< std::string, std::string > *pCrossValidationMap)
CQValidatorBound * mpLowerValidator
void setTableText(const int &row, const COptItem *pItem)
const CCopasiObject * mpUpperObject
CQValidatorBound * mpUpperValidator
void slotCheckLowerInf(bool checked)
const CCopasiObject * mpLowerObject
void slotCheckUpperInf(bool checked)
void setItemSelection(const std::set< size_t > &selection)
void slotCheckAllCrossValidations(bool checked)
const CExperimentSet ** mppExperimentSet
CQFittingItemWidget(QWidget *parent=0, Qt::WindowFlags f=0)
const CCrossValidationSet ** mppCrossValidationSet
const CCopasiDataModel * mpDataModel
CCopasiObjectName * mpObjectCN
void selectRow(const size_t &row)
virtual bool load(CCopasiDataModel *pDataModel, CCopasiParameterGroup *pItems, const std::map< std::string, std::string > *pExperimentMap, const std::map< std::string, std::string > *pCrossValidationMap)
CCopasiParameterGroup * mpItems
CQValidatorNotEmpty * mpObjectValidator
void slotCheckAllExperiments(bool checked)
void setCrossValidationSet(const CCrossValidationSet *&pCrossValidationSet)