COPASI API  4.16.103
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CQMathMatrixWidget Class Reference

#include <CQMathMatrixWidget.h>

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

Public Member Functions

 CQMathMatrixWidget (QWidget *parent=0)
 
virtual bool leave ()
 
virtual bool update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
 
 ~CQMathMatrixWidget ()
 
- 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

void clearArrays ()
 
virtual bool enterProtected ()
 
void loadMatrices ()
 

Protected Attributes

QLabel * mLabelTitle
 
const CArrayAnnotationmpArrayAnn1
 
const CArrayAnnotationmpArrayAnn2
 
const CArrayAnnotationmpArrayAnn3
 
- Protected Attributes inherited from CopasiWidget
int mFramework
 
bool mIgnoreUpdates
 
std::string mKey
 
CCopasiDataModelmpDataModel
 
ListViewsmpListView
 
CCopasiObjectmpObject
 

Additional Inherited Members

- Protected Slots inherited from CopasiWidget
virtual bool protectedNotify (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="")
 

Detailed Description

Definition at line 33 of file CQMathMatrixWidget.h.

Constructor & Destructor Documentation

CQMathMatrixWidget::CQMathMatrixWidget ( QWidget *  parent = 0)

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

Definition at line 37 of file CQMathMatrixWidget.cpp.

References CColorScaleSimple::setMinMax().

38  : CopasiWidget(parent)
39 {
40  setupUi(this);
41 
43  mpArrayWidget1->setColorCoding(tcs);
44  tcs->setMinMax(-1.5, 1.5);
45  mpArrayWidget1->setColorScalingAutomatic(false);
46 
47  tcs = new CColorScaleSimple();
48  mpArrayWidget2->setColorCoding(tcs);
49  tcs->setMinMax(-1.5, 1.5);
50  mpArrayWidget2->setColorScalingAutomatic(false);
51 
52  tcs = new CColorScaleSimple();
53  mpArrayWidget3->setColorCoding(tcs);
54  tcs->setMinMax(-1.5, 1.5);
55  mpArrayWidget3->setColorScalingAutomatic(false);
56 }
void setMinMax(const C_FLOAT64 &min, const C_FLOAT64 &max)
Definition: CColorScale.h:108
CopasiWidget(QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
CQMathMatrixWidget::~CQMathMatrixWidget ( )

Definition at line 61 of file CQMathMatrixWidget.cpp.

62 {}

Member Function Documentation

void CQMathMatrixWidget::clearArrays ( )
protected

Definition at line 85 of file CQMathMatrixWidget.cpp.

Referenced by update().

86 {
87  mpArrayWidget1->setArrayAnnotation(NULL);
88  mpArrayWidget2->setArrayAnnotation(NULL);
89  mpArrayWidget3->setArrayAnnotation(NULL);
90 }
bool CQMathMatrixWidget::enterProtected ( )
protectedvirtual

Reimplemented from CopasiWidget.

Definition at line 106 of file CQMathMatrixWidget.cpp.

References loadMatrices().

107 {
108  loadMatrices();
109 
110  return true;
111 }
bool CQMathMatrixWidget::leave ( )
virtual

Reimplemented from CopasiWidget.

Definition at line 101 of file CQMathMatrixWidget.cpp.

102 {
103  return true;
104 }
void CQMathMatrixWidget::loadMatrices ( )
protected

Definition at line 64 of file CQMathMatrixWidget.cpp.

References CCopasiRootContainer::getDatamodelList(), and CCopasiContainer::getObject().

Referenced by enterProtected().

65 {
66 
67  assert(CCopasiRootContainer::getDatamodelList()->size() > 0);
68  const CModel* pModel = (*CCopasiRootContainer::getDatamodelList())[0]->getModel();
69 
70  const CArrayAnnotation * tmp;
71 
72  tmp = dynamic_cast<const CArrayAnnotation *>
73  (pModel->getObject(CCopasiObjectName("Array=Stoichiometry(ann)")));
74  mpArrayWidget1->setArrayAnnotation(tmp);
75 
76  tmp = dynamic_cast<const CArrayAnnotation *>
77  (pModel->getObject(CCopasiObjectName("Array=Reduced stoichiometry(ann)")));
78  mpArrayWidget2->setArrayAnnotation(tmp);
79 
80  tmp = dynamic_cast<const CArrayAnnotation *>
81  (pModel->getObject(CCopasiObjectName("Array=Link matrix(ann)")));
82  mpArrayWidget3->setArrayAnnotation(tmp);
83 }
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
Definition: CModel.h:50
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
bool CQMathMatrixWidget::update ( ListViews::ObjectType  objectType,
ListViews::Action  action,
const std::string &  key 
)
virtual

Reimplemented from CopasiWidget.

Definition at line 94 of file CQMathMatrixWidget.cpp.

References clearArrays().

96 {
97  clearArrays();
98  return true;
99 }

Member Data Documentation

QLabel* CQMathMatrixWidget::mLabelTitle
protected

Definition at line 51 of file CQMathMatrixWidget.h.

const CArrayAnnotation* CQMathMatrixWidget::mpArrayAnn1
protected

Definition at line 53 of file CQMathMatrixWidget.h.

const CArrayAnnotation* CQMathMatrixWidget::mpArrayAnn2
protected

Definition at line 54 of file CQMathMatrixWidget.h.

const CArrayAnnotation* CQMathMatrixWidget::mpArrayAnn3
protected

Definition at line 55 of file CQMathMatrixWidget.h.


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