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

#include <SensitivitiesWidget.h>

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

Public Member Functions

virtual bool runTask ()
 
 SensitivitiesWidget (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
 
 ~SensitivitiesWidget ()
 
- Public Member Functions inherited from TaskWidget
CCopasiTaskgetTask ()
 
virtual bool leave ()
 
 TaskWidget (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
 
virtual bool update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
 
 ~TaskWidget ()
 
- Public Member Functions inherited from CopasiWidget
 CopasiWidget (QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
 
bool enter (const std::string &key)
 
CCopasiDataModelgetDataModel ()
 
bool getIgnoreUpdates ()
 
virtual void setFramework (int framework)
 
void setIgnoreUpdates (bool v)
 

Protected Member Functions

virtual CCopasiMethodcreateMethod (const CCopasiMethod::SubType &type)
 
virtual bool loadTask ()
 
virtual bool saveTask ()
 
virtual bool taskFinishedEvent ()
 
- Protected Member Functions inherited from TaskWidget
bool commonAfterRunTask ()
 
bool commonBeforeRunTask ()
 
bool commonRunTask ()
 
virtual bool enterProtected ()
 
void finishTask ()
 
bool loadCommon ()
 
bool loadMethod ()
 
bool saveCommon ()
 
bool saveMethod ()
 

Private Slots

void slotChooseFunction (int)
 
void slotChooseSingleFunction ()
 
void slotChooseSingleVariable ()
 
void slotChooseSingleVariable2 ()
 
void slotChooseSubTask (int)
 
void slotChooseVariable (int)
 
void slotChooseVariable2 (int)
 

Private Member Functions

void init ()
 
void initCombos ()
 
void updateAllLineditEnable ()
 
void updateComboBoxes (CSensProblem::SubTaskType type)
 
void updateLineeditEnable (const SensWidgetComboBox *box, QWidget *w1, QWidget *w2)
 

Private Attributes

const CCopasiObjectmpSingleFunction
 
const CCopasiObjectmpSingleVariable
 
const CCopasiObjectmpSingleVariable2
 

Additional Inherited Members

- Public Slots inherited from TaskWidget
void adjustTable ()
 
void slotFinishThread ()
 
- Protected Slots inherited from TaskWidget
void assistantBtnClicked ()
 
void reportBtnClicked ()
 
void revertBtnClicked ()
 
void runBtnClicked ()
 
- Protected Slots inherited from CopasiWidget
virtual bool protectedNotify (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="")
 
- Protected Attributes inherited from TaskWidget
bool mChanged
 
CQTaskBtnWidgetmpBtnWidget
 
CQTaskHeaderWidgetmpHeaderWidget
 
CCopasiMethodmpMethod
 
QGridLayout * mpMethodLayout
 
CQTaskMethodWidgetmpMethodWidget
 
CProgressBarmProgressBar
 
QSpacerItem * mpSpacer1
 
QSpacerItem * mpSpacer2
 
CCopasiTaskmpTask
 
CQTaskThreadmpTaskThread
 
- Protected Attributes inherited from CopasiWidget
int mFramework
 
bool mIgnoreUpdates
 
std::string mKey
 
CCopasiDataModelmpDataModel
 
ListViewsmpListView
 
CCopasiObjectmpObject
 

Detailed Description

Definition at line 31 of file SensitivitiesWidget.h.

Constructor & Destructor Documentation

SensitivitiesWidget::SensitivitiesWidget ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WFlags  fl = 0 
)
explicit

Constructs a SensitivitiesWidget which is a child of 'parent', with the name 'name' and widget flags set to 'f'.

Definition at line 44 of file SensitivitiesWidget.cpp.

References init().

45  : TaskWidget(parent, name, fl),
46  mpSingleFunction(NULL),
47  mpSingleVariable(NULL),
48  mpSingleVariable2(NULL)
49 {
50  setupUi(this);
51 
52  init();
53  retranslateUi(this);
54 }
const CCopasiObject * mpSingleFunction
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
const CCopasiObject * mpSingleVariable
const CCopasiObject * mpSingleVariable2
TaskWidget(QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
Definition: TaskWidget.cpp:52
SensitivitiesWidget::~SensitivitiesWidget ( )

Definition at line 59 of file SensitivitiesWidget.cpp.

60 {}

Member Function Documentation

CCopasiMethod * SensitivitiesWidget::createMethod ( const CCopasiMethod::SubType type)
protectedvirtual

Implements TaskWidget.

Definition at line 175 of file SensitivitiesWidget.cpp.

References CSensMethod::createMethod().

176 {return CSensMethod::createMethod(type);}
static CSensMethod * createMethod(CCopasiMethod::SubType subType=CCopasiMethod::sensMethod)
Definition: CSensMethod.cpp:34
void SensitivitiesWidget::init ( )
private

Definition at line 62 of file SensitivitiesWidget.cpp.

References CQIconResource::copasi, CQIconResource::icon(), initCombos(), TaskWidget::mpBtnWidget, TaskWidget::mpHeaderWidget, TaskWidget::mpMethodWidget, CQTaskHeaderWidget::setTaskName(), and CQTaskMethodWidget::showMethodParameters().

Referenced by SensitivitiesWidget().

63 {
64  mpHeaderWidget->setTaskName("Sensitivities");
65 
66  verticalLayout->insertWidget(0, mpHeaderWidget); // header
67  // verticalLayout->insertSpacing(1, 14); // space between header and body
68 
70  verticalLayout->addWidget(mpMethodWidget);
71 
72  verticalLayout->addWidget(mpBtnWidget); // 'footer'
73 
74  // icons
75  SingleFunctionChooser->setIcon(CQIconResource::icon(CQIconResource::copasi));
76  SingleVariableChooser->setIcon(CQIconResource::icon(CQIconResource::copasi));
77  SingleVariable2Chooser->setIcon(CQIconResource::icon(CQIconResource::copasi));
78 
79  // initialization
80  initCombos();
81 }
bool setTaskName(const std::string &name)
static const QIcon & icon(const IconID &id)
void showMethodParameters(const bool &show)
CQTaskMethodWidget * mpMethodWidget
Definition: TaskWidget.h:123
CQTaskBtnWidget * mpBtnWidget
Definition: TaskWidget.h:124
CQTaskHeaderWidget * mpHeaderWidget
Definition: TaskWidget.h:122
void SensitivitiesWidget::initCombos ( )
private

Definition at line 329 of file SensitivitiesWidget.cpp.

References FROM_UTF8, CSensProblem::SubTaskName, and updateComboBoxes().

Referenced by init().

330 {
331  QStringList StringList;
332  //std::vector<int> mFunctionIndexTable, mVariableIndexTable;
333 
334  // SubTaskChooser combo
335  int i = 0;
336 
337  while (CSensProblem::SubTaskName[i].length() > 0)
338  {
339  StringList.append(FROM_UTF8(CSensProblem::SubTaskName[i]));
340  ++i;
341  }
342 
343  SubTaskChooser->insertItems(SubTaskChooser->count(), StringList);
344  SubTaskChooser->setCurrentIndex(0);
346 }
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
static const std::string SubTaskName[]
Definition: CSensProblem.h:82
void updateComboBoxes(CSensProblem::SubTaskType type)
bool SensitivitiesWidget::loadTask ( )
protectedvirtual

Implements TaskWidget.

Definition at line 206 of file SensitivitiesWidget.cpp.

References CObjectLists::EMPTY_LIST, FROM_UTF8, CKeyFactory::get(), CCopasiRootContainer::getDatamodelList(), CCopasiDataModel::getDataObject(), CCopasiRootContainer::getKeyFactory(), CSensProblem::getNumberOfVariables(), CCopasiObject::getObjectDisplayName(), CCopasiTask::getProblem(), CSensProblem::getSubTaskType(), CSensProblem::getTargetFunctions(), CSensProblem::getVariables(), TaskWidget::loadCommon(), TaskWidget::loadMethod(), TaskWidget::mChanged, CopasiWidget::mKey, mpSingleFunction, mpSingleVariable, mpSingleVariable2, CObjectLists::SINGLE_OBJECT, updateAllLineditEnable(), and updateComboBoxes().

207 {
208  loadCommon();
209  loadMethod();
210 
211  CSensTask* sensTask =
213  assert(sensTask);
214 
215  CSensProblem* problem =
216  dynamic_cast<CSensProblem *>(sensTask->getProblem());
217  assert(problem);
218 
219  //CSensMethod* method =
220  // dynamic_cast<CSensMethod *>(sensTask->getMethod());
221  //assert(method);
222 
223  //mSubTaskType = problem->getSubTaskType();
224  SubTaskChooser->setCurrentIndex((int)problem->getSubTaskType());
225  updateComboBoxes(problem->getSubTaskType());
226 
227  CSensItem tmp = problem->getTargetFunctions();
228 
229  //target function
230  assert(CCopasiRootContainer::getDatamodelList()->size() > 0);
232  assert(pDataModel != NULL);
233 
234  if (tmp.isSingleObject())
235  {
236  FunctionChooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
237  mpSingleFunction = pDataModel->getDataObject(tmp.getSingleObjectCN());
238 
239  if (mpSingleFunction)
240  FunctionLineEdit->setText(FROM_UTF8(mpSingleFunction->getObjectDisplayName()));
241  }
242  else
243  {
244  mpSingleFunction = NULL;
245  FunctionChooser->setCurrentObjectList(tmp.getListType());
246  }
247 
248  //variables 1
249  if (problem->getNumberOfVariables() > 0)
250  {
251  tmp = problem->getVariables(0);
252 
253  if (tmp.isSingleObject())
254  {
255  VariableChooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
256  mpSingleVariable = pDataModel->getDataObject(tmp.getSingleObjectCN());
257 
258  if (mpSingleVariable)
259  VariableLineEdit->setText(FROM_UTF8(mpSingleVariable->getObjectDisplayName()));
260  }
261  else
262  VariableChooser->setCurrentObjectList(tmp.getListType());
263  }
264  else
265  {
266  VariableChooser->setCurrentObjectList(CObjectLists::EMPTY_LIST);
267  mpSingleVariable = NULL;
268  }
269 
270  //variables 2
271  if (problem->getNumberOfVariables() > 1)
272  {
273  tmp = problem->getVariables(1);
274 
275  if (tmp.isSingleObject())
276  {
277  Variable2Chooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
278  mpSingleVariable2 = pDataModel->getDataObject(tmp.getSingleObjectCN());
279 
280  if (mpSingleVariable2)
281  Variable2LineEdit->setText(FROM_UTF8(mpSingleVariable2->getObjectDisplayName()));
282  }
283  else
284  Variable2Chooser->setCurrentObjectList(tmp.getListType());
285  }
286  else
287  {
288  Variable2Chooser->setCurrentObjectList(CObjectLists::EMPTY_LIST);
289  mpSingleVariable2 = NULL;
290  }
291 
292  // initCombos(problem);
293 
294  mChanged = false;
295 
297  return true;
298 }
CCopasiObject * getDataObject(const CCopasiObjectName &CN) const
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
size_t getNumberOfVariables() const
CCopasiProblem * getProblem()
bool loadCommon()
Definition: TaskWidget.cpp:247
CSensItem getVariables(size_t index) const
CCopasiObject * get(const std::string &key)
bool loadMethod()
Definition: TaskWidget.cpp:284
CSensProblem::SubTaskType getSubTaskType() const
bool mChanged
Definition: TaskWidget.h:133
void updateComboBoxes(CSensProblem::SubTaskType type)
CSensItem getTargetFunctions() const
const CCopasiObject * mpSingleFunction
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
static CKeyFactory * getKeyFactory()
const CCopasiObject * mpSingleVariable
std::string mKey
Definition: copasiWidget.h:63
const CCopasiObject * mpSingleVariable2
bool SensitivitiesWidget::runTask ( )
virtual

Implements TaskWidget.

Definition at line 178 of file SensitivitiesWidget.cpp.

References TaskWidget::commonBeforeRunTask(), TaskWidget::commonRunTask(), and CObjectLists::SINGLE_OBJECT.

179 {
180  if (FunctionChooser->getCurrentObjectList() != CObjectLists::SINGLE_OBJECT)
181  FunctionLineEdit->setText(QApplication::translate("SensitivitiesWidget", "[Please Choose Object.] --->", 0, QApplication::UnicodeUTF8));
182 
183  if (!commonBeforeRunTask()) return false;
184 
185  bool success = true;
186 
187  if (!commonRunTask()) success = false;
188 
189  return success;
190 }
bool commonRunTask()
Definition: TaskWidget.cpp:395
bool commonBeforeRunTask()
Definition: TaskWidget.cpp:317
bool SensitivitiesWidget::saveTask ( )
protectedvirtual

Implements TaskWidget.

Definition at line 83 of file SensitivitiesWidget.cpp.

References CSensProblem::addVariables(), CCopasiDataModel::changed(), CSensProblem::changeTargetFunctions(), CObjectLists::EMPTY_LIST, CKeyFactory::get(), CCopasiObject::getCN(), CCopasiRootContainer::getKeyFactory(), CSensItem::getListType(), CCopasiTask::getMethod(), CCopasiTask::getProblem(), TaskWidget::mChanged, CopasiWidget::mKey, CopasiWidget::mpDataModel, mpSingleFunction, mpSingleVariable, mpSingleVariable2, CSensProblem::removeVariables(), TaskWidget::saveCommon(), TaskWidget::saveMethod(), CSensItem::setListType(), CSensItem::setSingleObjectCN(), CSensProblem::setSubTaskType(), and CObjectLists::SINGLE_OBJECT.

84 {
85  saveCommon();
86  saveMethod();
87 
88  CSensTask* sensTask =
90 
91  if (sensTask == NULL)
92  return false;
93 
94  CSensProblem* problem =
95  dynamic_cast<CSensProblem *>(sensTask->getProblem());
96 
97  if (problem == NULL)
98  return false;
99 
100  CSensMethod* method =
101  dynamic_cast<CSensMethod *>(sensTask->getMethod());
102 
103  if (method == NULL)
104  return false;
105 
106  // subtask
107  problem->setSubTaskType((CSensProblem::SubTaskType)SubTaskChooser->currentIndex());
108 
109  CSensItem tmp;
110 
111  // target function
112  if (FunctionChooser->getCurrentObjectList() == CObjectLists::SINGLE_OBJECT)
113  {
114  if (mpSingleFunction)
116  }
117  else
118  tmp.setListType(FunctionChooser->getCurrentObjectList());
119 
120  problem->changeTargetFunctions(tmp);
121 
122  // variables 1
123  if (VariableChooser->getCurrentObjectList() == CObjectLists::SINGLE_OBJECT)
124  {
125  if (mpSingleVariable)
127  }
128  else
129  tmp.setListType(VariableChooser->getCurrentObjectList());
130 
131  problem->removeVariables();
132 
134  problem->addVariables(tmp);
135  else
136  return true;
137 
138  //variables 2
139  CSensItem tmp2;
140 
141  if (Variable2Chooser->getCurrentObjectList() == CObjectLists::SINGLE_OBJECT)
142  {
143  if (mpSingleVariable2)
145  }
146  else
147  tmp2.setListType(Variable2Chooser->getCurrentObjectList());
148 
149  // write variables to problem
150  problem->removeVariables();
151 
153  {
154  problem->addVariables(tmp);
155 
157  problem->addVariables(tmp2);
158  }
159 
160  // :TODO Bug 322: This should only be called when actual changes have been saved.
161  // However we do not track the changes for the variables we just delete them and add them again.
162  if (true)
163  {
164  if (mpDataModel != NULL)
165  {
166  mpDataModel->changed();
167  }
168 
169  mChanged = false;
170  }
171 
172  return true;
173 }
bool saveMethod()
Definition: TaskWidget.cpp:308
CCopasiProblem * getProblem()
virtual CCopasiObjectName getCN() const
CCopasiObject * get(const std::string &key)
bool saveCommon()
Definition: TaskWidget.cpp:258
void changeTargetFunctions(const CSensItem item)
void changed(const bool &changed=true)
void setSingleObjectCN(const CCopasiObjectName &cn)
bool mChanged
Definition: TaskWidget.h:133
const CObjectLists::ListType & getListType() const
const CCopasiObject * mpSingleFunction
CCopasiDataModel * mpDataModel
Definition: copasiWidget.h:65
CCopasiMethod * getMethod()
static CKeyFactory * getKeyFactory()
void addVariables(const CSensItem &item)
void setListType(CObjectLists::ListType lt)
bool removeVariables(size_t index)
const CCopasiObject * mpSingleVariable
void setSubTaskType(const CSensProblem::SubTaskType &type)
std::string mKey
Definition: copasiWidget.h:63
const CCopasiObject * mpSingleVariable2
void SensitivitiesWidget::slotChooseFunction ( int  )
privateslot

Definition at line 369 of file SensitivitiesWidget.cpp.

References updateAllLineditEnable().

370 {
372 }
void SensitivitiesWidget::slotChooseSingleFunction ( )
privateslot

Definition at line 390 of file SensitivitiesWidget.cpp.

References FROM_UTF8, CCopasiObject::getObjectDisplayName(), CCopasiSelectionDialog::getObjectSingle(), mpSingleFunction, CQSimpleSelectionTree::ObservedValues, CObjectLists::SINGLE_OBJECT, and CQSimpleSelectionTree::Variables.

391 {
392  const CCopasiObject * pObject =
396 
397  if (pObject)
398  {
399  FunctionLineEdit->setText(FROM_UTF8(pObject->getObjectDisplayName()));
400  mpSingleFunction = pObject;
401  FunctionChooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
402  }
403 }
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
const CCopasiObject * mpSingleFunction
static const CCopasiObject * getObjectSingle(QWidget *pParent, const CQSimpleSelectionTree::ObjectClasses &classes, const CCopasiObject *pCurrentObject=NULL)
void SensitivitiesWidget::slotChooseSingleVariable ( )
privateslot

Definition at line 407 of file SensitivitiesWidget.cpp.

References FROM_UTF8, CCopasiObject::getObjectDisplayName(), CCopasiSelectionDialog::getObjectSingle(), CQSimpleSelectionTree::InitialTime, mpSingleVariable, CQSimpleSelectionTree::Parameters, and CObjectLists::SINGLE_OBJECT.

408 {
409  const CCopasiObject * pObject =
413 
414  if (pObject)
415  {
416  VariableLineEdit->setText(FROM_UTF8(pObject->getObjectDisplayName()));
417  mpSingleVariable = pObject;
418  VariableChooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
419  }
420 }
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
const CCopasiObject * mpSingleVariable
static const CCopasiObject * getObjectSingle(QWidget *pParent, const CQSimpleSelectionTree::ObjectClasses &classes, const CCopasiObject *pCurrentObject=NULL)
void SensitivitiesWidget::slotChooseSingleVariable2 ( )
privateslot

Definition at line 424 of file SensitivitiesWidget.cpp.

References FROM_UTF8, CCopasiObject::getObjectDisplayName(), CCopasiSelectionDialog::getObjectSingle(), CQSimpleSelectionTree::InitialTime, mpSingleVariable2, CQSimpleSelectionTree::Parameters, and CObjectLists::SINGLE_OBJECT.

425 {
426  const CCopasiObject * pObject =
430 
431  if (pObject)
432  {
433  Variable2LineEdit->setText(FROM_UTF8(pObject->getObjectDisplayName()));
434  mpSingleVariable2 = pObject;
435  Variable2Chooser->setCurrentObjectList(CObjectLists::SINGLE_OBJECT);
436  }
437 }
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
const CCopasiObject * mpSingleVariable2
static const CCopasiObject * getObjectSingle(QWidget *pParent, const CQSimpleSelectionTree::ObjectClasses &classes, const CCopasiObject *pCurrentObject=NULL)
void SensitivitiesWidget::slotChooseSubTask ( int  )
privateslot

Definition at line 359 of file SensitivitiesWidget.cpp.

References updateAllLineditEnable(), and updateComboBoxes().

360 {
361  CSensProblem::SubTaskType subTaskType = (CSensProblem::SubTaskType)SubTaskChooser->currentIndex();
362  updateComboBoxes(subTaskType);
363 
365 }
void updateComboBoxes(CSensProblem::SubTaskType type)
void SensitivitiesWidget::slotChooseVariable ( int  )
privateslot

Definition at line 376 of file SensitivitiesWidget.cpp.

References updateAllLineditEnable().

377 {
379 }
void SensitivitiesWidget::slotChooseVariable2 ( int  )
privateslot

Definition at line 383 of file SensitivitiesWidget.cpp.

References updateAllLineditEnable().

384 {
386 }
bool SensitivitiesWidget::taskFinishedEvent ( )
protectedvirtual

Reimplemented from TaskWidget.

Definition at line 192 of file SensitivitiesWidget.cpp.

References ListViews::findWidgetFromId(), CopasiWidget::mpListView, CQSensResultWidget::newResult(), pResult, and ListViews::switchToOtherWidget().

193 {
194  bool success = true;
195  //setup the result widget
197  dynamic_cast<CQSensResultWidget*>(mpListView->findWidgetFromId(341));
198 
199  if (pResult) pResult->newResult();
200 
201  if (success && isVisible()) mpListView->switchToOtherWidget(341, ""); //change to the results window
202 
203  return success;
204 }
void switchToOtherWidget(const size_t &id, const std::string &key)
Definition: listviews.cpp:926
CopasiWidget * findWidgetFromId(const size_t &id) const
Definition: listviews.cpp:678
ListViews * mpListView
Definition: copasiWidget.h:62
const CArrayAnnotation * pResult
void SensitivitiesWidget::updateAllLineditEnable ( )
private

This calls updateLineeditEnable() for all three combo boxes

Definition at line 316 of file SensitivitiesWidget.cpp.

References updateLineeditEnable().

Referenced by loadTask(), slotChooseFunction(), slotChooseSubTask(), slotChooseVariable(), and slotChooseVariable2().

317 {
318  /*
319  updateLineeditEnable(FunctionChooser, FunctionLineEdit, SingleFunctionChooserButton);
320  updateLineeditEnable(VariableChooser, VariableLineEdit, SingleVariableChooserButton);
321  updateLineeditEnable(Variable2Chooser, Variable2LineEdit, SingleVariable2ChooserButton);
322  */
323  updateLineeditEnable(FunctionChooser, FunctionLineEdit, SingleFunctionChooser);
324  updateLineeditEnable(VariableChooser, VariableLineEdit, SingleVariableChooser);
325  updateLineeditEnable(Variable2Chooser, Variable2LineEdit, SingleVariable2Chooser);
326 }
void updateLineeditEnable(const SensWidgetComboBox *box, QWidget *w1, QWidget *w2)
void SensitivitiesWidget::updateComboBoxes ( CSensProblem::SubTaskType  type)
private

updates the variable and target function boxes

Definition at line 348 of file SensitivitiesWidget.cpp.

References CSensProblem::getPossibleTargetFunctions(), and CSensProblem::getPossibleVariables().

Referenced by initCombos(), loadTask(), and slotChooseSubTask().

349 {
350  FunctionChooser->fillFromList(CSensProblem::getPossibleTargetFunctions(type));
351  VariableChooser->fillFromList(CSensProblem::getPossibleVariables(type));
352  Variable2Chooser->fillFromList(CSensProblem::getPossibleVariables(type));
353 }
static std::vector< CObjectLists::ListType > getPossibleVariables(CSensProblem::SubTaskType)
static std::vector< CObjectLists::ListType > getPossibleTargetFunctions(CSensProblem::SubTaskType)
void SensitivitiesWidget::updateLineeditEnable ( const SensWidgetComboBox box,
QWidget *  w1,
QWidget *  w2 
)
private

This checks if the combo box is set to "single object" and only then enables the two given widgets.

Definition at line 302 of file SensitivitiesWidget.cpp.

References SensWidgetComboBox::getCurrentObjectList(), and CObjectLists::SINGLE_OBJECT.

Referenced by updateAllLineditEnable().

303 {
304  if (!box) return;
305 
306  bool enable = false;
307 
309  enable = true;
310 
311  if (w1) w1->setVisible(enable);
312 
313  if (w2) w2->setVisible(enable);
314 }
CObjectLists::ListType getCurrentObjectList() const

Member Data Documentation

const CCopasiObject* SensitivitiesWidget::mpSingleFunction
private

Definition at line 72 of file SensitivitiesWidget.h.

Referenced by loadTask(), saveTask(), and slotChooseSingleFunction().

const CCopasiObject* SensitivitiesWidget::mpSingleVariable
private

Definition at line 73 of file SensitivitiesWidget.h.

Referenced by loadTask(), saveTask(), and slotChooseSingleVariable().

const CCopasiObject* SensitivitiesWidget::mpSingleVariable2
private

Definition at line 74 of file SensitivitiesWidget.h.

Referenced by loadTask(), saveTask(), and slotChooseSingleVariable2().


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