Skip to content

Commit

Permalink
Renamed MappingView in CellMLZincMappingView
Browse files Browse the repository at this point in the history
  • Loading branch information
LafCorentin committed Aug 10, 2020
1 parent 8f5193b commit 9ae8364
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 255 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -916,7 +916,7 @@ if(USE_PREBUILT_QTWEBKIT_PACKAGE)
editing/RawSEDMLView
editing/RawTextView
editing/SEDMLEditingView
editing/MappingView
editing/CellMLZincMappingView

miscellaneous/Compiler
miscellaneous/Core
Expand Down
@@ -1,20 +1,19 @@
project(MappingViewPlugin)
project(CellMLZincMappingViewPlugin)

# Add the plugin

add_plugin(MappingView
add_plugin(CellMLZincMappingView
SOURCES
../../filehandlinginterface.cpp
../../i18ninterface.cpp
../../plugininfo.cpp
../../plugininterface.cpp
../../viewinterface.cpp

src/mappingvieweditingwidget.cpp
src/mappingviewmeshreader.cpp
src/mappingviewplugin.cpp
src/mappingviewwidget.cpp
src/mappingviewzincwidget.cpp
src/cellmlzincmappingvieweditingwidget.cpp
src/cellmlzincmappingviewplugin.cpp
src/cellmlzincmappingviewwidget.cpp
src/cellmlzincmappingviewzincwidget.cpp
PLUGINS
Core
CellMLSupport
Expand Down
Expand Up @@ -2,10 +2,10 @@
<!DOCTYPE TS>
<TS version="2.1" language="fr_FR" sourcelanguage="en_GB">
<context>
<name>OpenCOR::MappingView::MappingViewPlugin</name>
<name>OpenCOR::CellMLZincMappingView::CellMLZincMappingViewPlugin</name>
<message>
<source>Mapping</source>
<translation>Mappeur</translation>
<translation type="unfinished">Mappeur</translation>
</message>
</context>
</TS>
Expand Up @@ -24,8 +24,7 @@ along with this program. If not, see <https://gnu.org/licenses>.
#include "cellmlfilemanager.h"
#include "corecliutils.h"
#include "filemanager.h"
#include "mappingvieweditingwidget.h"
#include "mappingviewmeshreader.h"
#include "cellmlzincmappingvieweditingwidget.h"
#include "toolbarwidget.h"
#include "zincwidget.h"

Expand All @@ -48,29 +47,29 @@ along with this program. If not, see <https://gnu.org/licenses>.
//==============================================================================

namespace OpenCOR {
namespace MappingView {
namespace CellMLZincMappingView {

//==============================================================================

MappingViewEditingModel::MappingViewEditingModel(QObject *pParent) :
CellMLZincMappingViewEditingModel::CellMLZincMappingViewEditingModel(QObject *pParent) :
QStandardItemModel(pParent)
{
}

//==============================================================================

const char *MappingViewEditingModel::MappingViewEdittingMimeType = "opencor/mapping-view-editting";
const char *CellMLZincMappingViewEditingModel::MappingViewEdittingMimeType = "opencor/mapping-view-editting";

//==============================================================================

QStringList MappingViewEditingModel::mimeTypes() const
QStringList CellMLZincMappingViewEditingModel::mimeTypes() const
{
return {MappingViewEdittingMimeType};
}

//==============================================================================

QMimeData * MappingViewEditingModel::mimeData(const QModelIndexList &pIndexes) const
QMimeData * CellMLZincMappingViewEditingModel::mimeData(const QModelIndexList &pIndexes) const
{
auto res = new QMimeData();
QString names;
Expand Down Expand Up @@ -114,7 +113,7 @@ MappingViewEditingWidget::MappingViewEditingWidget(const QString &pFileName,
mDelayWidget->setRange(0.0, 100.0);
mDelayWidget->setWheelBorderWidth(0);

mDelayWidget->setValue(MappingViewZincWidget::nodeSizeOrigin);
mDelayWidget->setValue(CellMLZincMappingViewZincWidget::nodeSizeOrigin);

mToolBarWidget->addWidget(mDelayWidget);

Expand All @@ -139,7 +138,7 @@ MappingViewEditingWidget::MappingViewEditingWidget(const QString &pFileName,
mVariableTree = new QTreeView(this);
mVariableTree->setDragEnabled(true);

mVariableTreeModel = new MappingViewEditingModel();
mVariableTreeModel = new CellMLZincMappingViewEditingModel();
mVariableTree->setModel(mVariableTreeModel);

mHorizontalSplitterWidget->addWidget(mVariableTree);
Expand All @@ -154,10 +153,10 @@ MappingViewEditingWidget::MappingViewEditingWidget(const QString &pFileName,

// add a Zinc widget

mZincWidget = new MappingViewZincWidget(this, mMeshFileName, this);
mZincWidget = new CellMLZincMappingViewZincWidget(this, mMeshFileName, this);

connect(mDelayWidget, &QwtWheel::valueChanged,
mZincWidget, &MappingViewZincWidget::setNodeSizes );
mZincWidget, &CellMLZincMappingViewZincWidget::setNodeSizes );

mHorizontalSplitterWidget->addWidget(mZincWidget);

Expand Down
Expand Up @@ -27,7 +27,7 @@ along with this program. If not, see <https://gnu.org/licenses>.

#include "cellmlfile.h"
#include "corecliutils.h"
#include "mappingviewzincwidget.h"
#include "cellmlzincmappingviewzincwidget.h"
#include "splitterwidget.h"
#include "viewwidget.h"

Expand Down Expand Up @@ -61,19 +61,19 @@ namespace Core {

//==============================================================================

namespace MappingView {
namespace CellMLZincMappingView {

//==============================================================================


class MappingViewEditingModel : public QStandardItemModel
class CellMLZincMappingViewEditingModel : public QStandardItemModel
{
Q_OBJECT

public:
static const char *MappingViewEdittingMimeType;

explicit MappingViewEditingModel(QObject *pParent = nullptr);
explicit CellMLZincMappingViewEditingModel(QObject *pParent = nullptr);

QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList &pIndexes) const override;
Expand Down Expand Up @@ -106,13 +106,13 @@ class MappingViewEditingWidget : public Core::Widget

Core::SplitterWidget *mVerticalSplitterWidget;
Core::SplitterWidget *mHorizontalSplitterWidget;
MappingViewZincWidget *mZincWidget;
CellMLZincMappingViewZincWidget *mZincWidget;

QLabel *mNodeValue;
QLabel *mVariableValue;
QTreeView *mVariableTree;

MappingViewEditingModel *mVariableTreeModel;
CellMLZincMappingViewEditingModel *mVariableTreeModel;

QString mMeshFileName;

Expand Down

0 comments on commit 9ae8364

Please sign in to comment.