COPASI API
4.16.103
|
#include <CQPlotSubwidget.h>
Public Member Functions | |
CQPlotSubwidget (QWidget *parent=0, const char *name=0, Qt::WFlags fl=0) | |
void | createHistograms (std::vector< const CCopasiObject * >objects, const C_FLOAT64 &incr) |
virtual bool | leave () |
virtual bool | update (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key) |
~CQPlotSubwidget () | |
![]() | |
CopasiWidget (QWidget *parent=0, const char *name=0, Qt::WFlags f=0) | |
bool | enter (const std::string &key) |
CCopasiDataModel * | getDataModel () |
bool | getIgnoreUpdates () |
virtual void | setFramework (int framework) |
void | setIgnoreUpdates (bool v) |
Protected Slots | |
void | addCurveSlot () |
void | addHistoSlot () |
void | addPlot () |
void | commitPlot () |
void | copyPlot () |
void | deletePlot () |
void | itemSelectionChanged () |
void | removeCurve () |
void | resetPlot () |
![]() | |
virtual bool | protectedNotify (ListViews::ObjectType objectType, ListViews::Action action, const std::string &key="") |
Protected Member Functions | |
void | addCurve2D () |
void | addCurveTab (const std::string &title, const CPlotDataChannelSpec &x, const CPlotDataChannelSpec &y) |
void | addHisto1D () |
void | addHisto1DTab (const std::string &title, const CPlotDataChannelSpec &x, const C_FLOAT64 &incr) |
virtual bool | enterProtected () |
bool | loadFromPlotSpec (const CPlotSpecification *) |
bool | saveToPlotSpec () |
Protected Attributes | |
CPlotItem::Type | mType |
![]() | |
int | mFramework |
bool | mIgnoreUpdates |
std::string | mKey |
CCopasiDataModel * | mpDataModel |
ListViews * | mpListView |
CCopasiObject * | mpObject |
Private Member Functions | |
void | addPlotItem (CPlotItem *item) |
bool | areOfSameType (QList< QListWidgetItem * > &items) |
void | deleteCurve (int index) |
void | deleteCurve (QListWidgetItem *item) |
void | deleteCurves () |
int | getCurrentIndex () |
int | getRow (QListWidgetItem *item) |
CQPlotEditWidget * | selectControl (CPlotItem::Type type) |
void | selectPlotItem (CPlotItem *item) |
void | setCurrentIndex (int index) |
void | storeChanges () |
CPlotItem * | updateItem (CPlotItem *item) |
Private Attributes | |
CPlotItem * | mLastItem |
QList< QListWidgetItem * > | mLastSelection |
QMap< QString, CPlotItem * > | mList |
Curve2DWidget * | mpCurveWidget |
HistoWidget * | mpHistoWidget |
Definition at line 25 of file CQPlotSubwidget.h.
CQPlotSubwidget::CQPlotSubwidget | ( | QWidget * | parent = 0 , |
const char * | name = 0 , |
||
Qt::WFlags | fl = 0 |
||
) |
Definition at line 37 of file CQPlotSubwidget.cpp.
References mpCurveWidget, and mpHistoWidget.
CQPlotSubwidget::~CQPlotSubwidget | ( | ) |
Definition at line 172 of file CQPlotSubwidget.cpp.
|
protected |
this specifically handles the creation of a 2d curve. It is called when the corresponding button is pressed and the plot is actually 2D. The dialogs for choosing objects for the axes is called from here and one or several curve descriptions are generated.
Definition at line 350 of file CQPlotSubwidget.cpp.
References addCurveTab(), CCopasiSelectionDialog::chooseCellMatrix(), CCopasiObject::getCN(), CCopasiRootContainer::getDatamodelList(), CCopasiDataModel::getDataObject(), CCopasiDataModel::getModel(), CCopasiObject::getObjectDisplayName(), CQSimpleSelectionTree::NumericValues, CCopasiPlotSelectionDialog::setModel(), and CCopasiPlotSelectionDialog::setOutputVectors().
Referenced by addCurveSlot().
|
protectedslot |
slots that are connected to the buttons for adding curves/histograms
Definition at line 178 of file CQPlotSubwidget.cpp.
References addCurve2D(), mType, and CPlotItem::plot2d.
|
protected |
creates curve widget and adds it to the tab bar
Definition at line 339 of file CQPlotSubwidget.cpp.
References CPlotItem::addChannel(), addPlotItem(), and CPlotItem::curve2d.
Referenced by addCurve2D().
|
protected |
this specifically handles the creation of a histogram. It is called when the corresponding button is pressed and the plot is actually 2D. An empty histogram description is generated.
Definition at line 661 of file CQPlotSubwidget.cpp.
References addHisto1DTab().
Referenced by addHistoSlot().
|
protected |
creates histogram widget and adds it to the tab bar
Definition at line 651 of file CQPlotSubwidget.cpp.
References CPlotItem::addChannel(), addPlotItem(), CPlotItem::histoItem1d, and CCopasiParameterGroup::setValue().
Referenced by addHisto1D(), and createHistograms().
|
protectedslot |
Definition at line 192 of file CQPlotSubwidget.cpp.
References addHisto1D(), mType, and CPlotItem::plot2d.
|
protectedslot |
create a new plot definition
Definition at line 781 of file CQPlotSubwidget.cpp.
References ListViews::ADD, C_INVALID_INDEX, COutputDefinitionVector::createPlotSpec(), CopasiWidget::enter(), CCopasiObject::getObjectDataModel(), CCopasiDataModel::getPlotDefinitionList(), leave(), CopasiWidget::mpListView, CopasiWidget::mpObject, ListViews::PLOT, CPlotItem::plot2d, CopasiWidget::protectedNotify(), ListViews::switchToOtherWidget(), and TO_UTF8.
Definition at line 265 of file CQPlotSubwidget.cpp.
References FROM_UTF8, CPlotItem::getTitle(), mList, CPlotItem::setTitle(), and TO_UTF8.
Referenced by addCurveTab(), and addHisto1DTab().
|
private |
Definition at line 954 of file CQPlotSubwidget.cpp.
References CPlotItem::getType(), and mList.
Referenced by itemSelectionChanged(), and storeChanges().
|
protectedslot |
Definition at line 707 of file CQPlotSubwidget.cpp.
References CCopasiRootContainer::getKeyFactory(), loadFromPlotSpec(), CopasiWidget::mKey, and saveToPlotSpec().
|
protectedslot |
copy a plot definition
Definition at line 749 of file CQPlotSubwidget.cpp.
References ListViews::ADD, CCopasiVectorN< CType >::add(), C_INVALID_INDEX, CopasiWidget::enter(), CCopasiVectorN< CType >::getIndex(), CCopasiRootContainer::getKeyFactory(), CCopasiObject::getObjectDataModel(), CCopasiObject::getObjectName(), CCopasiDataModel::getPlotDefinitionList(), leave(), CopasiWidget::mKey, CopasiWidget::mpListView, CopasiWidget::mpObject, ListViews::PLOT, CopasiWidget::protectedNotify(), CCopasiObject::setObjectName(), ListViews::switchToOtherWidget(), and TO_UTF8.
void CQPlotSubwidget::createHistograms | ( | std::vector< const CCopasiObject * > | objects, |
const C_FLOAT64 & | incr | ||
) |
creates tabs for histograms from a list of objects. objects[0] is skipped, so objects.size()-1 histogram descriptions are generated. incr is used for all of them. This method is called from HistoWidget, so that when the user chooses several objects from the object selection widget several histograms can be generated accordingly.
Definition at line 666 of file CQPlotSubwidget.cpp.
References addHisto1DTab(), C_INT32, getCurrentIndex(), and setCurrentIndex().
Referenced by HistoWidget::buttonPressedX().
|
private |
Definition at line 239 of file CQPlotSubwidget.cpp.
Referenced by deleteCurves(), and removeCurve().
|
private |
Definition at line 227 of file CQPlotSubwidget.cpp.
References getRow(), mLastSelection, and mList.
|
private |
Definition at line 203 of file CQPlotSubwidget.cpp.
References deleteCurve(), mLastSelection, and mList.
Referenced by loadFromPlotSpec().
|
protectedslot |
deletes the current plot spec.
Definition at line 716 of file CQPlotSubwidget.cpp.
References ListViews::DELETE, CopasiWidget::enter(), CKeyFactory::get(), CCopasiRootContainer::getDatamodelList(), CCopasiRootContainer::getKeyFactory(), CCopasiDataModel::getModel(), CCopasiDataModel::getPlotDefinitionList(), min, CopasiWidget::mKey, ListViews::PLOT, CopasiWidget::protectedNotify(), COutputDefinitionVector::removePlotSpec(), and CCopasiVector< T >::size().
|
protectedvirtual |
Reimplemented from CopasiWidget.
Definition at line 942 of file CQPlotSubwidget.cpp.
References loadFromPlotSpec(), CopasiWidget::mpListView, CopasiWidget::mpObject, and ListViews::switchToOtherWidget().
Referenced by update().
|
private |
Definition at line 198 of file CQPlotSubwidget.cpp.
Referenced by createHistograms().
|
private |
Definition at line 217 of file CQPlotSubwidget.cpp.
Referenced by deleteCurve().
|
protectedslot |
Definition at line 976 of file CQPlotSubwidget.cpp.
References areOfSameType(), mLastSelection, mList, selectPlotItem(), and storeChanges().
|
virtual |
Reimplemented from CopasiWidget.
Definition at line 1065 of file CQPlotSubwidget.cpp.
References saveToPlotSpec().
Referenced by addPlot(), and copyPlot().
|
protected |
Definition at line 815 of file CQPlotSubwidget.cpp.
References CPlotItem::bandedGraph, CCopasiVector< T >::begin(), deleteCurves(), CCopasiVector< T >::end(), fatalError, FROM_UTF8, CPlotSpecification::getItems(), CPlotItem::getTitle(), CPlotItem::getType(), CPlotSpecification::isActive(), CPlotSpecification::isLogX(), CPlotSpecification::isLogY(), mLastSelection, mList, mType, CPlotItem::plot2d, selectPlotItem(), and CCopasiVector< T >::size().
Referenced by commitPlot(), enterProtected(), and resetPlot().
|
protectedslot |
deletes the current tab
Definition at line 686 of file CQPlotSubwidget.cpp.
References deleteCurve(), and mLastSelection.
|
protectedslot |
cancels changes to the plot definition
Definition at line 808 of file CQPlotSubwidget.cpp.
References CCopasiRootContainer::getKeyFactory(), loadFromPlotSpec(), and CopasiWidget::mKey.
|
protected |
Definition at line 880 of file CQPlotSubwidget.cpp.
References CCopasiVector< T >::add(), CCopasiDataModel::changed(), CPlotSpecification::cleanup(), CPlotSpecification::getItems(), CPlotItem::getTitle(), CopasiWidget::mKey, mList, CopasiWidget::mpDataModel, CopasiWidget::mpObject, ListViews::PLOT, CopasiWidget::protectedNotify(), ListViews::RENAME, CPlotSpecification::setActive(), CPlotSpecification::setLogX(), CPlotSpecification::setLogY(), CPlotItem::setTitle(), storeChanges(), and TO_UTF8.
Referenced by commitPlot(), and leave().
|
private |
Definition at line 284 of file CQPlotSubwidget.cpp.
References CPlotItem::bandedGraph, CPlotItem::curve2d, CPlotItem::histoItem1d, mpCurveWidget, and mpHistoWidget.
Referenced by selectPlotItem().
Definition at line 316 of file CQPlotSubwidget.cpp.
References CCopasiRootContainer::getDatamodelList(), CPlotItem::getType(), CQPlotEditWidget::LoadFromCurveSpec(), mLastItem, pdelete, selectControl(), and CQPlotEditWidget::setModel().
Referenced by itemSelectionChanged(), and loadFromPlotSpec().
|
private |
|
private |
Definition at line 88 of file CQPlotSubwidget.cpp.
References areOfSameType(), CPlotItem::bandedGraph, CPlotItem::curve2d, FROM_UTF8, CPlotItem::getActivity(), CPlotItem::getChannels(), CPlotItem::getTitle(), CPlotItem::getType(), CPlotItem::histoItem1d, mLastSelection, mList, mpHistoWidget, pdelete, CPlotItem::setActivity(), CPlotItem::setTitle(), CPlotItem::setType(), and updateItem().
Referenced by itemSelectionChanged(), and saveToPlotSpec().
|
virtual |
Reimplemented from CopasiWidget.
Definition at line 1010 of file CQPlotSubwidget.cpp.
References ListViews::CHANGE, ListViews::DELETE, enterProtected(), CopasiWidget::mIgnoreUpdates, CopasiWidget::mKey, ListViews::MODEL, CopasiWidget::mpObject, and ListViews::PLOT.
Definition at line 68 of file CQPlotSubwidget.cpp.
References mLastItem, and CQPlotEditWidget::SaveToCurveSpec().
Referenced by storeChanges().
|
private |
Definition at line 49 of file CQPlotSubwidget.h.
Referenced by selectPlotItem(), and updateItem().
|
private |
Definition at line 50 of file CQPlotSubwidget.h.
Referenced by deleteCurve(), deleteCurves(), itemSelectionChanged(), loadFromPlotSpec(), removeCurve(), and storeChanges().
|
private |
Definition at line 48 of file CQPlotSubwidget.h.
Referenced by addPlotItem(), areOfSameType(), deleteCurve(), deleteCurves(), itemSelectionChanged(), loadFromPlotSpec(), saveToPlotSpec(), and storeChanges().
|
private |
Definition at line 30 of file CQPlotSubwidget.h.
Referenced by CQPlotSubwidget(), and selectControl().
|
private |
Definition at line 31 of file CQPlotSubwidget.h.
Referenced by CQPlotSubwidget(), selectControl(), and storeChanges().
|
protected |
Definition at line 105 of file CQPlotSubwidget.h.
Referenced by addCurveSlot(), addHistoSlot(), and loadFromPlotSpec().