COPASI API  4.16.103
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
CQOscillationTaskWidget Class Reference

#include <CQOscillationTaskWidget.h>

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

Public Member Functions

 CQOscillationTaskWidget (QWidget *parent=0, const char *name=0)
 
virtual bool runTask ()
 
virtual bool update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
 
virtual ~CQOscillationTaskWidget ()
 
- Public Member Functions inherited from TaskWidget
CCopasiTaskgetTask ()
 
virtual bool leave ()
 
 TaskWidget (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
 
 ~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 ()
 
- 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 ()
 
virtual bool taskFinishedEvent ()
 

Private Member Functions

void init ()
 

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 27 of file CQOscillationTaskWidget.h.

Constructor & Destructor Documentation

CQOscillationTaskWidget::CQOscillationTaskWidget ( QWidget *  parent = 0,
const char *  name = 0 
)

Definition at line 33 of file CQOscillationTaskWidget.cpp.

References init().

34  : TaskWidget(parent, name)
35 {
36  setupUi(this);
37 
38  init();
39 }
TaskWidget(QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
Definition: TaskWidget.cpp:52
CQOscillationTaskWidget::~CQOscillationTaskWidget ( )
virtual

Definition at line 44 of file CQOscillationTaskWidget.cpp.

45 {
46  destroy();
47  // no need to delete child widgets, Qt does it all for us
48 }

Member Function Documentation

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

Implements TaskWidget.

Definition at line 165 of file CQOscillationTaskWidget.cpp.

166 {
167  return NULL;
168 }
void CQOscillationTaskWidget::init ( )
private

Definition at line 50 of file CQOscillationTaskWidget.cpp.

References TaskWidget::mpBtnWidget, TaskWidget::mpHeaderWidget, and CQTaskHeaderWidget::setTaskName().

Referenced by CQOscillationTaskWidget().

51 {
52  mpHeaderWidget->setTaskName("Oscillation");
53 
54  oscillationTWLayout->insertWidget(0, mpHeaderWidget); // header
55  // crossSectionTWLayout->insertSpacing(1, 14); // space between header and body
56  oscillationTWLayout->addWidget(mpBtnWidget); // 'footer'
57 
58 // addMethodParameterTable(0);
59 }
bool setTaskName(const std::string &name)
CQTaskBtnWidget * mpBtnWidget
Definition: TaskWidget.h:124
CQTaskHeaderWidget * mpHeaderWidget
Definition: TaskWidget.h:122
bool CQOscillationTaskWidget::loadTask ( )
protectedvirtual

Implements TaskWidget.

Definition at line 109 of file CQOscillationTaskWidget.cpp.

110 {
111  /*
112  // load Task
113  CCrossSectionTask * pTask =
114  dynamic_cast< CCrossSectionTask * >(mpTask);
115 
116  if (!pTask) return false;
117 
118  // load functions from the Parent, TaskWidget
119  loadCommon();
120  loadMethod();
121 
122  // load Problem
123  CCrossSectionProblem* pProblem =
124  dynamic_cast<CCrossSectionProblem *>(pTask->getProblem());
125  assert(pProblem);
126 
127  CCrossSectionMethod* pMethod =
128  dynamic_cast<CCrossSectionMethod *>(pTask->getMethod());
129  assert(pMethod);
130 
131  // load the saved values
132 
133  mpCheckLC->setChecked(pProblem->getFlagLimitCrossings());
134  mpLineEditLC->setEnabled(pProblem->getFlagLimitCrossings());
135 
136  if (pProblem->getFlagLimitCrossings())
137  mpLineEditLC->setText(QString::number(pProblem->getCrossingsLimit()));
138  else
139  mpLineEditLC->setText("");
140 
141  mpCheckLT->setChecked(pProblem->getFlagLimitTime());
142  mpLineEditLT->setEnabled(pProblem->getFlagLimitTime());
143 
144  if (pProblem->getFlagLimitTime())
145  mpLineEditLT->setText(QString::number(pProblem->getTimeLimit()));
146  else
147  mpLineEditLT->setText("");
148 
149  if (pProblem->getOutputStartTime() > 0.0)
150  {
151  mpCheck->setChecked(true);
152  mpLineEdit->setEnabled(true);
153  mpLineEdit->setText(QString::number(pProblem->getOutputStartTime()));
154  }
155  else
156  {
157  mpCheck->setChecked(false);
158  mpLineEdit->setEnabled(false);
159  mpLineEdit->setText("");
160  }
161  */
162  return true;
163 }
bool CQOscillationTaskWidget::runTask ( )
virtual

Implements TaskWidget.

Definition at line 61 of file CQOscillationTaskWidget.cpp.

62 {
63  return true;
64 }
bool CQOscillationTaskWidget::saveTask ( )
protectedvirtual

Implements TaskWidget.

Definition at line 74 of file CQOscillationTaskWidget.cpp.

75 {
76  /*
77  // check the existence of Task
78  CCrossSectionTask * pTask =
79  dynamic_cast< CCrossSectionTask * >(mpTask);
80 
81  if (!pTask) return false;
82 
83  // save functions from the Parent, TaskWidget
84  saveCommon();
85  saveMethod();
86 
87  // check the existence of Problem
88  CCrossSectionProblem* pProblem =
89  dynamic_cast<CCrossSectionProblem *>(pTask->getProblem());
90  assert(pProblem);
91 
92  // save the actual changes
93 
94  if (mpCheckLC->isChecked())
95  pProblem->setCrossingsLimit(mpLineEditLC->text().toDouble());
96 
97  if (mpCheckLT->isChecked())
98  pProblem->setTimeLimit(mpLineEditLT->text().toDouble());
99 
100  if (mpCheck->isChecked())
101  pProblem->setOutputStartTime(mpLineEdit->text().toDouble());
102  */
103  return true;
104 }
bool CQOscillationTaskWidget::update ( ListViews::ObjectType  objectType,
ListViews::Action  action,
const std::string &  key 
)
virtual

Reimplemented from TaskWidget.

Definition at line 66 of file CQOscillationTaskWidget.cpp.

67 {
68  return true;
69 }

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