COPASI API  4.16.103
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
CopasiWidget Class Reference

#include <copasiWidget.h>

Inheritance diagram for CopasiWidget:
Inheritance graph
[legend]
Collaboration diagram for CopasiWidget:
Collaboration graph
[legend]

Public Member Functions

 CopasiWidget (QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
 
bool enter (const std::string &key)
 
CCopasiDataModelgetDataModel ()
 
bool getIgnoreUpdates ()
 
virtual bool leave ()
 
virtual void setFramework (int framework)
 
void setIgnoreUpdates (bool v)
 
virtual bool update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
 

Protected Slots

virtual bool protectedNotify (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="")
 

Protected Member Functions

virtual bool enterProtected ()
 

Protected Attributes

int mFramework
 
bool mIgnoreUpdates
 
std::string mKey
 
CCopasiDataModelmpDataModel
 
ListViewsmpListView
 
CCopasiObjectmpObject
 

Detailed Description

Definition at line 45 of file copasiWidget.h.

Constructor & Destructor Documentation

CopasiWidget::CopasiWidget ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WFlags  f = 0 
)

Definition at line 27 of file copasiWidget.cpp.

References mpListView.

28  : QWidget(parent, f),
29  mpListView(NULL),
30  mKey(),
31  mpObject(NULL),
32  mpDataModel(NULL),
33  mIgnoreUpdates(false),
34  mFramework(0)
35 {
36  setObjectName(name);
37  QObject *pParent = parent;
38 
39  while (pParent != NULL &&
40  (mpListView = dynamic_cast< ListViews * >(pParent)) == NULL)
41  {
42  pParent = pParent->parent();
43  }
44 
45  assert(mpListView != NULL);
46 }
CCopasiObject * mpObject
Definition: copasiWidget.h:64
bool mIgnoreUpdates
Definition: copasiWidget.h:67
ListViews * mpListView
Definition: copasiWidget.h:62
CCopasiDataModel * mpDataModel
Definition: copasiWidget.h:65
std::string mKey
Definition: copasiWidget.h:63

Member Function Documentation

bool CopasiWidget::enter ( const std::string &  key)

Definition at line 54 of file copasiWidget.cpp.

References enterProtected(), CKeyFactory::get(), CCopasiRootContainer::getKeyFactory(), CCopasiObject::getObjectDataModel(), mKey, mpDataModel, and mpObject.

Referenced by CQPlotSubwidget::addPlot(), CQReportDefinition::btnCopyReportClicked(), CQReportDefinition::btnDeleteReportClicked(), CQReportDefinition::btnNewReportClicked(), CQPlotSubwidget::copyPlot(), CQPlotSubwidget::deletePlot(), SliderDialog::runCrossSectionTask(), SliderDialog::runLNATask(), SliderDialog::runMCATask(), SliderDialog::runOptimizationTask(), SliderDialog::runParameterEstimationTask(), SliderDialog::runScanTask(), SliderDialog::runTimeCourse(), ListViews::slotFolderChanged(), and CQModelWidget::update().

55 {
56  mKey = key;
58 
59  if (mpObject != NULL)
60  {
62  }
63  else
64  {
65  mpDataModel = NULL;
66  }
67 
68  return enterProtected();
69 }
CCopasiDataModel * getObjectDataModel()
virtual bool enterProtected()
CCopasiObject * get(const std::string &key)
CCopasiObject * mpObject
Definition: copasiWidget.h:64
CCopasiDataModel * mpDataModel
Definition: copasiWidget.h:65
static CKeyFactory * getKeyFactory()
std::string mKey
Definition: copasiWidget.h:63
bool CopasiWidget::enterProtected ( )
protectedvirtual
CCopasiDataModel * CopasiWidget::getDataModel ( )

Definition at line 105 of file copasiWidget.cpp.

References mpDataModel.

106 {
107  return mpDataModel;
108 }
CCopasiDataModel * mpDataModel
Definition: copasiWidget.h:65
bool CopasiWidget::getIgnoreUpdates ( )

Definition at line 95 of file copasiWidget.cpp.

References mIgnoreUpdates.

Referenced by CQMiriamWidget::update().

96 {
97  return mIgnoreUpdates;
98 }
bool mIgnoreUpdates
Definition: copasiWidget.h:67
bool CopasiWidget::leave ( )
virtual
bool CopasiWidget::protectedNotify ( ListViews::ObjectType  objectType,
ListViews::Action  action,
const std::string &  key = "" 
)
protectedvirtualslot

Definition at line 79 of file copasiWidget.cpp.

References ListViews::getDataModel(), mIgnoreUpdates, mpListView, and DataModelGUI::notify().

Referenced by CQPlotSubwidget::addPlot(), TaskWidget::assistantBtnClicked(), CQReportDefinition::btnCopyReportClicked(), CQReportDefinition::btnDeleteReportClicked(), CQReportDefinition::btnNewReportClicked(), TaskWidget::commonAfterRunTask(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQPlotSubwidget::copyPlot(), CQCompartmentsWidget::CQCompartmentsWidget(), CQEventsWidget::CQEventsWidget(), CQFunctionsWidget::CQFunctionsWidget(), CQGlobalQuantitiesWidget::CQGlobalQuantitiesWidget(), CQLayoutsWidget::CQLayoutsWidget(), CQMiriamWidget::CQMiriamWidget(), CQParameterSetsWidget::CQParameterSetsWidget(), CQPlotsWidget::CQPlotsWidget(), CQReactionsWidget::CQReactionsWidget(), CQReportsWidget::CQReportsWidget(), CQSpeciesWidget::CQSpeciesWidget(), CQPlotSubwidget::deletePlot(), CQParameterOverviewWidget::leave(), CQTabWidget::save(), CQModelWidget::save(), CQReportDefinition::save(), CQSpeciesDetail::save(), CQCompartment::save(), CQModelValue::save(), CQNotes::save(), CQEventWidget1::saveToEvent(), FunctionWidget1::saveToFunction(), CQPlotSubwidget::saveToPlotSpec(), ReactionsWidget1::saveToReaction(), CQParameterOverviewWidget::slotBtnCopy(), CQParameterOverviewWidget::slotBtnDelete(), FunctionWidget1::slotBtnDelete(), ReactionsWidget1::slotBtnDelete(), CQSpeciesDetail::slotBtnDelete(), CQCompartment::slotBtnDelete(), CQModelValue::slotBtnDelete(), CQEventWidget1::slotBtnDelete(), CQParameterOverviewWidget::slotBtnNew(), FunctionWidget1::slotBtnNew(), ReactionsWidget1::slotBtnNew(), CQSpeciesDetail::slotBtnNew(), CQCompartment::slotBtnNew(), CQModelValue::slotBtnNew(), CQEventWidget1::slotBtnNew(), CQParameterOverviewWidget::slotBtnSaveAs(), CQMoietiesTaskResult::slotCreateGlobalQuantity(), ReactionsWidget1::slotNewFunction(), CQSteadyStateResult::slotUpdateModel(), and CQFittingWidget::taskFinishedEvent().

80 {
81  bool notifyRun = false;
82 
83  if (!mIgnoreUpdates)
84  {
85  mIgnoreUpdates = true;
86  mpListView->getDataModel()->notify(objectType, action, key);
87  notifyRun = true;
88  }
89 
90  mIgnoreUpdates = false;
91 
92  return notifyRun;
93 }
objectType
bool notify(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="")
bool mIgnoreUpdates
Definition: copasiWidget.h:67
ListViews * mpListView
Definition: copasiWidget.h:62
DataModelGUI * getDataModel()
Definition: listviews.h:134
void CopasiWidget::setFramework ( int  framework)
virtual
void CopasiWidget::setIgnoreUpdates ( bool  v)

Definition at line 100 of file copasiWidget.cpp.

References mIgnoreUpdates.

101 {
102  mIgnoreUpdates = v;
103 }
bool mIgnoreUpdates
Definition: copasiWidget.h:67
bool CopasiWidget::update ( ListViews::ObjectType  objectType,
ListViews::Action  action,
const std::string &  key 
)
virtual

Member Data Documentation

int CopasiWidget::mFramework
protected
bool CopasiWidget::mIgnoreUpdates
protected
std::string CopasiWidget::mKey
protected

Definition at line 63 of file copasiWidget.h.

Referenced by CQReportDefinition::btnCopyReportClicked(), CQPlotSubwidget::commitPlot(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQPlotSubwidget::copyPlot(), CQReportDefinition::CQReportDefinition(), CQPlotSubwidget::deletePlot(), enter(), CQTabWidget::enterProtected(), CQModelWidget::enterProtected(), CQReportDefinition::enterProtected(), CQRDFTreeView::enterProtected(), CQNotes::enterProtected(), FunctionWidget1::functionParametersChanged(), CQParameterOverviewWidget::leave(), FunctionWidget1::leave(), CQNotes::leave(), CQTabWidget::load(), ScanWidget::loadTask(), SensitivitiesWidget::loadTask(), SteadyStateWidget::loadTask(), CQPlotSubwidget::resetPlot(), CQFittingWidget::runTask(), CQLNAWidget::runTask(), CQLyapWidget::runTask(), CQMCAWidget::runTask(), CQOptimizationWidget::runTask(), CQTabWidget::save(), CQModelWidget::save(), CQReportDefinition::save(), CQSpeciesDetail::save(), CQCompartment::save(), CQModelValue::save(), CQNotes::save(), ScanWidget::saveTask(), SensitivitiesWidget::saveTask(), SteadyStateWidget::saveTask(), CQEventWidget1::saveToEvent(), FunctionWidget1::saveToFunction(), CQPlotSubwidget::saveToPlotSpec(), ReactionsWidget1::saveToReaction(), ReactionsWidget1::setFramework(), CQMiriamWidget::showEvent(), FunctionWidget1::slotBtnCopy(), CQModelValue::slotBtnCopy(), CQEventWidget1::slotBtnCopy(), CQMiriamWidget::slotBtnCopy(), CQNotes::slotBtnCopy(), CQParameterOverviewWidget::slotBtnDelete(), FunctionWidget1::slotBtnDelete(), ReactionsWidget1::slotBtnDelete(), CQSpeciesDetail::slotBtnDelete(), CQCompartment::slotBtnDelete(), CQModelValue::slotBtnDelete(), CQEventWidget1::slotBtnDelete(), ReactionsWidget1::slotGotoFunction(), CQFittingWidget::taskFinishedEvent(), CQParameterSetsWidget::update(), CQParameterOverviewWidget::update(), CQSpeciesDetail::update(), CQTabWidget::update(), FunctionWidget1::update(), CQModelValue::update(), CQReportDefinition::update(), ReactionsWidget1::update(), CQPlotSubwidget::update(), and CQNotes::update().

CCopasiDataModel* CopasiWidget::mpDataModel
protected
ListViews* CopasiWidget::mpListView
protected

Definition at line 62 of file copasiWidget.h.

Referenced by CQPlotSubwidget::addPlot(), CQReportDefinition::btnCopyReportClicked(), CQReportDefinition::btnNewReportClicked(), CopasiWidget(), CQSpeciesDetail::copy(), CQCompartment::copy(), ReactionsWidget1::copy(), CQPlotSubwidget::copyPlot(), CQSpeciesDetail::enterProtected(), CQModelValue::enterProtected(), CQReportDefinition::enterProtected(), CQEventWidget1::enterProtected(), FunctionWidget1::enterProtected(), ReactionsWidget1::enterProtected(), CQPlotSubwidget::enterProtected(), CQCrossSectionTaskWidget::init(), protectedNotify(), TaskWidget::reportBtnClicked(), CQParameterOverviewWidget::slotBtnCopy(), FunctionWidget1::slotBtnNew(), ReactionsWidget1::slotBtnNew(), CQSpeciesDetail::slotBtnNew(), CQCompartment::slotBtnNew(), CQModelValue::slotBtnNew(), CQEventWidget1::slotBtnNew(), CQParameterSetsWidget::slotDoubleClicked(), CQPlotsWidget::slotDoubleClicked(), CQReactionsWidget::slotDoubleClicked(), CQReportsWidget::slotDoubleClicked(), CQEventsWidget::slotDoubleClicked(), CQFunctionsWidget::slotDoubleClicked(), CQCompartmentsWidget::slotDoubleClicked(), CQGlobalQuantitiesWidget::slotDoubleClicked(), CQSpeciesWidget::slotDoubleClicked(), ReactionsWidget1::slotGotoFunction(), CQCompartment::slotMetaboliteTableCurrentChanged(), ReactionsWidget1::slotNewFunction(), CQSpeciesDetail::slotSwitchToReaction(), CQMoietiesTaskWidget::taskFinishedEvent(), CQCrossSectionTaskWidget::taskFinishedEvent(), CQEFMWidget::taskFinishedEvent(), CQLyapWidget::taskFinishedEvent(), CQMCAWidget::taskFinishedEvent(), CQLNAWidget::taskFinishedEvent(), SensitivitiesWidget::taskFinishedEvent(), SteadyStateWidget::taskFinishedEvent(), CQTSSAWidget::taskFinishedEvent(), and CQTrajectoryWidget::taskFinishedEvent().

CCopasiObject* CopasiWidget::mpObject
protected

The documentation for this class was generated from the following files: