COPASI API  4.16.103
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CQProgressItemText Class Reference

#include <CQProgressItemText.h>

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

Public Member Functions

 CQProgressItemText (QWidget *parent=0, const char *name=0)
 
virtual bool initFromProcessReportItem (CProcessReportItem *pItem)
 
virtual bool process ()
 
virtual bool reset ()
 
 ~CQProgressItemText ()
 
- Public Member Functions inherited from CQProgressItem
 CQProgressItem (QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=0)
 
 ~CQProgressItem ()
 

Private Member Functions

virtual void setValueFromDOUBLE ()
 
virtual void setValueFromINT ()
 
virtual void setValueFromSTRING ()
 
virtual void setValueFromUINT ()
 

Private Attributes

CCopasiParameter::Value mParameterValue
 
void(CQProgressItemText::* mpSetValue )()
 

Additional Inherited Members

- Protected Attributes inherited from CQProgressItem
CProcessReportItemmpItem
 

Detailed Description

Definition at line 24 of file CQProgressItemText.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file CQProgressItemText.cpp.

27  : CQProgressItem(parent, name)
28 {
29  Ui::CQProgressItemText::setupUi(this);
30 }
CQProgressItem(QWidget *parent=0, const char *name=0, Qt::WindowFlags fl=0)
CQProgressItemText::~CQProgressItemText ( )

Definition at line 35 of file CQProgressItemText.cpp.

36 {
37  // no need to delete child widgets, Qt does it all for us
38 }

Member Function Documentation

bool CQProgressItemText::initFromProcessReportItem ( CProcessReportItem pItem)
virtual

Reimplemented from CQProgressItem.

Definition at line 40 of file CQProgressItemText.cpp.

References FROM_UTF8, CCopasiObject::getObjectName(), CCopasiParameter::getValue(), mParameterValue, CQProgressItem::mpItem, and reset().

41 {
42  mpItem = pItem;
44 
45  mItemName->setText(FROM_UTF8(mpItem->getObjectName()));
46 
47  this->show();
48 
49  return reset();
50 }
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
const std::string & getObjectName() const
CCopasiParameter::Value mParameterValue
const Value & getValue() const
CProcessReportItem * mpItem
bool CQProgressItemText::process ( )
virtual

Reimplemented from CQProgressItem.

Definition at line 52 of file CQProgressItemText.cpp.

References mpSetValue.

Referenced by reset().

53 {
54  (this->*mpSetValue)();
55  return true;
56 }
void(CQProgressItemText::* mpSetValue)()
bool CQProgressItemText::reset ( )
virtual

Reimplemented from CQProgressItem.

Definition at line 58 of file CQProgressItemText.cpp.

References CCopasiParameter::DOUBLE, CCopasiParameter::getType(), CCopasiParameter::INT, CQProgressItem::mpItem, mpSetValue, process(), setValueFromDOUBLE(), setValueFromINT(), setValueFromSTRING(), setValueFromUINT(), CCopasiParameter::STRING, CCopasiParameter::UDOUBLE, and CCopasiParameter::UINT.

Referenced by initFromProcessReportItem().

59 {
60  switch (mpItem->getType())
61  {
65  break;
66 
69  break;
70 
73  break;
74 
77  break;
78 
79  default:
80  return false;
81  break;
82  }
83 
84  return process();
85 }
void(CQProgressItemText::* mpSetValue)()
virtual void setValueFromUINT()
virtual void setValueFromINT()
const CCopasiParameter::Type & getType() const
CProcessReportItem * mpItem
virtual void setValueFromSTRING()
virtual void setValueFromDOUBLE()
void CQProgressItemText::setValueFromDOUBLE ( )
privatevirtual

Definition at line 87 of file CQProgressItemText.cpp.

References mParameterValue, and CCopasiParameter::Value::pDOUBLE.

Referenced by reset().

88 {
89  mValue->setText(QString::number(* mParameterValue.pDOUBLE));
90 }
CCopasiParameter::Value mParameterValue
void CQProgressItemText::setValueFromINT ( )
privatevirtual

Definition at line 92 of file CQProgressItemText.cpp.

References mParameterValue, and CCopasiParameter::Value::pINT.

Referenced by reset().

93 {
94  mValue->setText(QString::number(* mParameterValue.pINT));
95 }
CCopasiParameter::Value mParameterValue
void CQProgressItemText::setValueFromSTRING ( )
privatevirtual

Definition at line 102 of file CQProgressItemText.cpp.

References FROM_UTF8, mParameterValue, and CCopasiParameter::Value::pSTRING.

Referenced by reset().

103 {
104  mValue->setText(FROM_UTF8(* mParameterValue.pSTRING));
105 }
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
CCopasiParameter::Value mParameterValue
void CQProgressItemText::setValueFromUINT ( )
privatevirtual

Definition at line 97 of file CQProgressItemText.cpp.

References mParameterValue, and CCopasiParameter::Value::pUINT.

Referenced by reset().

98 {
99  mValue->setText(QString::number(* mParameterValue.pUINT));
100 }
CCopasiParameter::Value mParameterValue
unsigned C_INT32 * pUINT

Member Data Documentation

CCopasiParameter::Value CQProgressItemText::mParameterValue
private
void(CQProgressItemText::* CQProgressItemText::mpSetValue)()
private

Definition at line 37 of file CQProgressItemText.h.

Referenced by process(), and reset().


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