Skip to content

Commit

Permalink
Bug 3209: CCopasiParameter::setValue call CCopasiParameterGroup::sign…
Browse files Browse the repository at this point in the history
…alChanged.
  • Loading branch information
shoops committed Mar 14, 2024
1 parent ae5207e commit 3d75e03
Show file tree
Hide file tree
Showing 31 changed files with 143 additions and 100 deletions.
3 changes: 1 addition & 2 deletions copasi/MIRIAM/CMIRIAMResource.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -30,7 +30,6 @@
#define COPASI_CMIRIAMResource

#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include <time.h>
#include <string>
#include "copasi/utilities/CProcessReport.h"
Expand Down
5 changes: 3 additions & 2 deletions copasi/UI/CQMmlScrollView.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -26,14 +26,15 @@
#include <QApplication>

#include "copasi/copasi.h"
#include "qtUtilities.h"

#ifdef HAVE_MML
# include <qtmmlwidget.h>
#endif // HAVE_MML

#include "CQMmlScrollView.h"

#include "qtUtilities.h"

/// Constructor
CQMmlScrollView::CQMmlScrollView(QWidget* parent, const char* /* name */, Qt::WindowFlags /* fl */)
: QScrollArea(parent)
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQParameterGroupDM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -24,7 +24,7 @@

#include "qtUtilities.h"

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/resourcesUI/CQIconResource.h"

#define COL_NAME 0
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQParameterGroupView.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -25,7 +25,7 @@
#include "copasi/copasi.h"
#include "copasi/UI/qtUtilities.h"

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"

#include "copasi/CopasiDataModel/CDataModel.h"
#include "copasi/UI/CQParameterGroupDM.h"
Expand Down
3 changes: 1 addition & 2 deletions copasi/UI/CQSimpleSelectionTree.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -22,7 +22,6 @@
#include "copasi/model/CMetab.h"
#include "copasi/model/CReaction.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CExpressionGenerator.h"
#include "copasi/core/CDataObject.h"
#include "copasi/core/CDataContainer.h"
Expand Down
5 changes: 3 additions & 2 deletions copasi/UI/CQTabWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -18,12 +18,13 @@
#include "CQTabWidget.h"

#include "CQMessageBox.h"
#include "qtUtilities.h"
#include "CQNotes.h"

#include "copasi/MIRIAMUI/CQMiriamWidget.h"
#include "copasi/MIRIAMUI/CQRDFTreeView.h"

#include "qtUtilities.h"

#include "copasi/CopasiDataModel/CDataModel.h"
#include "copasi/core/CRootContainer.h"
#include "copasi/function/CFunction.h"
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CScanItemData.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -15,7 +15,7 @@

#include "copasi/copasi.h"
#include "CScanItemData.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"

CScanItemData::CScanItemData() :
mType(CScanProblem::SCAN_BREAK),
Expand Down
2 changes: 1 addition & 1 deletion copasi/UI/CScanWidgetTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "copasi/copasi.h"

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/core/CRegisteredCommonName.h"
#include "copasi/scan/CScanProblem.h"

Expand Down
67 changes: 35 additions & 32 deletions copasi/UI/qtUtilities.cpp
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.

// Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and University of
// of Connecticut School of Medicine.
// All rights reserved.

// Copyright (C) 2010 - 2016 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and The University
// of Manchester.
// All rights reserved.

// Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., EML Research, gGmbH, University of Heidelberg,
// and The University of Manchester.
// All rights reserved.

// Copyright (C) 2003 - 2007 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc. and EML Research, gGmbH.
// All rights reserved.
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.

// Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and University of
// of Connecticut School of Medicine.
// All rights reserved.

// Copyright (C) 2010 - 2016 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and The University
// of Manchester.
// All rights reserved.

// Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., EML Research, gGmbH, University of Heidelberg,
// and The University of Manchester.
// All rights reserved.

// Copyright (C) 2003 - 2007 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc. and EML Research, gGmbH.
// All rights reserved.

#include <QtCore/QString>
#include <QtCore/QFileInfo>
Expand All @@ -38,7 +38,7 @@
#include <copasi/commandline/CConfigurationFile.h>
#include "qtUtilities.h"
#include "CQMessageBox.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CDirEntry.h"
#include "copasiWidget.h"
#include "CQCopasiApplication.h"
Expand Down Expand Up @@ -109,14 +109,18 @@ QVariant getParameterValue(const CCopasiParameter * pParameter)
case CCopasiParameter::Type::GROUP:
{
const CCopasiParameterGroup * pGroup = dynamic_cast<const CCopasiParameterGroup *>(pParameter);

if (pGroup != NULL)
{
QList<QVariant> group;
for (size_t i = 0; i < pGroup->size(); ++i)
group.append(getParameterValue(pGroup->getParameter(i)));
return QVariant(group);
}
{
QList<QVariant> group;

for (size_t i = 0; i < pGroup->size(); ++i)
group.append(getParameterValue(pGroup->getParameter(i)));

return QVariant(group);
}
}

case CCopasiParameter::Type::INVALID:
break;
}
Expand Down Expand Up @@ -394,7 +398,6 @@ QString toTsvString(QAbstractItemView* pWidget,
return toTsvString(pModel, writeColumnHeaders, writeRowHeaders);
}


bool isDarkMode()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Expand All @@ -410,5 +413,5 @@ bool isDarkMode()

bool isLightMode()
{
return !isDarkMode();
return !isDarkMode();
}
4 changes: 2 additions & 2 deletions copasi/bindings/swig/CCopasiParameterGroup.i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -25,7 +25,7 @@

%{

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"

%}

Expand Down
4 changes: 2 additions & 2 deletions copasi/commandline/CConfigurationFile.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -25,7 +25,7 @@
#ifndef COPASI_CConfigurationFile
#define COPASI_CConfigurationFile

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/MIRIAM/CMIRIAMResource.h"
#include "copasi/xml/CCopasiXMLInterface.h"

Expand Down
4 changes: 2 additions & 2 deletions copasi/model/CReaction.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -43,7 +43,7 @@
#include "copasi/model/CCompartment.h"

#include "copasi/core/CDataVector.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/function/CFunction.h"
#include "copasi/function/CCallParameters.h"
#include "copasi/function/CFunctionParameters.h"
Expand Down
4 changes: 2 additions & 2 deletions copasi/optimization/COptItem.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -37,7 +37,7 @@
#include "copasi/core/CDataContainer.h"
#include "copasi/CopasiDataModel/CDataModel.h"
#include "copasi/core/CRegisteredCommonName.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CCopasiMessage.h"
#include "copasi/utilities/utility.h"

Expand Down
4 changes: 2 additions & 2 deletions copasi/optimization/COptItem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand All @@ -25,7 +25,7 @@
#ifndef COPASI_COptItem
#define COPASI_COptItem

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/math/CMathUpdateSequence.h"

class CCommonName;
Expand Down
4 changes: 2 additions & 2 deletions copasi/parameterFitting/CExperiment.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -30,7 +30,7 @@
#include "copasi/core/CDataVector.h"
#include "copasi/core/CMatrix.h"
#include "copasi/core/CVector.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CCopasiTask.h"

class CExperimentObjectMap;
Expand Down
4 changes: 2 additions & 2 deletions copasi/parameterFitting/CExperimentObjectMap.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -28,7 +28,7 @@
#include "copasi/core/CVector.h"
#include "copasi/parameterFitting/CExperiment.h"

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"

class CMathContainer;

Expand Down
4 changes: 2 additions & 2 deletions copasi/parameterFitting/CExperimentSet.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -28,7 +28,7 @@
#include <string>

#include "copasi/core/CMatrix.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/utilities/CCopasiTask.h"

class CExperiment;
Expand Down
4 changes: 2 additions & 2 deletions copasi/parameterFitting/CFitItem.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -30,7 +30,7 @@
#include "CFitItem.h"

#include "copasi/report/CKeyFactory.h"
#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/CopasiDataModel/CDataModel.h"
#include "copasi/core/CRootContainer.h"

Expand Down
4 changes: 2 additions & 2 deletions copasi/plot/CPlotItem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -33,7 +33,7 @@
#include <vector>
#include "copasi/copasi.h"

#include "copasi/utilities/CCopasiParameterGroup.h"
#include "copasi/utilities/CCopasiParameter.h"
#include "copasi/core/CRegisteredCommonName.h"
#include "copasi/output/COutputHandler.h"

Expand Down
Loading

0 comments on commit 3d75e03

Please sign in to comment.