6 #include <QtCore/QVariant>
41 std::vector< const CCopasiObject * > oldSelection;
46 std::vector< const CCopasiObject * > objects =
51 if (objects.size() && objects[0])
60 mpEditVariable->setText(
"");
61 mpEditTitle->setText(
"Histogram");
65 if (objects.size() > 1)
70 while (!(pParent = dynamic_cast< CQPlotSubwidget * >(tmp)) &&
this)
83 mpEditTitle->setText(
"");
86 mpEditVariable->setText(
"");
88 mpEditIncrement->setText(
"");
90 mpCheckBefore->setChecked(
false);
91 mpCheckDuring->setChecked(
true);
92 mpCheckAfter->setChecked(
false);
108 assert(pDataModel != NULL);
121 mpEditVariable->setText(
"");
126 if (!(tmp = curve->
getValue(
"increment").
pVOID))
return false;
128 mpEditIncrement->setText(QString::number(*(
const C_FLOAT64*)tmp));
148 std::string title =
TO_UTF8(mpEditTitle->text());
150 C_FLOAT64 increment = mpEditIncrement->text().toDouble();
152 bool thingsChanged =
false;
154 if (original != NULL)
157 thingsChanged =
true;
159 if (thingsChanged || original->
getTitle() != title)
160 thingsChanged =
true;
162 if (thingsChanged || *original->
getValue(
"increment").
pDOUBLE != increment)
163 thingsChanged =
true;
165 if (thingsChanged || original->
getActivity() != Activity)
166 thingsChanged =
true;
168 if (thingsChanged || original->
getChannels().size() != 1)
169 thingsChanged =
true;
171 if (thingsChanged || original->
getChannels()[0] != name)
172 thingsChanged =
true;
174 else thingsChanged =
true;
187 curve->
setValue(
"increment", increment);
199 mpEditTitle->setEnabled(!mode);
200 mpEditVariable->setEnabled(!mode);
201 mpBtnVariable->setEnabled(!mode);
CCopasiObject * getDataObject(const CCopasiObjectName &CN) const
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const
virtual CCopasiObjectName getCN() const
static std::vector< const CCopasiObject * > getObjectVector(QWidget *pParent, const CQSimpleSelectionTree::ObjectClasses &classes, const std::vector< const CCopasiObject * > *pCurrentSelection=NULL)
std::vector< CPlotDataChannelSpec > & getChannels()
void setActivity(const COutputInterface::Activity &activity)
static const QIcon & icon(const IconID &id)
const CPlotItem::Type & getType() const
bool setValue(const std::string &name, const CType &value)
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
const COutputInterface::Activity & getActivity() const
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
const CCopasiParameter::Value & getValue(const std::string &name) const
const std::string & getTitle() const
void setTitle(const std::string &title)