COPASI API  4.16.103
CQProgressItemText.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/CQProgressItemText.cpp,v $
3 // $Revision: 1.7 $
4 // $Name: $
5 // $Author: aekamal $
6 // $Date: 2011/06/06 16:14:06 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 #include "CQProgressItemText.h"
20 #include "UI/qtUtilities.h"
21 
22 /*
23  * Constructs a CQProgressItemText which is a child of 'parent', with the
24  * name 'name'.'
25  */
26 CQProgressItemText::CQProgressItemText(QWidget* parent, const char* name)
27  : CQProgressItem(parent, name)
28 {
29  Ui::CQProgressItemText::setupUi(this);
30 }
31 
32 /*
33  * Destroys the object and frees any allocated resources
34  */
36 {
37  // no need to delete child widgets, Qt does it all for us
38 }
39 
41 {
42  mpItem = pItem;
44 
45  mItemName->setText(FROM_UTF8(mpItem->getObjectName()));
46 
47  this->show();
48 
49  return reset();
50 }
51 
53 {
54  (this->*mpSetValue)();
55  return true;
56 }
57 
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 }
86 
88 {
89  mValue->setText(QString::number(* mParameterValue.pDOUBLE));
90 }
91 
93 {
94  mValue->setText(QString::number(* mParameterValue.pINT));
95 }
96 
98 {
99  mValue->setText(QString::number(* mParameterValue.pUINT));
100 }
101 
103 {
104  mValue->setText(FROM_UTF8(* mParameterValue.pSTRING));
105 }
106 
void(CQProgressItemText::* mpSetValue)()
#define FROM_UTF8(__x)
Definition: qtUtilities.h:73
virtual void setValueFromUINT()
const std::string & getObjectName() const
CQProgressItemText(QWidget *parent=0, const char *name=0)
CCopasiParameter::Value mParameterValue
virtual void setValueFromINT()
const CCopasiParameter::Type & getType() const
const Value & getValue() const
CProcessReportItem * mpItem
unsigned C_INT32 * pUINT
virtual void setValueFromSTRING()
virtual void setValueFromDOUBLE()
virtual bool initFromProcessReportItem(CProcessReportItem *pItem)