COPASI API
4.16.103
|
#include <CQSpecieDM.h>
Public Member Functions | |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
CQSpecieDM (QObject *parent=0) | |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
const std::vector< unsigned C_INT32 > & | getItemToType () |
const QStringList & | getTypes () |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
bool | removeRows (QModelIndexList rows, const QModelIndex &index=QModelIndex()) |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | setFlagConc (bool flag) |
![]() | |
virtual bool | clear () |
CQBaseDataModel (QObject *parent=0) | |
QString | createNewName (const QString name, const int nameCol) |
bool | insertRow () |
virtual bool | isDefaultRow (const QModelIndex &i) const |
bool | removeRow (int position) |
Protected Member Functions | |
bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
Protected Attributes | |
bool | mFlagConc |
std::vector< unsigned C_INT32 > | mItemToType |
bool | mNotify |
CMetab * | mpSpecies |
QStringList | mTypes |
Additional Inherited Members | |
![]() | |
void | notifyGUI (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="") |
Definition at line 39 of file CQSpecieDM.h.
CQSpecieDM::CQSpecieDM | ( | QObject * | parent = 0 | ) |
Definition at line 22 of file CQSpecieDM.cpp.
References CModelEntity::ASSIGNMENT, CModelEntity::FIXED, FROM_UTF8, mItemToType, mTypes, CModelEntity::ODE, CModelEntity::REACTIONS, and CModelEntity::StatusName.
|
virtual |
Definition at line 59 of file CQSpecieDM.cpp.
References TOTAL_COLS_SPECIES.
Referenced by CQSpeciesWidget::keyPressEvent().
|
virtual |
Implements CQBaseDataModel.
Definition at line 111 of file CQSpecieDM.cpp.
References COL_COMPARTMENT, COL_CONCENTRATION, COL_CRATE, COL_EXPRESSION_SPECIES, COL_ICONCENTRATION, COL_IEXPRESSION_SPECIES, COL_INUMBER, COL_NAME_SPECIES, COL_NRATE, COL_NUMBER, COL_ROW_NUMBER, COL_TYPE_SPECIES, flags(), FROM_UTF8, CMetab::getCompartment(), CMetab::getConcentration(), CMetab::getConcentrationRate(), CCopasiRootContainer::getDatamodelList(), CExpression::getDisplayString(), CModelEntity::getExpressionPtr(), CMetab::getInitialConcentration(), CModelEntity::getInitialExpression(), CModelEntity::getInitialExpressionPtr(), CModelEntity::getInitialValue(), CCopasiObject::getObjectName(), CModelEntity::getRate(), CModelEntity::getStatus(), CModelEntity::getValue(), CQBaseDataModel::isDefaultRow(), mFlagConc, mItemToType, mpSpecies, rowCount(), CCopasiVector< T >::size(), and CModelEntity::StatusName.
Referenced by flags(), and setData().
|
virtual |
Reimplemented from CQBaseDataModel.
Definition at line 64 of file CQSpecieDM.cpp.
References CModelEntity::ASSIGNMENT, COL_COMPARTMENT, COL_ICONCENTRATION, COL_IEXPRESSION_SPECIES, COL_INUMBER, COL_NAME_SPECIES, COL_TYPE_SPECIES, data(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CQBaseDataModel::isDefaultRow(), CMetab::isInitialConcentrationChangeAllowed(), mpSpecies, and CModelEntity::StatusName.
Referenced by data().
const std::vector< unsigned C_INT32 > & CQSpecieDM::getItemToType | ( | ) |
const QStringList & CQSpecieDM::getTypes | ( | ) |
Definition at line 39 of file CQSpecieDM.cpp.
References mTypes.
Referenced by CQSpeciesWidget::CQSpeciesWidget().
|
virtual |
Implements CQBaseDataModel.
Definition at line 245 of file CQSpecieDM.cpp.
References COL_COMPARTMENT, COL_CONCENTRATION, COL_CRATE, COL_EXPRESSION_SPECIES, COL_ICONCENTRATION, COL_IEXPRESSION_SPECIES, COL_INUMBER, COL_NAME_SPECIES, COL_NRATE, COL_NUMBER, COL_ROW_NUMBER, COL_TYPE_SPECIES, FROM_UTF8, CModel::getConcentrationRateUnitsDisplayString(), CModel::getConcentrationUnitsDisplayString(), CCopasiRootContainer::getDatamodelList(), and CModel::getFrequencyUnitsDisplayString().
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 479 of file CQSpecieDM.cpp.
References ListViews::ADD, COL_NAME_SPECIES, ListViews::COMPARTMENT, CModel::createCompartment(), CModel::createMetabolite(), CQBaseDataModel::createNewName(), CModel::getCompartments(), CCopasiRootContainer::getDatamodelList(), CModelEntity::getKey(), CCopasiObject::getKey(), CCopasiDataModel::getModel(), ListViews::METABOLITE, mNotify, mpSpecies, CQBaseDataModel::notifyGUI(), CModelEntity::REACTIONS, CCopasiVector< T >::size(), and TO_UTF8.
bool CQSpecieDM::removeRows | ( | QModelIndexList | rows, |
const QModelIndex & | index = QModelIndex() |
||
) |
Definition at line 541 of file CQSpecieDM.cpp.
References C_INVALID_INDEX, CQMessageBox::confirmDelete(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CMetab::getDeletedObjects(), CModel::getMetabolites(), CCopasiDataModel::getModel(), CCopasiObject::getObjectName(), CQBaseDataModel::isDefaultRow(), and CQBaseDataModel::removeRow().
Referenced by CQSpeciesWidget::deleteSelectedSpecies().
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 507 of file CQSpecieDM.cpp.
References CCopasiVector< T >::begin(), ListViews::DELETE, CCopasiRootContainer::getDatamodelList(), CModel::getMetabolites(), ListViews::METABOLITE, CQBaseDataModel::notifyGUI(), and CModel::removeMetabolite().
|
virtual |
Definition at line 54 of file CQSpecieDM.cpp.
References CCopasiRootContainer::getDatamodelList().
Referenced by data(), and CQSpeciesWidget::deleteSelectedSpecies().
|
virtual |
Implements CQBaseDataModel.
Definition at line 336 of file CQSpecieDM.cpp.
References ListViews::ADD, C_FLOAT64, ListViews::CHANGE, COL_COMPARTMENT, COL_ICONCENTRATION, COL_INUMBER, COL_NAME_SPECIES, COL_NUMBER, COL_TYPE_SPECIES, ListViews::COMPARTMENT, CMetab::convertToConcentration(), CMetab::convertToNumber(), CQBaseDataModel::createNewName(), data(), FROM_UTF8, CMetab::getCompartment(), CCopasiRootContainer::getDatamodelList(), CModelEntity::getInitialValue(), CModelEntity::getKey(), CCopasiObject::getObjectName(), CQMessageBox::information(), CQBaseDataModel::insertRow(), CQBaseDataModel::isDefaultRow(), ListViews::METABOLITE, mFlagConc, mItemToType, mNotify, mpSpecies, CQBaseDataModel::notifyGUI(), CMetab::setInitialConcentration(), CModelEntity::setInitialValue(), CCopasiObject::setObjectName(), CMetab::setStatus(), CModelEntity::setValue(), CModelEntity::StatusName, and TO_UTF8.
void CQSpecieDM::setFlagConc | ( | bool | flag | ) |
Definition at line 44 of file CQSpecieDM.cpp.
References mFlagConc.
Referenced by CQSpeciesWidget::setFramework().
|
protected |
Definition at line 59 of file CQSpecieDM.h.
Referenced by data(), setData(), and setFlagConc().
|
protected |
A vector mapping the item index to a model value type
Definition at line 65 of file CQSpecieDM.h.
Referenced by CQSpecieDM(), data(), getItemToType(), and setData().
|
protected |
Definition at line 72 of file CQSpecieDM.h.
Referenced by insertRows(), and setData().
|
mutableprotected |
A pointer to the selected species
Definition at line 70 of file CQSpecieDM.h.
Referenced by data(), flags(), insertRows(), and setData().
|
protected |
Definition at line 60 of file CQSpecieDM.h.
Referenced by CQSpecieDM(), and getTypes().