6 #include <QtCore/QString>
25 QWidget * parent, Qt::WindowFlags f) :
28 mObjectType(objectType),
35 mpTabWidget->addTab(pCopasiWidget,
"Details");
36 mPages.push_back(pCopasiWidget);
47 mpBtnNew->setText(
"Apply");
48 mpBtnNew->setToolTip(
"Apply the current parameters to the model.");
55 mpTabWidget->addTab(pNotes,
"Notes");
65 mPages.push_back(pMIRIAMWidget);
66 mpTabWidget->addTab(pMIRIAMWidget,
"Annotation");
70 mPages.push_back(pRDFTreeView);
71 mpTabWidget->addTab(pRDFTreeView,
"RDF Browser");
83 bool success =
save();
85 std::vector< CopasiWidget * >::iterator it =
mPages.begin();
86 std::vector< CopasiWidget * >::iterator end =
mPages.end();
88 for (; it != end; ++it)
89 success &= (*it)->leave();
98 std::vector< CopasiWidget * >::iterator it =
mPages.begin();
99 std::vector< CopasiWidget * >::iterator end =
mPages.end();
101 for (; it != end; ++it)
135 mpTabWidget->setCurrentIndex(index);
155 mpEditName->setReadOnly(readOnly);
156 mpBtnCommit->setEnabled(!readOnly);
157 mpBtnRevert->setEnabled(!readOnly);
158 mpBtnDelete->setEnabled(!readOnly);
163 mpEditName->setText(
"");
175 std::vector< CopasiWidget * >::iterator it =
mPages.begin();
176 std::vector< CopasiWidget * >::iterator end =
mPages.end();
178 for (; it != end; ++it)
179 (*it)->setIgnoreUpdates(
true);
192 QMessageBox::Ok, QMessageBox::Ok);
211 for (; it != end; ++it)
212 (*it)->setIgnoreUpdates(
false);
219 mpBtnCommit->setFocus();
239 mpBtnNew->setFocus();
250 mpBtnCopy->setFocus();
257 if (QString(
mPages[0]->metaObject()->className()) ==
"CQCompartment")
260 pQCompartment->
copy();
262 else if (QString(
mPages[0]->metaObject()->className()) ==
"CQSpeciesDetail")
265 pQSpeciesDetail->
copy();
267 else if (QString(
mPages[0]->metaObject()->className()) ==
"ReactionsWidget1")
270 pReactionsWidget1->
copy();
const std::string & getObjectName() const
CCopasiObject * get(const std::string &key)
const CEvaluationTree::Type & getType() const
static StandardButton information(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
void changed(const bool &changed=true)
static CKeyFactory * getKeyFactory()
The class for handling a chemical kinetic function.
static const std::string ObjectTypeName[]
bool setObjectName(const std::string &name)