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

#include <CQAutolayoutWizard.h>

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

Public Member Functions

 CQModelElementTreeWidgetItem (const QStringList &strings, const std::string &key, int type=QTreeWidgetItem::Type)
 
const std::string & getKey () const
 
CCopasiObjectgetObject () const
 

Protected Attributes

std::string mKey
 

Detailed Description

Definition at line 35 of file CQAutolayoutWizard.h.

Constructor & Destructor Documentation

CQModelElementTreeWidgetItem::CQModelElementTreeWidgetItem ( const QStringList &  strings,
const std::string &  key,
int  type = QTreeWidgetItem::Type 
)

Constructor which in addition to the attributes of the original class also takes a string which is the key of the object that is represented by the item.

Definition at line 37 of file CQAutolayoutWizard.cpp.

37  :
38  QTreeWidgetItem(strings, type)
39  , mKey(key)
40 {
41 }

Member Function Documentation

const std::string & CQModelElementTreeWidgetItem::getKey ( ) const

Returns a const reference to the key of the object.

Definition at line 46 of file CQAutolayoutWizard.cpp.

References mKey.

47 {
48  return this->mKey;
49 }
CCopasiObject * CQModelElementTreeWidgetItem::getObject ( ) const

Returns a pointer to the COPASI object represented by this item.

Definition at line 55 of file CQAutolayoutWizard.cpp.

References CKeyFactory::get(), CCopasiRootContainer::getKeyFactory(), and mKey.

Referenced by CQSelectionWizardPage::fillContainers().

56 {
57  CCopasiObject* pObject = NULL;
58 
59  if (!this->mKey.empty())
60  {
61  pObject = CCopasiRootContainer::getKeyFactory()->get(this->mKey);
62  }
63 
64  return pObject;
65 }
CCopasiObject * get(const std::string &key)
static CKeyFactory * getKeyFactory()

Member Data Documentation

std::string CQModelElementTreeWidgetItem::mKey
protected

Definition at line 40 of file CQAutolayoutWizard.h.

Referenced by getKey(), and getObject().


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