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

#include <CQMoietiesTaskWidget.h>

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

Public Member Functions

 CQMoietiesTaskWidget (QWidget *parent=0, const char *name=0)
 
virtual CCopasiMethodcreateMethod (const CCopasiMethod::SubType &type)
 
virtual bool loadTask ()
 
virtual bool runTask ()
 
virtual bool saveTask ()
 
 ~CQMoietiesTaskWidget ()
 
- 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 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 Member Functions

void destroy ()
 
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 23 of file CQMoietiesTaskWidget.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file CQMoietiesTaskWidget.cpp.

References init().

26  : TaskWidget(parent, name)
27 {
28  setupUi(this);
29 
30  init();
31 }
TaskWidget(QWidget *parent=0, const char *name=0, Qt::WFlags fl=0)
Definition: TaskWidget.cpp:52
CQMoietiesTaskWidget::~CQMoietiesTaskWidget ( )

Definition at line 36 of file CQMoietiesTaskWidget.cpp.

References destroy().

37 {
38  destroy();
39  // no need to delete child widgets, Qt does it all for us
40 }

Member Function Documentation

CCopasiMethod * CQMoietiesTaskWidget::createMethod ( const CCopasiMethod::SubType type)
virtual

Implements TaskWidget.

Definition at line 94 of file CQMoietiesTaskWidget.cpp.

References CMoietiesMethod::createMethod().

95 {
96  return CMoietiesMethod::createMethod(type);
97 }
static CMoietiesMethod * createMethod(const CCopasiMethod::SubType &subType=CCopasiMethod::Householder)
void CQMoietiesTaskWidget::destroy ( )
private

Definition at line 51 of file CQMoietiesTaskWidget.cpp.

Referenced by ~CQMoietiesTaskWidget().

52 {}
void CQMoietiesTaskWidget::init ( )
private

Definition at line 42 of file CQMoietiesTaskWidget.cpp.

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

Referenced by CQMoietiesTaskWidget().

43 {
44  mpHeaderWidget->setTaskName("Mass Conservation");
45  mpHeaderWidget->mpUpdateModel->hide();
46 
47  vboxLayout->insertWidget(0, mpHeaderWidget);
48  vboxLayout->addWidget(mpBtnWidget);
49 }
bool setTaskName(const std::string &name)
CQTaskBtnWidget * mpBtnWidget
Definition: TaskWidget.h:124
CQTaskHeaderWidget * mpHeaderWidget
Definition: TaskWidget.h:122
bool CQMoietiesTaskWidget::loadTask ( )
virtual

Implements TaskWidget.

Definition at line 84 of file CQMoietiesTaskWidget.cpp.

References TaskWidget::loadCommon(), and TaskWidget::mpTask.

85 {
86  if (dynamic_cast< CMoietiesTask * >(mpTask) == NULL)
87  return false;
88 
89  loadCommon();
90 
91  return true;
92 }
bool loadCommon()
Definition: TaskWidget.cpp:247
CCopasiTask * mpTask
Definition: TaskWidget.h:130
bool CQMoietiesTaskWidget::runTask ( )
virtual

Implements TaskWidget.

Definition at line 54 of file CQMoietiesTaskWidget.cpp.

References TaskWidget::commonBeforeRunTask(), TaskWidget::commonRunTask(), and TaskWidget::mpTask.

55 {
56  if (dynamic_cast< CMoietiesTask * >(mpTask) == NULL)
57  return false;
58 
59  if (!commonBeforeRunTask()) return false;
60 
61  return commonRunTask();
62 }
CCopasiTask * mpTask
Definition: TaskWidget.h:130
bool commonRunTask()
Definition: TaskWidget.cpp:395
bool commonBeforeRunTask()
Definition: TaskWidget.cpp:317
bool CQMoietiesTaskWidget::saveTask ( )
virtual

Implements TaskWidget.

Definition at line 74 of file CQMoietiesTaskWidget.cpp.

References TaskWidget::mpTask, and TaskWidget::saveCommon().

75 {
76  if (dynamic_cast< CMoietiesTask * >(mpTask) == NULL)
77  return false;
78 
79  saveCommon();
80 
81  return true;
82 }
bool saveCommon()
Definition: TaskWidget.cpp:258
CCopasiTask * mpTask
Definition: TaskWidget.h:130
bool CQMoietiesTaskWidget::taskFinishedEvent ( )
protectedvirtual

Reimplemented from TaskWidget.

Definition at line 64 of file CQMoietiesTaskWidget.cpp.

References CopasiWidget::mpListView, and ListViews::switchToOtherWidget().

65 {
66  bool success = true;
67 
68  if (success && isVisible())
69  mpListView->switchToOtherWidget(2221, ""); //change to the results window
70 
71  return success;
72 }
void switchToOtherWidget(const size_t &id, const std::string &key)
Definition: listviews.cpp:926
ListViews * mpListView
Definition: copasiWidget.h:62

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