From cb9fd780acc6b88c2ec3b4c43c4db2e9f028e816 Mon Sep 17 00:00:00 2001 From: Tuareg Date: Wed, 22 Jul 2020 17:06:40 +1200 Subject: [PATCH] Plugin implementation and reading of the variables Implementation of the plugin Mapping based on SampleView. The plugin can read and display in a list the variables of the open file. Sometime crashes when opening a file. --- CMakeLists.txt | 1 + .../editing/MappingView/CMakeLists.txt | 20 + .../MappingView/i18n/MappingView_fr.ts | 49 +++ .../MappingView/res/MappingView_i18n.qrc.in | 5 + .../MappingView/src/mappingviewplugin.cpp | 342 ++++++++++++++++++ .../MappingView/src/mappingviewplugin.h | 81 +++++ .../MappingView/src/mappingviewplugin.json | 3 + .../MappingView/src/mappingviewwidget.cpp | 180 +++++++++ .../src/mappingviewwidget.cpp.autosave | 180 +++++++++ .../MappingView/src/mappingviewwidget.h | 82 +++++ .../MappingView/src/mappingviewwidget.ui | 117 ++++++ 11 files changed, 1060 insertions(+) create mode 100644 src/plugins/editing/MappingView/CMakeLists.txt create mode 100644 src/plugins/editing/MappingView/i18n/MappingView_fr.ts create mode 100644 src/plugins/editing/MappingView/res/MappingView_i18n.qrc.in create mode 100644 src/plugins/editing/MappingView/src/mappingviewplugin.cpp create mode 100644 src/plugins/editing/MappingView/src/mappingviewplugin.h create mode 100644 src/plugins/editing/MappingView/src/mappingviewplugin.json create mode 100644 src/plugins/editing/MappingView/src/mappingviewwidget.cpp create mode 100644 src/plugins/editing/MappingView/src/mappingviewwidget.cpp.autosave create mode 100644 src/plugins/editing/MappingView/src/mappingviewwidget.h create mode 100644 src/plugins/editing/MappingView/src/mappingviewwidget.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index dc9896c18a..253e284aee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -916,6 +916,7 @@ if(USE_PREBUILT_QTWEBKIT_PACKAGE) editing/RawSEDMLView editing/RawTextView editing/SEDMLEditingView + editing/MappingView miscellaneous/Compiler miscellaneous/Core diff --git a/src/plugins/editing/MappingView/CMakeLists.txt b/src/plugins/editing/MappingView/CMakeLists.txt new file mode 100644 index 0000000000..67c4129195 --- /dev/null +++ b/src/plugins/editing/MappingView/CMakeLists.txt @@ -0,0 +1,20 @@ +project(MappingViewPlugin) + +# Add the plugin + +add_plugin(MappingView + SOURCES + ../../filehandlinginterface.cpp + ../../i18ninterface.cpp + ../../plugininfo.cpp + ../../plugininterface.cpp + ../../viewinterface.cpp + + src/mappingviewplugin.cpp + src/mappingviewwidget.cpp + UIS + src/mappingviewwidget.ui + PLUGINS + Core + CellMLSupport +) diff --git a/src/plugins/editing/MappingView/i18n/MappingView_fr.ts b/src/plugins/editing/MappingView/i18n/MappingView_fr.ts new file mode 100644 index 0000000000..de8559dd5d --- /dev/null +++ b/src/plugins/editing/MappingView/i18n/MappingView_fr.ts @@ -0,0 +1,49 @@ + + + + + MappingViewWidget + + File name: + Nom de fichier : + + + Locked: + Verrouillé : + + + SHA-1: + SHA-1 : + + + Size: + Taille : + + + Variables: + + + + + OpenCOR::MappingView::MappingViewPlugin + + Mapping + Mappeur + + + + OpenCOR::MappingView::MappingViewWidget + + Yes + Oui + + + No + Non + + + VICTOOOOIIIIIRE + + + + diff --git a/src/plugins/editing/MappingView/res/MappingView_i18n.qrc.in b/src/plugins/editing/MappingView/res/MappingView_i18n.qrc.in new file mode 100644 index 0000000000..818bd0347c --- /dev/null +++ b/src/plugins/editing/MappingView/res/MappingView_i18n.qrc.in @@ -0,0 +1,5 @@ + + + ${PROJECT_BUILD_DIR}/${PLUGIN_NAME}_fr.qm + + diff --git a/src/plugins/editing/MappingView/src/mappingviewplugin.cpp b/src/plugins/editing/MappingView/src/mappingviewplugin.cpp new file mode 100644 index 0000000000..884c1b5e8a --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewplugin.cpp @@ -0,0 +1,342 @@ +/******************************************************************************* + +Copyright (C) The University of Auckland + +OpenCOR is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenCOR is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*******************************************************************************/ + +//============================================================================== +// Mapping view plugin +//============================================================================== + +#include "coreguiutils.h" +#include "mappingviewplugin.h" +#include "mappingviewwidget.h" + +//============================================================================== + +#include +#include + +//============================================================================== + +namespace OpenCOR { +namespace MappingView { + +//============================================================================== + +PLUGININFO_FUNC MappingViewPluginInfo() +{ + Descriptions descriptions; + + descriptions.insert("en", QString::fromUtf8("a plugin that provides a test view.")); + descriptions.insert("fr", QString::fromUtf8("une extension qui fournit une vue de test.")); + + return new PluginInfo(PluginInfo::Category::Editing, true, false, + { "Core" }, + descriptions); +} + +//============================================================================== +// File handling interface +//============================================================================== + +bool MappingViewPlugin::importFile(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // We don't handle this interface... + + return false; +} + +//============================================================================== + +bool MappingViewPlugin::saveFile(const QString &pOldFileName, + const QString &pNewFileName, + bool &pNeedFeedback) +{ + Q_UNUSED(pOldFileName) + Q_UNUSED(pNewFileName) + Q_UNUSED(pNeedFeedback) + + // We don't handle this interface... + + return false; +} + +//============================================================================== + +void MappingViewPlugin::fileOpened(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::filePermissionsChanged(const QString &pFileName) +{ + // The given file has had its permissions changed, so update our view + // widget, if needed + + if (pFileName == mFileName) { + mViewWidget->update(pFileName); + } +} + +//============================================================================== + +void MappingViewPlugin::fileModified(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::fileSaved(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::fileReloaded(const QString &pFileName) +{ + // The given file has been reloaded, so update our view widget, if needed + + if (pFileName == mFileName) { + mViewWidget->update(pFileName); + } +} + +//============================================================================== + +void MappingViewPlugin::fileRenamed(const QString &pOldFileName, + const QString &pNewFileName) +{ + Q_UNUSED(pOldFileName) + + // The given file has been renamed, so update our view widget, if needed + + if (pOldFileName == mFileName) { + mFileName = pNewFileName; + + mViewWidget->update(pNewFileName); + } +} + +//============================================================================== + +void MappingViewPlugin::fileClosed(const QString &pFileName) +{ + // The given file has been closed, so update our internals, if needed + + if (pFileName == mFileName) { + mFileName = QString(); + } +} + +//============================================================================== +// I18n interface +//============================================================================== + +void MappingViewPlugin::retranslateUi() +{ + // Retranslate our view widget, if needed + + if (!mFileName.isEmpty()) { + mViewWidget->retranslateUi(); + } +} + +//============================================================================== +// Plugin interface +//============================================================================== + +bool MappingViewPlugin::definesPluginInterfaces() +{ + // We don't handle this interface... + + return false; +} + +//============================================================================== + +bool MappingViewPlugin::pluginInterfacesOk(const QString &pFileName, + QObject *pInstance) +{ + Q_UNUSED(pFileName) + Q_UNUSED(pInstance) + + // We don't handle this interface... + + return false; +} + +//============================================================================== + +void MappingViewPlugin::initializePlugin() +{ + // Create our Mapping view widget + + mViewWidget = new MappingViewWidget(Core::mainWindow()); + + // Hide our Mapping view widget since it may not initially be shown in our + // central widget + + mViewWidget->setVisible(false); +} + +//============================================================================== + +void MappingViewPlugin::finalizePlugin() +{ + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::pluginsInitialized(const Plugins &pLoadedPlugins) +{ + Q_UNUSED(pLoadedPlugins) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::loadSettings(QSettings &pSettings) +{ + Q_UNUSED(pSettings) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::saveSettings(QSettings &pSettings) const +{ + Q_UNUSED(pSettings) + + // We don't handle this interface... +} + +//============================================================================== + +void MappingViewPlugin::handleUrl(const QUrl &pUrl) +{ + Q_UNUSED(pUrl) + + // We don't handle this interface... +} + +//============================================================================== +// View interface +//============================================================================== + +ViewInterface::Mode MappingViewPlugin::viewMode() const +{ + // Return our mode + + return ViewInterface::Mode::Editing; +} + +//============================================================================== + +QStringList MappingViewPlugin::viewMimeTypes() const +{ + // Return the MIME types we support, i.e. any in our case + + return {}; +} + +//============================================================================== + +QString MappingViewPlugin::viewMimeType(const QString &pFileName) const +{ + Q_UNUSED(pFileName) + + // Return the MIME type for the given file + + return {}; +} + +//============================================================================== + +QString MappingViewPlugin::viewDefaultFileExtension() const +{ + // Return the default file extension we support + + return {}; +} + +//============================================================================== + +QWidget * MappingViewPlugin::viewWidget(const QString &pFileName) +{ + // Update and return our Mapping view widget using the given file + + mFileName = pFileName; + + mViewWidget->update(pFileName); + + return mViewWidget; +} + +//============================================================================== + +void MappingViewPlugin::removeViewWidget(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // Reset our internals + + mFileName = QString(); +} + +//============================================================================== + +QString MappingViewPlugin::viewName() const +{ + // Return our Mapping view's name + + return tr("Mapping"); +} + +//============================================================================== + +QIcon MappingViewPlugin::fileTabIcon(const QString &pFileName) const +{ + Q_UNUSED(pFileName) + + // We don't handle this interface... + + return {}; +} + +//============================================================================== + +} // namespace MappingView +} // namespace OpenCOR + +//============================================================================== +// End of file +//============================================================================== diff --git a/src/plugins/editing/MappingView/src/mappingviewplugin.h b/src/plugins/editing/MappingView/src/mappingviewplugin.h new file mode 100644 index 0000000000..2e757bcbda --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewplugin.h @@ -0,0 +1,81 @@ +/******************************************************************************* + +Copyright (C) The University of Auckland + +OpenCOR is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenCOR is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*******************************************************************************/ + +//============================================================================== +// Mapping view plugin +//============================================================================== + +#pragma once + +//============================================================================== + +#include "filehandlinginterface.h" +#include "i18ninterface.h" +#include "plugininfo.h" +#include "plugininterface.h" +#include "viewinterface.h" + +//============================================================================== + +namespace OpenCOR { +namespace MappingView { + +//============================================================================== + +PLUGININFO_FUNC MappingViewPluginInfo(); + +//============================================================================== + +class MappingViewWidget; + +//============================================================================== + +class MappingViewPlugin : public QObject, public FileHandlingInterface, + public I18nInterface, public PluginInterface, + public ViewInterface +{ + Q_OBJECT + + Q_PLUGIN_METADATA(IID "OpenCOR.MappingViewPlugin" FILE "mappingviewplugin.json") + + Q_INTERFACES(OpenCOR::FileHandlingInterface) + Q_INTERFACES(OpenCOR::I18nInterface) + Q_INTERFACES(OpenCOR::PluginInterface) + Q_INTERFACES(OpenCOR::ViewInterface) + +public: +#include "filehandlinginterface.inl" +#include "i18ninterface.inl" +#include "plugininterface.inl" +#include "viewinterface.inl" + +private: + MappingViewWidget *mViewWidget = nullptr; + + QString mFileName; +}; + +//============================================================================== + +} // namespace MappingView +} // namespace OpenCOR + +//============================================================================== +// End of file +//============================================================================== diff --git a/src/plugins/editing/MappingView/src/mappingviewplugin.json b/src/plugins/editing/MappingView/src/mappingviewplugin.json new file mode 100644 index 0000000000..d93afaac2b --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewplugin.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "MappingViewPlugin" ] +} diff --git a/src/plugins/editing/MappingView/src/mappingviewwidget.cpp b/src/plugins/editing/MappingView/src/mappingviewwidget.cpp new file mode 100644 index 0000000000..301dd61ebe --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewwidget.cpp @@ -0,0 +1,180 @@ +/******************************************************************************* + +Copyright (C) The University of Auckland + +OpenCOR is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenCOR is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*******************************************************************************/ + +//============================================================================== +// Mapping view widget +//============================================================================== + +#include "corecliutils.h" +#include "filemanager.h" +#include "mappingviewwidget.h" + +#include "cellmlfilemanager.h" + +//============================================================================== + +#include "ui_mappingviewwidget.h" + +//============================================================================== + +#include +#include + +//============================================================================== + +namespace OpenCOR { +namespace MappingView { + +//============================================================================== + +MappingViewWidget::MappingViewWidget(QWidget *pParent) : + ViewWidget(pParent), + mGui(new Ui::MappingViewWidget) +{ + // Delete the layout that comes with ViewWidget + + delete layout(); + + // Set up the GUI + + mGui->setupUi(this); + +} + +//============================================================================== + +MappingViewWidget::~MappingViewWidget() +{ + // Delete the GUI + + delete mGui; +} + +//============================================================================== + +void MappingViewWidget::retranslateUi() +{ + // Retranslate our GUI + + mGui->retranslateUi(this); + + // Update ourself too since some widgets will have been reset following the + // retranslation (e.g. mGui->fileNameValue) + + update(mFileName); +} + +//============================================================================== + +QWidget * MappingViewWidget::widget(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // Return the requested (self) widget + + return this; +} + +//============================================================================== + +void MappingViewWidget::update(const QString &pFileName) +{ + // Keep track of the given file name + + mFileName = pFileName; + + // Initialise our GUI with some information about the given file + + mGui->fileNameValue->setText(pFileName); + + Core::FileManager *fileManagerInstance = Core::FileManager::instance(); + + mGui->lockedValue->setText(fileManagerInstance->isLocked(pFileName)?tr("Yes"):tr("No")); + + QString sha1Value = fileManagerInstance->sha1(pFileName); + + mGui->sha1Value->setText(sha1Value.isEmpty()?"???":sha1Value); + mGui->sizeValue->setText(Core::sizeAsString(quint64(QFile(pFileName).size()))); + + mListViewModel= new QStringListModel(this); //TODO defining only when charging the plugin ? + + mGui->variablesList->setModel(mListViewModel); //TODO set only when charging the plugin ? + + // Retrieve the requested CellML file + + mCellmlFile = CellMLSupport::CellmlFileManager::instance()->cellmlFile(pFileName); + + populateCellmlModel(); +} + +void MappingViewWidget::populateCellmlModel() +{ + QStringList list; + + // Make sure that we have a model before actually populating ourselves + + iface::cellml_api::Model *cellmlModel = mCellmlFile->model(); + + if (cellmlModel == nullptr) { + return; + } + + // Retrieve the model's components + + ObjRef components = cellmlModel->localComponents(); + + if (components->length() != 0) { + + // Retrieve the model's components themselves + + ObjRef componentsIter = components->iterateComponents(); + + for (ObjRef component = componentsIter->nextComponent(); + component != nullptr; component = componentsIter->nextComponent()) { + + // Retrieve the model's component's variables + + ObjRef componentVariables = component->variables(); + + if (componentVariables->length() != 0) { + // Retrieve the model's component's variables themselves + + ObjRef componentVariablesIter = componentVariables->iterateVariables(); + + for (ObjRef componentVariable = componentVariablesIter->nextVariable(); + componentVariable != nullptr; componentVariable = componentVariablesIter->nextVariable()) { + + list.append(QString::fromStdWString(componentVariable->name())); + } + } + } + } + + mListViewModel->setStringList(list); +} + + +//============================================================================== + +} // namespace MappingView +} // namespace OpenCOR + +//============================================================================== +// End of file +//============================================================================== diff --git a/src/plugins/editing/MappingView/src/mappingviewwidget.cpp.autosave b/src/plugins/editing/MappingView/src/mappingviewwidget.cpp.autosave new file mode 100644 index 0000000000..ff01ba277e --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewwidget.cpp.autosave @@ -0,0 +1,180 @@ +/******************************************************************************* + +Copyright (C) The University of Auckland + +OpenCOR is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenCOR is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*******************************************************************************/ + +//============================================================================== +// Mapping view widget +//============================================================================== + +#include "corecliutils.h" +#include "filemanager.h" +#include "mappingviewwidget.h" + +#include "cellmlfilemanager.h" + +//============================================================================== + +#include "ui_mappingviewwidget.h" + +//============================================================================== + +#include +#include + +//============================================================================== + +namespace OpenCOR { +namespace MappingView { + +//============================================================================== + +MappingViewWidget::MappingViewWidget(QWidget *pParent) : + ViewWidget(pParent), + mGui(new Ui::MappingViewWidget) +{ + // Delete the layout that comes with ViewWidget + + delete layout(); + + // Set up the GUI + + mGui->setupUi(this); + +} + +//============================================================================== + +MappingViewWidget::~MappingViewWidget() +{ + // Delete the GUI + + delete mGui; +} + +//============================================================================== + +void MappingViewWidget::retranslateUi() +{ + // Retranslate our GUI + + mGui->retranslateUi(this); + + // Update ourself too since some widgets will have been reset following the + // retranslation (e.g. mGui->fileNameValue) + + update(mFileName); +} + +//============================================================================== + +QWidget * MappingViewWidget::widget(const QString &pFileName) +{ + Q_UNUSED(pFileName) + + // Return the requested (self) widget + + return this; +} + +//============================================================================== + +void MappingViewWidget::update(const QString &pFileName) +{ + // Keep track of the given file name + + mFileName = pFileName; + + // Initialise our GUI with some information about the given file + + mGui->fileNameValue->setText(pFileName); + + Core::FileManager *fileManagerInstance = Core::FileManager::instance(); + + mGui->lockedValue->setText(fileManagerInstance->isLocked(pFileName)?tr("Yes"):tr("No")); + + QString sha1Value = fileManagerInstance->sha1(pFileName); + + mGui->sha1Value->setText(sha1Value.isEmpty()?"???":sha1Value); + mGui->sizeValue->setText(Core::sizeAsString(quint64(QFile(pFileName).size()))); + + mListViewModel= new QStringListModel(this); //TODO defining only when charging the plugin ? + + mGui->variablesList->setModel(mListViewModel); //TODO set only when charging the plugin ? + + // Retrieve the requested CellML file + + mCellmlFile = CellMLSupport::CellmlFileManager::instance()->cellmlFile(pFileName); + //TODO can be null + populateCellmlModel(); +} + +void MappingViewWidget::populateCellmlModel() +{ + QStringList list; + + // Make sure that we have a model before actually populating ourselves + + iface::cellml_api::Model *cellmlModel = mCellmlFile->model(); + + if (cellmlModel == nullptr) { + return; + } + + // Retrieve the model's components + + ObjRef components = cellmlModel->localComponents(); + + if (components->length() != 0) { + + // Retrieve the model's components themselves + + ObjRef componentsIter = components->iterateComponents(); + + for (ObjRef component = componentsIter->nextComponent(); + component != nullptr; component = componentsIter->nextComponent()) { + + // Retrieve the model's component's variables + + ObjRef componentVariables = component->variables(); + + if (componentVariables->length() != 0) { + // Retrieve the model's component's variables themselves + + ObjRef componentVariablesIter = componentVariables->iterateVariables(); + + for (ObjRef componentVariable = componentVariablesIter->nextVariable(); + componentVariable != nullptr; componentVariable = componentVariablesIter->nextVariable()) { + + list.append(QString::fromStdWString(componentVariable->name())); + } + } + } + } + + mListViewModel->setStringList(list); +} + + +//============================================================================== + +} // namespace MappingView +} // namespace OpenCOR + +//============================================================================== +// End of file +//============================================================================== diff --git a/src/plugins/editing/MappingView/src/mappingviewwidget.h b/src/plugins/editing/MappingView/src/mappingviewwidget.h new file mode 100644 index 0000000000..0a85f0e0d6 --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewwidget.h @@ -0,0 +1,82 @@ +/******************************************************************************* + +Copyright (C) The University of Auckland + +OpenCOR is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +OpenCOR is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +*******************************************************************************/ + +//============================================================================== +// Mapping view widget +//============================================================================== + +#pragma once + +//============================================================================== + +#include "viewwidget.h" +#include "cellmlfile.h" + +//============================================================================== + +#include + +//============================================================================== + +namespace Ui { + class MappingViewWidget; +} // namespace Ui + +//============================================================================== + +namespace OpenCOR { +namespace MappingView { + +//============================================================================== + +class MappingViewWidget : public Core::ViewWidget +{ + Q_OBJECT + +public: + explicit MappingViewWidget(QWidget *pParent); + ~MappingViewWidget() override; + + void retranslateUi() override; + + QWidget * widget(const QString &pFileName) override; + + void update(const QString &pFileName); + +private: + Ui::MappingViewWidget *mGui; + + CellMLSupport::CellmlFile *mCellmlFile; + + QStringListModel *mListViewModel; + + QString mFileName; + + void populateCellmlModel(); + +}; + +//============================================================================== + +} // namespace MappingView +} // namespace OpenCOR + +//============================================================================== +// End of file +//============================================================================== diff --git a/src/plugins/editing/MappingView/src/mappingviewwidget.ui b/src/plugins/editing/MappingView/src/mappingviewwidget.ui new file mode 100644 index 0000000000..09582cfe8a --- /dev/null +++ b/src/plugins/editing/MappingView/src/mappingviewwidget.ui @@ -0,0 +1,117 @@ + + + MappingViewWidget + + + + 0 + 0 + 404 + 409 + + + + + + + + 75 + true + + + + File name: + + + + + + + + + + + + + + + 75 + true + + + + Locked: + + + + + + + + + + + + + + + 75 + true + + + + SHA-1: + + + + + + + + + + + + + + + 75 + true + + + + Size: + + + + + + + + + + + + + + + 75 + true + + + + false + + + Variables: + + + + + + + + + + +