COPASI API  4.16.103
Public Member Functions | Protected Attributes | Private Slots | Private Member Functions | List of all members
CScanWidgetTask Class Reference

#include <CScanWidgetTask.h>

Inheritance diagram for CScanWidgetTask:
Inheritance graph
[legend]
Collaboration diagram for CScanWidgetTask:
Collaboration graph
[legend]

Public Member Functions

 CScanWidgetTask (QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=0)
 
virtual void load (const CScanProblem *pg)
 
virtual bool save (CScanProblem *pg) const
 
 ~CScanWidgetTask ()
 

Protected Attributes

const CModelmpModel
 
CCopasiObjectmpObject
 

Private Slots

virtual void typeChanged (int n)
 

Private Member Functions

void init ()
 

Detailed Description

Definition at line 30 of file CScanWidgetTask.h.

Constructor & Destructor Documentation

CScanWidgetTask::CScanWidgetTask ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WindowFlags  fl = 0 
)

Definition at line 32 of file CScanWidgetTask.cpp.

32  :
33  QWidget(parent, f),
34  mpObject(NULL),
35  mpModel(NULL)
36 
37 {
38  setObjectName(QString::fromUtf8(name));
39  setupUi(this);
40 }
const CModel * mpModel
CCopasiObject * mpObject
CScanWidgetTask::~CScanWidgetTask ( )

Definition at line 45 of file CScanWidgetTask.cpp.

46 {
47  // no need to delete child widgets, Qt does it all for us
48 }

Member Function Documentation

void CScanWidgetTask::init ( )
private

Definition at line 50 of file CScanWidgetTask.cpp.

51 {}
void CScanWidgetTask::load ( const CScanProblem pg)
virtual

Definition at line 54 of file CScanWidgetTask.cpp.

References CCopasiTask::crosssection, CScanProblem::getContinueFromCurrentState(), CScanProblem::getOutputInSubtask(), CScanProblem::getSubtask(), CCopasiTask::lna, CCopasiTask::lyap, CCopasiTask::mca, CCopasiTask::optimization, CCopasiTask::parameterFitting, CCopasiTask::sens, CCopasiTask::steadyState, CCopasiTask::timeCourse, and CCopasiTask::tssAnalysis.

Referenced by ScanWidget::loadTask().

55 {
56  CCopasiTask::Type type = pg->getSubtask();
57  int n;
58 
59  switch (type)
60  {
62  n = 0;
63  break;
64 
66  n = 1;
67  break;
68 
69  case CCopasiTask::mca:
70  n = 2;
71  break;
72 
73  case CCopasiTask::lyap:
74  n = 3;
75  break;
76 
78  n = 4;
79  break;
80 
82  n = 5;
83  break;
84 
85  case CCopasiTask::sens:
86  n = 6;
87  break;
88 
89  case CCopasiTask::lna:
90  n = 7;
91  break;
92 
94  n = 8;
95  break;
96 
98  n = 9;
99  break;
100 
101  default:
102  n = 0;
103  break;
104  }
105 
106  comboType->setCurrentIndex(n);
107 
108  mpCheckContinue->setChecked(pg->getContinueFromCurrentState());
109 
110  checkOutput->setChecked(pg->getOutputInSubtask());
111 
112  return;
113 }
bool getContinueFromCurrentState() const
const bool & getOutputInSubtask() const
CCopasiTask::Type getSubtask() const
bool CScanWidgetTask::save ( CScanProblem pg) const
virtual

Definition at line 116 of file CScanWidgetTask.cpp.

References CCopasiTask::crosssection, CScanProblem::getContinueFromCurrentState(), CScanProblem::getOutputInSubtask(), CScanProblem::getSubtask(), CCopasiTask::lna, CCopasiTask::lyap, CCopasiTask::mca, CCopasiTask::optimization, CCopasiTask::parameterFitting, CCopasiTask::sens, CScanProblem::setContinueFromCurrentState(), CScanProblem::setOutputInSubtask(), CScanProblem::setSubtask(), CCopasiTask::steadyState, CCopasiTask::timeCourse, and CCopasiTask::tssAnalysis.

Referenced by ScanWidget::saveTask().

117 {
118  bool changed = false;
119  int type = comboType->currentIndex();
120 
121  CCopasiTask::Type Type;
122 
123  switch (type)
124  {
125  case 0:
127  break;
128 
129  case 1:
131  break;
132 
133  case 2:
134  Type = CCopasiTask::mca;
135  break;
136 
137  case 3:
138  Type = CCopasiTask::lyap;
139  break;
140 
141  case 4:
143  break;
144 
145  case 5:
147  break;
148 
149  case 6:
150  Type = CCopasiTask::sens;
151  break;
152 
153  case 7:
154  Type = CCopasiTask::lna;
155  break;
156 
157  case 8:
159  break;
160 
161  case 9:
163  break;
164 
165  default :
167  break;
168  }
169 
170  if (Type != pg->getSubtask())
171  {
172  pg->setSubtask(Type);
173  changed = true;
174  }
175 
176  if (pg->getContinueFromCurrentState() != mpCheckContinue->isChecked())
177  {
178  pg->setContinueFromCurrentState(mpCheckContinue->isChecked());
179  changed = true;
180  }
181 
182  if (pg->getOutputInSubtask() != checkOutput->isChecked())
183  {
184  pg->setOutputInSubtask(checkOutput->isChecked());
185  changed = true;
186  }
187 
188  return changed;
189 }
void setSubtask(CCopasiTask::Type type)
void setContinueFromCurrentState(bool aic)
bool getContinueFromCurrentState() const
void setOutputInSubtask(bool ois)
const bool & getOutputInSubtask() const
CCopasiTask::Type getSubtask() const
void CScanWidgetTask::typeChanged ( int  n)
privatevirtualslot

Definition at line 191 of file CScanWidgetTask.cpp.

192 {
193  switch (n)
194  {
195  case 1:
196  case 8:
197  checkOutput->setChecked(true);
198  break;
199 
200  default:
201  checkOutput->setChecked(false);
202  break;
203  }
204 }

Member Data Documentation

const CModel* CScanWidgetTask::mpModel
protected

Definition at line 43 of file CScanWidgetTask.h.

CCopasiObject* CScanWidgetTask::mpObject
protected

Definition at line 42 of file CScanWidgetTask.h.


The documentation for this class was generated from the following files: