COPASI API
4.16.103
|
#include <CQBrowserPaneDM.h>
Classes | |
class | CNode |
class | SData |
Public Types | |
enum | Type { Model = 0x01, Tasks = 0x02, Output = 0x04, FunctionDB = 0x08 } |
Public Member Functions | |
void | add (const size_t &id, const std::string &key, const QString &displayRole, const size_t &parentId=C_INVALID_INDEX) |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
CQBrowserPaneDM (QObject *parent=0) | |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
CNode * | findNodeFromId (const size_t &id) const |
CNode * | findNodeFromKey (const std::string &key) const |
size_t | getIdFromIndex (const QModelIndex &index) const |
std::string | getKeyFromIndex (const QModelIndex &index) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | index (const size_t &id, const std::string &key) const |
void | load () |
void | load (const size_t &id) |
virtual QModelIndex | parent (const QModelIndex &index) const |
void | remove (const std::string &key) |
virtual bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
void | rename (const std::string &key, const QString &displayRole) |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
void | setCopasiDM (const CCopasiDataModel *pDataModel) |
void | setGuiDM (const DataModelGUI *pDataModel) |
virtual | ~CQBrowserPaneDM () |
Private Slots | |
bool | slotNotify (ListViews::ObjectType objectType, ListViews::Action action, std::string key="") |
Private Member Functions | |
void | clear () |
void | createStaticDM () |
QModelIndex | index (CNode *pNode) const |
Static Private Member Functions | |
static CNode * | nodeFromIndex (const QModelIndex &index) |
Private Attributes | |
bool | mEmitDataChanged |
int | mFlags |
const CCopasiDataModel * | mpCopasiDM |
const DataModelGUI * | mpGuiDM |
CNode * | mpRoot |
Definition at line 26 of file CQBrowserPaneDM.h.
Enumerator | |
---|---|
Model | |
Tasks | |
Output | |
FunctionDB |
Definition at line 72 of file CQBrowserPaneDM.h.
CQBrowserPaneDM::CQBrowserPaneDM | ( | QObject * | parent = 0 | ) |
Definition at line 25 of file CQBrowserPaneDM.cpp.
References createStaticDM().
|
virtual |
void CQBrowserPaneDM::add | ( | const size_t & | id, |
const std::string & | key, | ||
const QString & | displayRole, | ||
const size_t & | parentId = C_INVALID_INDEX |
||
) |
Definition at line 254 of file CQBrowserPaneDM.cpp.
References findNodeFromId(), CCopasiNode< _Data >::getNumChildren(), and index().
Referenced by slotNotify().
|
private |
Definition at line 722 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::deleteChildren(), and findNodeFromId().
Referenced by setCopasiDM().
|
virtual |
Definition at line 44 of file CQBrowserPaneDM.cpp.
|
private |
Definition at line 653 of file CQBrowserPaneDM.cpp.
References data(), DataModeltxt, findNodeFromId(), FROM_UTF8, FunctionDB, mFlags, Model, mpRoot, Output, and Tasks.
Referenced by CQBrowserPaneDM().
|
virtual |
Definition at line 50 of file CQBrowserPaneDM.cpp.
References CQBrowserPaneDM::CNode::getDisplayRole(), CQBrowserPaneDM::CNode::getId(), CCopasiNode< _Data >::getNumChildren(), CQBrowserPaneDM::CNode::getSortRole(), and nodeFromIndex().
Referenced by createStaticDM().
CQBrowserPaneDM::CNode * CQBrowserPaneDM::findNodeFromId | ( | const size_t & | id | ) | const |
Definition at line 171 of file CQBrowserPaneDM.cpp.
References mpRoot.
Referenced by add(), clear(), createStaticDM(), index(), and load().
CQBrowserPaneDM::CNode * CQBrowserPaneDM::findNodeFromKey | ( | const std::string & | key | ) | const |
Definition at line 187 of file CQBrowserPaneDM.cpp.
References mpRoot.
Referenced by index(), remove(), and rename().
size_t CQBrowserPaneDM::getIdFromIndex | ( | const QModelIndex & | index | ) | const |
Definition at line 203 of file CQBrowserPaneDM.cpp.
References C_INVALID_INDEX, CQBrowserPaneDM::CNode::getId(), and nodeFromIndex().
Referenced by ListViews::findWidgetFromIndex(), and ListViews::getCurrentItemId().
std::string CQBrowserPaneDM::getKeyFromIndex | ( | const QModelIndex & | index | ) | const |
Definition at line 212 of file CQBrowserPaneDM.cpp.
References CQBrowserPaneDM::CNode::getKey(), and nodeFromIndex().
Referenced by ListViews::slotFolderChanged().
|
virtual |
Definition at line 91 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::getChild(), mpRoot, and nodeFromIndex().
Referenced by add(), index(), load(), nodeFromIndex(), remove(), rename(), setCopasiDM(), ListViews::setDataModel(), and ListViews::switchToOtherWidget().
QModelIndex CQBrowserPaneDM::index | ( | const size_t & | id, |
const std::string & | key | ||
) | const |
Definition at line 121 of file CQBrowserPaneDM.cpp.
References C_INVALID_INDEX, findNodeFromId(), findNodeFromKey(), and index().
|
private |
Definition at line 620 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::getParent(), CQBrowserPaneDM::CNode::getRow(), index(), and mpRoot.
void CQBrowserPaneDM::load | ( | ) |
Definition at line 306 of file CQBrowserPaneDM.cpp.
References findNodeFromId(), COutputDefinitionVector::getKey(), CModelParameterSet::getKey(), CReportDefinitionVector::getKey(), CModel::getKey(), CCopasiDataModel::getModel(), CModel::getModelParameterSet(), CCopasiDataModel::getPlotDefinitionList(), CCopasiDataModel::getReportDefinitionList(), CCopasiDataModel::getTaskList(), index(), mpCopasiDM, and CQBrowserPaneDM::CNode::setKey().
Referenced by setCopasiDM(), and slotNotify().
void CQBrowserPaneDM::load | ( | const size_t & | id | ) |
Definition at line 346 of file CQBrowserPaneDM.cpp.
References CCopasiVector< T >::begin(), C_INVALID_INDEX, CCopasiVector< T >::end(), findNodeFromId(), FROM_UTF8, CModel::getCompartments(), CMetabNameInterface::getDisplayName(), CQBrowserPaneDM::CNode::getDisplayRole(), CModel::getEvents(), CCopasiRootContainer::getFunctionList(), CModel::getMetabolites(), CCopasiDataModel::getModel(), CModel::getModelParameterSets(), CModel::getModelValues(), CCopasiNode< _Data >::getNumChildren(), CCopasiDataModel::getPlotDefinitionList(), CModel::getReactions(), CCopasiDataModel::getReportDefinitionList(), CCopasiNode< _Data >::getSibling(), index(), CFunctionDB::loadedFunctions(), mEmitDataChanged, mpCopasiDM, removeRows(), CQBrowserPaneDM::CNode::setDisplayRole(), and CQBrowserPaneDM::CNode::setKey().
|
staticprivate |
Definition at line 637 of file CQBrowserPaneDM.cpp.
References index().
Referenced by data(), getIdFromIndex(), getKeyFromIndex(), index(), parent(), removeRows(), and rowCount().
|
virtual |
Definition at line 106 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::getParent(), CQBrowserPaneDM::CNode::getRow(), mpRoot, and nodeFromIndex().
Referenced by ListViews::findWidgetFromIndex().
void CQBrowserPaneDM::remove | ( | const std::string & | key | ) |
Definition at line 221 of file CQBrowserPaneDM.cpp.
References findNodeFromKey(), CCopasiNode< _Data >::getParent(), CQBrowserPaneDM::CNode::getRow(), index(), and removeRows().
|
virtual |
Definition at line 149 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getSibling(), and nodeFromIndex().
Referenced by load(), and remove().
void CQBrowserPaneDM::rename | ( | const std::string & | key, |
const QString & | displayRole | ||
) |
Definition at line 235 of file CQBrowserPaneDM.cpp.
References findNodeFromKey(), CQBrowserPaneDM::CNode::getDisplayRole(), index(), mEmitDataChanged, and CQBrowserPaneDM::CNode::setDisplayRole().
Referenced by slotNotify().
|
virtual |
Definition at line 138 of file CQBrowserPaneDM.cpp.
References CCopasiNode< _Data >::getNumChildren(), mpRoot, and nodeFromIndex().
void CQBrowserPaneDM::setCopasiDM | ( | const CCopasiDataModel * | pDataModel | ) |
Definition at line 272 of file CQBrowserPaneDM.cpp.
References clear(), index(), load(), mEmitDataChanged, and mpCopasiDM.
Referenced by ListViews::setDataModel().
void CQBrowserPaneDM::setGuiDM | ( | const DataModelGUI * | pDataModel | ) |
Definition at line 289 of file CQBrowserPaneDM.cpp.
References mpGuiDM, and slotNotify().
Referenced by ListViews::setDataModel().
|
privateslot |
Definition at line 478 of file CQBrowserPaneDM.cpp.
References add(), ListViews::ADD, C_INVALID_INDEX, ListViews::CHANGE, ListViews::COMPARTMENT, ListViews::DELETE, ListViews::EVENT, FROM_UTF8, ListViews::FUNCTION, CKeyFactory::get(), CMetabNameInterface::getDisplayName(), CCopasiRootContainer::getKeyFactory(), CCopasiObject::getObjectName(), ListViews::LAYOUT, load(), ListViews::METABOLITE, ListViews::MODEL, ListViews::MODELPARAMETERSET, ListViews::MODELVALUE, ListViews::PLOT, ListViews::REACTION, rename(), ListViews::RENAME, and ListViews::REPORT.
Referenced by setGuiDM().
|
private |
Definition at line 145 of file CQBrowserPaneDM.h.
Referenced by load(), rename(), and setCopasiDM().
|
private |
Definition at line 147 of file CQBrowserPaneDM.h.
Referenced by createStaticDM().
|
private |
Definition at line 141 of file CQBrowserPaneDM.h.
Referenced by load(), and setCopasiDM().
|
private |
Definition at line 143 of file CQBrowserPaneDM.h.
Referenced by setGuiDM().
|
private |
Definition at line 139 of file CQBrowserPaneDM.h.
Referenced by createStaticDM(), findNodeFromId(), findNodeFromKey(), index(), parent(), rowCount(), and ~CQBrowserPaneDM().