COPASI API
4.16.103
|
#include <CQFunctionDM.h>
Public Member Functions | |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
CQFunctionDM (QObject *parent=0) | |
QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
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) |
![]() | |
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()) |
Private Member Functions | |
bool | isFunctionReadOnly (const QModelIndex &index) const |
Additional Inherited Members | |
![]() | |
void | notifyGUI (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="") |
Definition at line 32 of file CQFunctionDM.h.
CQFunctionDM::CQFunctionDM | ( | QObject * | parent = 0 | ) |
Definition at line 22 of file CQFunctionDM.cpp.
|
virtual |
Definition at line 32 of file CQFunctionDM.cpp.
References TOTAL_COLS_FUNCTIONS.
Referenced by CQFunctionsWidget::keyPressEvent().
|
virtual |
Implements CQBaseDataModel.
Definition at line 72 of file CQFunctionDM.cpp.
References COL_MATH_DESC_FUNCTIONS, COL_NAME_FUNCTIONS, COL_ROW_NUMBER, COL_SBML_ID_FUNCTIONS, COL_TYPE_FUNCTIONS, flags(), FROM_UTF8, CCopasiRootContainer::getFunctionList(), CEvaluationTree::getInfix(), CCopasiObject::getObjectName(), CEvaluationTree::getType(), CQBaseDataModel::isDefaultRow(), CFunctionDB::loadedFunctions(), rowCount(), and CEvaluationTree::TypeName.
Referenced by setData().
|
virtual |
Reimplemented from CQBaseDataModel.
Definition at line 37 of file CQFunctionDM.cpp.
References COL_NAME_FUNCTIONS, CQBaseDataModel::isDefaultRow(), and isFunctionReadOnly().
Referenced by data().
|
virtual |
Implements CQBaseDataModel.
Definition at line 129 of file CQFunctionDM.cpp.
References COL_MATH_DESC_FUNCTIONS, COL_NAME_FUNCTIONS, COL_ROW_NUMBER, COL_SBML_ID_FUNCTIONS, and COL_TYPE_FUNCTIONS.
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 219 of file CQFunctionDM.cpp.
References CFunctionDB::add(), ListViews::ADD, COL_NAME_FUNCTIONS, CQBaseDataModel::createNewName(), ListViews::FUNCTION, CCopasiRootContainer::getFunctionList(), CFunction::getKey(), CQBaseDataModel::notifyGUI(), and TO_UTF8.
|
private |
Definition at line 51 of file CQFunctionDM.cpp.
References CEvaluationTree::Expression, CEvaluationTree::Function, CCopasiRootContainer::getFunctionList(), CEvaluationTree::getType(), CFunctionDB::loadedFunctions(), CEvaluationTree::MassAction, CEvaluationTree::MathExpression, CEvaluationTree::PreDefined, and CEvaluationTree::UserDefined.
Referenced by flags(), and removeRows().
bool CQFunctionDM::removeRows | ( | QModelIndexList | rows, |
const QModelIndex & | index = QModelIndex() |
||
) |
Definition at line 279 of file CQFunctionDM.cpp.
References C_INVALID_INDEX, CQMessageBox::confirmDelete(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CEvaluationTree::getDeletedObjects(), CCopasiRootContainer::getFunctionList(), CCopasiDataModel::getModel(), CCopasiObject::getObjectName(), CQBaseDataModel::isDefaultRow(), CFunctionDB::loadedFunctions(), and CQBaseDataModel::removeRow().
Referenced by CQFunctionsWidget::deleteSelectedFunctions().
|
protectedvirtual |
Implements CQBaseDataModel.
Definition at line 235 of file CQFunctionDM.cpp.
References CCopasiVector< T >::begin(), ListViews::DELETE, ListViews::FUNCTION, CCopasiRootContainer::getFunctionList(), isFunctionReadOnly(), CFunctionDB::loadedFunctions(), CQBaseDataModel::notifyGUI(), and CFunctionDB::removeFunction().
|
virtual |
Definition at line 28 of file CQFunctionDM.cpp.
References CCopasiRootContainer::getFunctionList(), CFunctionDB::loadedFunctions(), and CCopasiVector< T >::size().
Referenced by data(), and CQFunctionsWidget::deleteSelectedFunctions().
|
virtual |
Implements CQBaseDataModel.
Definition at line 157 of file CQFunctionDM.cpp.
References ListViews::CHANGE, COL_MATH_DESC_FUNCTIONS, COL_NAME_FUNCTIONS, COL_TYPE_FUNCTIONS, CQBaseDataModel::createNewName(), data(), FROM_UTF8, ListViews::FUNCTION, CCopasiRootContainer::getFunctionList(), CCopasiObject::getKey(), CCopasiObject::getObjectName(), CQMessageBox::information(), CQBaseDataModel::insertRow(), CQBaseDataModel::isDefaultRow(), CFunctionDB::loadedFunctions(), CQBaseDataModel::notifyGUI(), CEvaluationTree::setInfix(), CCopasiObject::setObjectName(), and TO_UTF8.