COPASI API
4.16.103
|
#include <DataModelGUI.h>
Public Slots | |
void | exportMathModelFinished () |
void | exportSBMLFinished () |
void | exportSBMLToStringFinished () |
void | importSBMLFinished () |
void | importSBMLFromStringFinished () |
void | loadModelFinished () |
void | miriamDownloadFinished (QNetworkReply *) |
void | miriamDownloadProgress (qint64 received, qint64 total) |
void | saveModelFinished () |
Signals | |
void | finished (bool success) |
void | notifyView (ListViews::ObjectType objectType, ListViews::Action action, std::string key="") |
void | updateCompleteView () |
Public Member Functions | |
void | buildChangedObjects () |
void | commit () |
bool | createModel () |
DataModelGUI (QObject *parent) | |
void | deregisterListView (ListViews *pListView) |
void | exportMathModel (const std::string &fileName, const std::string &filter, bool overwriteFile=false) |
void | exportMathModelRun () |
void | exportSBML (const std::string &fileName, bool overwriteFile, int sbmlLevel, int sbmlVersion, bool exportIncomplete, bool exportCOPASIMIRIAM=true) |
void | exportSBMLRun () |
void | exportSBMLToString (std::string &sbmlDocumentText) |
void | exportSBMLToStringRun () |
COutputDefinitionVector & | getPlotDefinitionList () |
void | importCellDesigner () |
void | importSBML (const std::string &fileName) |
void | importSBMLFromString (const std::string &sbmlDocumentText) |
void | importSBMLFromStringRun () |
void | importSBMLRun () |
void | loadFunctionDB (const std::string &fileName) |
void | loadModel (const std::string &fileName) |
void | loadModelRun () |
bool | notify (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="") |
void | refreshInitialValues () |
void | registerListView (ListViews *pListView) |
void | saveFunctionDB (const std::string &fileName) |
void | saveModel (const std::string &fileName, bool overwriteFile=false) |
void | saveModelRun () |
void | setFramework (int framework) |
bool | updateMIRIAM (CMIRIAMResources &miriamResources) |
void | updateMIRIAMResourceContents () |
virtual | ~DataModelGUI () |
Private Member Functions | |
void | linkDataModelToGUI () |
void | threadFinished () |
Private Attributes | |
std::set< const CCopasiObject * > | mChangedObjects |
unsigned int | mDownloadedBytes |
unsigned int | mDownloadedTotalBytes |
std::string | mExportFormat |
std::string | mFileName |
int | mFramework |
std::set< ListViews * > | mListViews |
COutputHandlerPlot | mOutputHandlerPlot |
bool | mOverWrite |
QApplication * | mpApp |
CMIRIAMResources * | mpMiriamResources |
CProgressBar * | mpProgressBar |
std::string * | mpSBMLExportString |
CQThread * | mpThread |
bool | mSBMLExportCOPASIMIRIAM |
bool | mSBMLExportIncomplete |
std::string | mSBMLImportString |
int | mSBMLLevel |
int | mSBMLVersion |
bool | mSuccess |
size_t | mUpdateItem |
std::vector< Refresh * > | mUpdateVector |
Definition at line 34 of file DataModelGUI.h.
DataModelGUI::DataModelGUI | ( | QObject * | parent | ) |
Definition at line 79 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), and mOutputHandlerPlot.
|
virtual |
Definition at line 117 of file DataModelGUI.cpp.
void DataModelGUI::buildChangedObjects | ( | ) |
Definition at line 634 of file DataModelGUI.cpp.
References CArrayAnnotation::appendElementReferences(), CModelEntity::ASSIGNMENT, CCopasiVector< T >::begin(), CModel::buildInitialRefreshSequence(), CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CQMessageBox::critical(), CCopasiVector< T >::end(), CStateTemplate::endFixed(), FROM_UTF8, CCopasiRootContainer::getDatamodelList(), CStateTemplate::getEntities(), CMetab::getInitialConcentration(), CMetab::getInitialConcentrationReference(), CModelEntity::getInitialValueReference(), CCopasiMessage::getLastMessage(), CCopasiContainer::getObject(), CCopasiParameterGroup::getParameter(), CModel::getReactions(), CModel::getStateTemplate(), CMetab::isInitialConcentrationChangeAllowed(), mChangedObjects, mFramework, mUpdateVector, and CCopasiParameterGroup::size().
Referenced by refreshInitialValues().
void DataModelGUI::commit | ( | ) |
Definition at line 768 of file DataModelGUI.cpp.
References mListViews.
Referenced by CopasiUI3Window::exportSBMLToString(), CopasiUI3Window::importSBMLFromString(), CopasiUI3Window::newDoc(), CopasiUI3Window::slotApplyInitialState(), CopasiUI3Window::slotConvertToIrreversible(), CopasiUI3Window::slotExportMathModel(), CopasiUI3Window::slotExportSBML(), CopasiUI3Window::slotFileOpen(), CopasiUI3Window::slotFileSave(), CopasiUI3Window::slotFileSaveAs(), CopasiUI3Window::slotFrameworkChanged(), CopasiUI3Window::slotFunctionDBLoad(), CopasiUI3Window::slotFunctionDBSave(), CopasiUI3Window::slotImportSBML(), CopasiUI3Window::slotQuit(), and CopasiUI3Window::slotUpdateInitialState().
bool DataModelGUI::createModel | ( | ) |
Definition at line 200 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), getPlotDefinitionList(), linkDataModelToGUI(), mOutputHandlerPlot, and COutputHandlerPlot::setOutputDefinitionVector().
Referenced by CopasiUI3Window::newDoc(), CopasiUI3Window::slotFileOpenFinished(), CopasiUI3Window::slotImportSBMLFinished(), and CopasiUI3Window::slotImportSBMLFromStringFinished().
Definition at line 628 of file DataModelGUI.cpp.
References mListViews, and ListViews::setDataModel().
Referenced by CopasiUI3Window::~CopasiUI3Window().
void DataModelGUI::exportMathModel | ( | const std::string & | fileName, |
const std::string & | filter, | ||
bool | overwriteFile = false |
||
) |
Definition at line 487 of file DataModelGUI.cpp.
References CProgressBar::create(), exportMathModelFinished(), exportMathModelRun(), finished(), mExportFormat, mFileName, mOverWrite, mpProgressBar, mpThread, and mSuccess.
Referenced by exportMathModelRun(), and CopasiUI3Window::slotExportMathModel().
|
slot |
Definition at line 515 of file DataModelGUI.cpp.
References finished(), mpThread, and threadFinished().
Referenced by exportMathModel().
void DataModelGUI::exportMathModelRun | ( | ) |
Definition at line 501 of file DataModelGUI.cpp.
References exportMathModel(), CCopasiRootContainer::getDatamodelList(), mExportFormat, mFileName, mOverWrite, mpProgressBar, and mSuccess.
Referenced by exportMathModel().
void DataModelGUI::exportSBML | ( | const std::string & | fileName, |
bool | overwriteFile, | ||
int | sbmlLevel, | ||
int | sbmlVersion, | ||
bool | exportIncomplete, | ||
bool | exportCOPASIMIRIAM = true |
||
) |
Definition at line 446 of file DataModelGUI.cpp.
References CProgressBar::create(), exportSBMLFinished(), exportSBMLRun(), finished(), mFileName, mOverWrite, mpProgressBar, mpThread, mSBMLExportCOPASIMIRIAM, mSBMLExportIncomplete, mSBMLLevel, mSBMLVersion, and mSuccess.
Referenced by exportSBMLRun(), and CopasiUI3Window::slotExportSBML().
|
slot |
Definition at line 477 of file DataModelGUI.cpp.
References CRecentFiles::addFile(), finished(), CCopasiRootContainer::getConfiguration(), CConfigurationFile::getRecentSBMLFiles(), mFileName, mpThread, mSuccess, and threadFinished().
Referenced by exportSBML().
void DataModelGUI::exportSBMLRun | ( | ) |
Definition at line 463 of file DataModelGUI.cpp.
References exportSBML(), CCopasiRootContainer::getDatamodelList(), mFileName, mOverWrite, mpProgressBar, mSBMLExportCOPASIMIRIAM, mSBMLExportIncomplete, mSBMLLevel, mSBMLVersion, and mSuccess.
Referenced by exportSBML().
void DataModelGUI::exportSBMLToString | ( | std::string & | sbmlDocumentText | ) |
Definition at line 395 of file DataModelGUI.cpp.
References CProgressBar::create(), exportSBMLToStringFinished(), exportSBMLToStringRun(), finished(), mpProgressBar, mpSBMLExportString, mpThread, and mSuccess.
Referenced by CopasiUI3Window::exportSBMLToString(), and exportSBMLToStringRun().
|
slot |
Definition at line 421 of file DataModelGUI.cpp.
References finished(), mpThread, and threadFinished().
Referenced by exportSBMLToString().
void DataModelGUI::exportSBMLToStringRun | ( | ) |
Definition at line 407 of file DataModelGUI.cpp.
References exportSBMLToString(), CCopasiRootContainer::getDatamodelList(), mpProgressBar, mpSBMLExportString, and mSuccess.
Referenced by exportSBMLToString().
|
signal |
Referenced by exportMathModel(), exportMathModelFinished(), exportSBML(), exportSBMLFinished(), exportSBMLToString(), exportSBMLToStringFinished(), importSBML(), importSBMLFinished(), importSBMLFromString(), importSBMLFromStringFinished(), loadModel(), loadModelFinished(), miriamDownloadFinished(), saveModel(), saveModelFinished(), threadFinished(), and updateMIRIAM().
COutputDefinitionVector& DataModelGUI::getPlotDefinitionList | ( | ) |
Referenced by createModel(), importSBMLFinished(), importSBMLFromStringFinished(), and loadModelFinished().
void DataModelGUI::importCellDesigner | ( | ) |
This method tries to import CellDesigner annotations.
Definition at line 782 of file DataModelGUI.cpp.
References CListOfLayouts::addLayout(), SBMLDocumentLoader::createLayout(), CCellDesignerImporter::determineVersion(), CCellDesignerImporter::findCellDesignerAnnotation(), CCellDesignerImporter::findCellDesignerNamespace(), CCopasiDataModel::getCopasi2SBMLMap(), CCopasiDataModel::getCurrentSBMLDocument(), CCopasiRootContainer::getDatamodelList(), SBMLUtils::getIdFromSBase(), CCellDesignerImporter::getLayout(), CCopasiDataModel::getListOfLayouts(), CQMessageBox::question(), CCopasiMessage::RAW, and CCopasiMessage::WARNING.
Referenced by importSBMLFinished(), and importSBMLFromStringFinished().
void DataModelGUI::importSBML | ( | const std::string & | fileName | ) |
Definition at line 354 of file DataModelGUI.cpp.
References CProgressBar::create(), finished(), importSBMLFinished(), importSBMLRun(), mFileName, mpProgressBar, mpThread, and mSuccess.
Referenced by importSBMLRun(), and CopasiUI3Window::slotImportSBML().
|
slot |
Definition at line 379 of file DataModelGUI.cpp.
References CRecentFiles::addFile(), finished(), CCopasiRootContainer::getConfiguration(), CCopasiRootContainer::getDatamodelList(), getPlotDefinitionList(), CConfigurationFile::getRecentSBMLFiles(), importCellDesigner(), linkDataModelToGUI(), mFileName, mOutputHandlerPlot, mpThread, mSuccess, COutputHandlerPlot::setOutputDefinitionVector(), and threadFinished().
Referenced by importSBML().
void DataModelGUI::importSBMLFromString | ( | const std::string & | sbmlDocumentText | ) |
Definition at line 290 of file DataModelGUI.cpp.
References CProgressBar::create(), finished(), importSBMLFromStringFinished(), importSBMLFromStringRun(), mpProgressBar, mpThread, mSBMLImportString, and mSuccess.
Referenced by CopasiUI3Window::importSBMLFromString(), and importSBMLFromStringRun().
|
slot |
Definition at line 316 of file DataModelGUI.cpp.
References finished(), CCopasiRootContainer::getDatamodelList(), getPlotDefinitionList(), importCellDesigner(), linkDataModelToGUI(), mOutputHandlerPlot, mpThread, mSBMLImportString, mSuccess, COutputHandlerPlot::setOutputDefinitionVector(), and threadFinished().
Referenced by importSBMLFromString().
void DataModelGUI::importSBMLFromStringRun | ( | ) |
Definition at line 302 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), importSBMLFromString(), mpProgressBar, mSBMLImportString, and mSuccess.
Referenced by importSBMLFromString().
void DataModelGUI::importSBMLRun | ( | ) |
Definition at line 365 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), importSBML(), mFileName, mpProgressBar, and mSuccess.
Referenced by importSBML().
|
private |
Definition at line 123 of file DataModelGUI.cpp.
References CCopasiDataModel::deleteOldData(), CCopasiRootContainer::getDatamodelList(), and mListViews.
Referenced by createModel(), importSBMLFinished(), importSBMLFromStringFinished(), and loadModelFinished().
void DataModelGUI::loadFunctionDB | ( | const std::string & | fileName | ) |
Definition at line 344 of file DataModelGUI.cpp.
References ListViews::DELETE, ListViews::FUNCTION, CCopasiRootContainer::getFunctionList(), CFunctionDB::load(), and notify().
Referenced by CopasiUI3Window::slotFunctionDBLoad().
void DataModelGUI::loadModel | ( | const std::string & | fileName | ) |
Definition at line 212 of file DataModelGUI.cpp.
References CProgressBar::create(), finished(), loadModelFinished(), loadModelRun(), mFileName, mpProgressBar, mpThread, and mSuccess.
Referenced by loadModelRun(), and CopasiUI3Window::slotFileOpen().
|
slot |
Definition at line 238 of file DataModelGUI.cpp.
References CRecentFiles::addFile(), finished(), CCopasiRootContainer::getConfiguration(), CCopasiRootContainer::getDatamodelList(), getPlotDefinitionList(), CConfigurationFile::getRecentFiles(), linkDataModelToGUI(), mFileName, mOutputHandlerPlot, mpThread, mSuccess, COutputHandlerPlot::setOutputDefinitionVector(), and threadFinished().
Referenced by loadModel().
void DataModelGUI::loadModelRun | ( | ) |
Definition at line 224 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), loadModel(), mFileName, mpProgressBar, and mSuccess.
Referenced by loadModel().
|
slot |
Definition at line 522 of file DataModelGUI.cpp.
References finished(), COptions::getValue(), mDownloadedBytes, mpMiriamResources, mpProgressBar, mUpdateItem, pdelete, CProgressBar::progressItem(), and CMIRIAMResources::updateMIRIAMResourcesFromFile().
Referenced by updateMIRIAM().
|
slot |
Definition at line 561 of file DataModelGUI.cpp.
References mDownloadedBytes, mpProgressBar, mUpdateItem, and CProgressBar::progressItem().
Referenced by updateMIRIAM().
bool DataModelGUI::notify | ( | ListViews::ObjectType | objectType, |
ListViews::Action | action, | ||
const std::string & | key = "" |
||
) |
Definition at line 607 of file DataModelGUI.cpp.
References mpProgressBar, notifyView(), refreshInitialValues(), and ListViews::RENAME.
Referenced by CopasiUI3Window::importSBMLFromString(), loadFunctionDB(), CQReportDefinitionSelect::loadReportDefinitionVector(), CopasiUI3Window::newDoc(), CopasiWidget::protectedNotify(), CopasiUI3Window::slotApplyInitialState(), CopasiUI3Window::slotConvertToIrreversible(), CopasiUI3Window::slotExpandModel(), CopasiUI3Window::slotFileOpen(), CopasiUI3Window::slotFileOpenFinished(), CopasiUI3Window::slotImportSBML(), CopasiUI3Window::slotImportSBMLFinished(), CopasiUI3Window::slotImportSBMLFromStringFinished(), and CopasiUI3Window::slotUpdateInitialState().
|
signal |
Referenced by notify().
void DataModelGUI::refreshInitialValues | ( | ) |
Definition at line 728 of file DataModelGUI.cpp.
References buildChangedObjects(), CCopasiRootContainer::getDatamodelList(), mUpdateVector, and CModel::refreshActiveParameterSet().
Referenced by notify(), CopasiSlider::setValue(), SliderDialog::updateAllSliders(), and CopasiSlider::updateValue().
Definition at line 622 of file DataModelGUI.cpp.
References mListViews, and ListViews::setDataModel().
Referenced by CopasiUI3Window::CopasiUI3Window().
void DataModelGUI::saveFunctionDB | ( | const std::string & | fileName | ) |
Definition at line 335 of file DataModelGUI.cpp.
References CCopasiRootContainer::getFunctionList(), and CFunctionDB::save().
Referenced by CopasiUI3Window::slotFunctionDBSave().
void DataModelGUI::saveModel | ( | const std::string & | fileName, |
bool | overwriteFile = false |
||
) |
Definition at line 253 of file DataModelGUI.cpp.
References CProgressBar::create(), finished(), mFileName, mOverWrite, mpProgressBar, mpThread, mSuccess, saveModelFinished(), and saveModelRun().
Referenced by saveModelRun(), CopasiUI3Window::slotFileSave(), and CopasiUI3Window::slotFileSaveAs().
|
slot |
Definition at line 280 of file DataModelGUI.cpp.
References CRecentFiles::addFile(), finished(), CCopasiRootContainer::getConfiguration(), CConfigurationFile::getRecentFiles(), mFileName, mpThread, mSuccess, and threadFinished().
Referenced by saveModel().
void DataModelGUI::saveModelRun | ( | ) |
Definition at line 266 of file DataModelGUI.cpp.
References CCopasiRootContainer::getDatamodelList(), mFileName, mOverWrite, mpProgressBar, mSuccess, and saveModel().
Referenced by saveModel().
void DataModelGUI::setFramework | ( | int | framework | ) |
Definition at line 744 of file DataModelGUI.cpp.
References mFramework, and mListViews.
Referenced by CopasiUI3Window::slotFrameworkChanged().
|
private |
Definition at line 428 of file DataModelGUI.cpp.
References CProgressBar::finish(), finished(), mpProgressBar, mpThread, and mSuccess.
Referenced by exportMathModelFinished(), exportSBMLFinished(), exportSBMLToStringFinished(), importSBMLFinished(), importSBMLFromStringFinished(), loadModelFinished(), and saveModelFinished().
|
signal |
bool DataModelGUI::updateMIRIAM | ( | CMIRIAMResources & | miriamResources | ) |
Definition at line 580 of file DataModelGUI.cpp.
References CProgressBar::create(), finished(), mDownloadedBytes, mDownloadedTotalBytes, miriamDownloadFinished(), miriamDownloadProgress(), mpMiriamResources, mpProgressBar, mUpdateItem, and CProgressBar::setName().
Referenced by CopasiUI3Window::slotUpdateMIRIAM().
void DataModelGUI::updateMIRIAMResourceContents | ( | ) |
Definition at line 757 of file DataModelGUI.cpp.
References mListViews.
Referenced by CopasiUI3Window::slotUpdateMIRIAMFinished().
|
private |
Definition at line 141 of file DataModelGUI.h.
Referenced by buildChangedObjects().
|
private |
Definition at line 156 of file DataModelGUI.h.
Referenced by miriamDownloadFinished(), miriamDownloadProgress(), and updateMIRIAM().
|
private |
Definition at line 157 of file DataModelGUI.h.
Referenced by updateMIRIAM().
|
private |
Definition at line 154 of file DataModelGUI.h.
Referenced by exportMathModel(), and exportMathModelRun().
|
private |
Definition at line 148 of file DataModelGUI.h.
Referenced by exportMathModel(), exportMathModelRun(), exportSBML(), exportSBMLFinished(), exportSBMLRun(), importSBML(), importSBMLFinished(), importSBMLRun(), loadModel(), loadModelFinished(), loadModelRun(), saveModel(), saveModelFinished(), and saveModelRun().
|
private |
Definition at line 139 of file DataModelGUI.h.
Referenced by buildChangedObjects(), and setFramework().
|
private |
Definition at line 138 of file DataModelGUI.h.
Referenced by commit(), deregisterListView(), linkDataModelToGUI(), registerListView(), setFramework(), and updateMIRIAMResourceContents().
|
private |
Definition at line 137 of file DataModelGUI.h.
Referenced by createModel(), DataModelGUI(), importSBMLFinished(), importSBMLFromStringFinished(), and loadModelFinished().
|
private |
Definition at line 149 of file DataModelGUI.h.
Referenced by exportMathModel(), exportMathModelRun(), exportSBML(), exportSBMLRun(), saveModel(), and saveModelRun().
|
private |
Definition at line 136 of file DataModelGUI.h.
|
private |
Definition at line 155 of file DataModelGUI.h.
Referenced by miriamDownloadFinished(), and updateMIRIAM().
|
private |
Definition at line 144 of file DataModelGUI.h.
Referenced by exportMathModel(), exportMathModelRun(), exportSBML(), exportSBMLRun(), exportSBMLToString(), exportSBMLToStringRun(), importSBML(), importSBMLFromString(), importSBMLFromStringRun(), importSBMLRun(), loadModel(), loadModelRun(), miriamDownloadFinished(), miriamDownloadProgress(), notify(), saveModel(), saveModelRun(), threadFinished(), and updateMIRIAM().
|
private |
Definition at line 147 of file DataModelGUI.h.
Referenced by exportSBMLToString(), and exportSBMLToStringRun().
|
private |
Definition at line 143 of file DataModelGUI.h.
Referenced by exportMathModel(), exportMathModelFinished(), exportSBML(), exportSBMLFinished(), exportSBMLToString(), exportSBMLToStringFinished(), importSBML(), importSBMLFinished(), importSBMLFromString(), importSBMLFromStringFinished(), loadModel(), loadModelFinished(), saveModel(), saveModelFinished(), and threadFinished().
|
private |
Definition at line 153 of file DataModelGUI.h.
Referenced by exportSBML(), and exportSBMLRun().
|
private |
Definition at line 152 of file DataModelGUI.h.
Referenced by exportSBML(), and exportSBMLRun().
|
private |
Definition at line 146 of file DataModelGUI.h.
Referenced by importSBMLFromString(), importSBMLFromStringFinished(), and importSBMLFromStringRun().
|
private |
Definition at line 150 of file DataModelGUI.h.
Referenced by exportSBML(), and exportSBMLRun().
|
private |
Definition at line 151 of file DataModelGUI.h.
Referenced by exportSBML(), and exportSBMLRun().
|
private |
Definition at line 145 of file DataModelGUI.h.
Referenced by exportMathModel(), exportMathModelRun(), exportSBML(), exportSBMLFinished(), exportSBMLRun(), exportSBMLToString(), exportSBMLToStringRun(), importSBML(), importSBMLFinished(), importSBMLFromString(), importSBMLFromStringFinished(), importSBMLFromStringRun(), importSBMLRun(), loadModel(), loadModelFinished(), loadModelRun(), saveModel(), saveModelFinished(), saveModelRun(), and threadFinished().
|
private |
Definition at line 158 of file DataModelGUI.h.
Referenced by miriamDownloadFinished(), miriamDownloadProgress(), and updateMIRIAM().
|
private |
Definition at line 140 of file DataModelGUI.h.
Referenced by buildChangedObjects(), and refreshInitialValues().