COPASI API
4.16.103
|
#include <CQCompartmentDM.h>
Public Member Functions | |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
CQCompartmentDM (QObject *parent=0) | |
virtual QVariant | data (const QModelIndex &index, int role) const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
const std::vector< unsigned C_INT32 > & | getItemToType () |
const QStringList & | getTypes () |
virtual 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 |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
![]() | |
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 | |
std::vector< unsigned C_INT32 > | mItemToType |
QStringList | mTypes |
Additional Inherited Members | |
![]() | |
void | notifyGUI (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="") |
Definition at line 35 of file CQCompartmentDM.h.
CQCompartmentDM::CQCompartmentDM | ( | QObject * | parent = 0 | ) |
Definition at line 26 of file CQCompartmentDM.cpp.
References CModelEntity::ASSIGNMENT, CModelEntity::FIXED, FROM_UTF8, mItemToType, mTypes, CModelEntity::ODE, and CModelEntity::StatusName.
|
virtual |
Definition at line 53 of file CQCompartmentDM.cpp.
References TOTAL_COLS_COMPARTMENTS.
Referenced by CQCompartmentsWidget::keyPressEvent().
|
virtual |
Implements CQBaseDataModel.
Definition at line 76 of file CQCompartmentDM.cpp.
References COL_EXPRESSION_COMPARTMENTS, COL_IEXPRESSION_COMPARTMENTS, COL_IVOLUME, COL_NAME_COMPARTMENTS, COL_RATE_COMPARTMENTS, COL_ROW_NUMBER, COL_TYPE_COMPARTMENTS, COL_VOLUME, flags(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CExpression::getDisplayString(), CModelEntity::getExpressionPtr(), CModelEntity::getInitialExpressionPtr(), CModelEntity::getInitialValue(), CCopasiObject::getObjectName(), CModelEntity::getRate(), CModelEntity::getStatus(), CModelEntity::getValue(), CQBaseDataModel::isDefaultRow(), mItemToType, rowCount(), and CModelEntity::StatusName.
Referenced by flags(), and setData().
|
virtual |
Reimplemented from CQBaseDataModel.
Definition at line 58 of file CQCompartmentDM.cpp.
References CModelEntity::ASSIGNMENT, COL_IVOLUME, COL_NAME_COMPARTMENTS, COL_TYPE_COMPARTMENTS, data(), FROM_UTF8, and CModelEntity::StatusName.
Referenced by data().
const std::vector< unsigned C_INT32 > & CQCompartmentDM::getItemToType | ( | ) |
Definition at line 44 of file CQCompartmentDM.cpp.
References mItemToType.
const QStringList & CQCompartmentDM::getTypes | ( | ) |
Definition at line 39 of file CQCompartmentDM.cpp.
References mTypes.
Referenced by CQCompartmentsWidget::CQCompartmentsWidget().
|
virtual |
Implements CQBaseDataModel.
Definition at line 164 of file CQCompartmentDM.cpp.
References COL_EXPRESSION_COMPARTMENTS, COL_IEXPRESSION_COMPARTMENTS, COL_IVOLUME, COL_NAME_COMPARTMENTS, COL_RATE_COMPARTMENTS, COL_ROW_NUMBER, COL_TYPE_COMPARTMENTS, COL_VOLUME, FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CModel::getVolumeRateUnitsDisplayString(), and CModel::getVolumeUnitsDisplayString().
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 277 of file CQCompartmentDM.cpp.
References ListViews::ADD, COL_NAME_COMPARTMENTS, ListViews::COMPARTMENT, CQBaseDataModel::createNewName(), CCopasiRootContainer::getDatamodelList(), CModelEntity::getKey(), CQBaseDataModel::notifyGUI(), and TO_UTF8.
bool CQCompartmentDM::removeRows | ( | QModelIndexList | rows, |
const QModelIndex & | index = QModelIndex() |
||
) |
Definition at line 327 of file CQCompartmentDM.cpp.
References C_INVALID_INDEX, CQMessageBox::confirmDelete(), FROM_UTF8, CModel::getCompartments(), CCopasiRootContainer::getDatamodelList(), CCompartment::getDeletedObjects(), CCopasiDataModel::getModel(), CCopasiObject::getObjectName(), CQBaseDataModel::isDefaultRow(), and CQBaseDataModel::removeRow().
Referenced by CQCompartmentsWidget::deleteSelectedCompartments().
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 292 of file CQCompartmentDM.cpp.
References CCopasiVector< T >::begin(), ListViews::COMPARTMENT, ListViews::DELETE, CModel::getCompartments(), CCopasiRootContainer::getDatamodelList(), ListViews::METABOLITE, and CQBaseDataModel::notifyGUI().
|
virtual |
Definition at line 49 of file CQCompartmentDM.cpp.
References CCopasiRootContainer::getDatamodelList().
Referenced by data(), and CQCompartmentsWidget::deleteSelectedCompartments().
|
virtual |
Implements CQBaseDataModel.
Definition at line 235 of file CQCompartmentDM.cpp.
References ListViews::CHANGE, COL_IVOLUME, COL_NAME_COMPARTMENTS, COL_TYPE_COMPARTMENTS, ListViews::COMPARTMENT, CQBaseDataModel::createNewName(), data(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CModelEntity::getKey(), CQBaseDataModel::insertRow(), CQBaseDataModel::isDefaultRow(), mItemToType, CQBaseDataModel::notifyGUI(), CModelEntity::setInitialValue(), CCopasiObject::setObjectName(), CModelEntity::setStatus(), CModelEntity::StatusName, and TO_UTF8.
|
protected |
A vector mapping the item index to a model valu type
Definition at line 58 of file CQCompartmentDM.h.
Referenced by CQCompartmentDM(), data(), getItemToType(), and setData().
|
protected |
Definition at line 54 of file CQCompartmentDM.h.
Referenced by CQCompartmentDM(), and getTypes().