48 connect(mpTree1, SIGNAL(currentItemChanged(QTreeWidgetItem * , QTreeWidgetItem *)),
this, SLOT(
treeSelectionChanged()));
49 connect(mpTree2, SIGNAL(currentItemChanged(QTreeWidgetItem * , QTreeWidgetItem *)),
this, SLOT(
treeSelectionChanged()));
63 bool flagGlobalQuantities,
bool flagReactions,
64 const std::set<CCopasiObject*> & added,
65 bool highlightInvolved)
72 QFont tmpFont = pW->font();
73 tmpFont.setItalic(
true);
80 QTreeWidgetItem * pItem =
new QTreeWidgetItem((QTreeWidget*)NULL, 1000);
84 std::set<CCopasiObject*>::const_iterator it = added.find(pObj);
85 if (it != added.end())
87 pItem->setFont(0, tmpFont);
92 if (highlightInvolved)
95 pItem->setTextColor(0, QColor(130,130,130));
98 itemMap[pItem] = pObj;
99 pW->addTopLevelItem(pItem);
100 pW->setFirstItemColumnSpanned(pItem,
true);
105 for(j=0; j<jmax; ++j)
108 QTreeWidgetItem * pChild =
new QTreeWidgetItem(pItem, 1001);
110 pW->setFirstItemColumnSpanned(pChild,
true);
113 std::set<CCopasiObject*>::const_iterator it = added.find(pObj);
114 if (it != added.end())
116 pChild->setFont(0, tmpFont);
120 if (highlightInvolved)
123 pChild->setTextColor(0, QColor(130,130,130));
126 itemMap[pChild]=pObj;
128 pItem->setExpanded(
true);
134 QTreeWidgetItem * pItem =
new QTreeWidgetItem((QTreeWidget*)NULL, 1000);
135 pItem->setText(0,
"Global Quantities");
136 pW->addTopLevelItem(pItem);
137 pW->setFirstItemColumnSpanned(pItem,
true);
142 for(j=0; j<jmax; ++j)
145 QTreeWidgetItem * pChild =
new QTreeWidgetItem(pItem, 1001);
147 pW->setFirstItemColumnSpanned(pChild,
true);
150 std::set<CCopasiObject*>::const_iterator it = added.find(pObj);
151 if (it != added.end())
153 pChild->setFont(0, tmpFont);
157 if (highlightInvolved)
160 pChild->setTextColor(0, QColor(130,130,130));
163 itemMap[pChild]=pObj;
168 pW->setColumnCount(2);
170 QTreeWidgetItem * pItem =
new QTreeWidgetItem((QTreeWidget*)NULL, 1000);
171 pItem->setText(0,
"Reactions");
172 pW->addTopLevelItem(pItem);
173 pW->setFirstItemColumnSpanned(pItem,
true);
175 QFont tmpFontSmall = pItem->font(0);
176 tmpFontSmall.setPointSize(tmpFontSmall.pointSize()-2);
180 for(j=0; j<jmax; ++j)
183 QTreeWidgetItem * pChild =
new QTreeWidgetItem(pItem, 1001);
185 pW->setFirstItemColumnSpanned(pChild,
false);
191 pChild->setFont(1, tmpFontSmall);
194 std::set<CCopasiObject*>::const_iterator it = added.find(pObj);
195 if (it != added.end())
197 pChild->setFont(0, tmpFont);
201 if (highlightInvolved)
204 pChild->setTextColor(0, QColor(130,130,130));
205 pChild->setTextColor(1, QColor(130,130,130));
208 itemMap[pChild]=pObj;
220 std::map<QTreeWidgetItem*, CCopasiObject*>::const_iterator it;
221 it =
mItemMap1.find(mpTree1->currentItem());
224 it =
mItemMap2.find(mpTree2->currentItem());
228 mpBtnMerge->setEnabled(
false);
230 mpBtnMerge->setEnabled(
true);
253 std::map<QTreeWidgetItem*, CCopasiObject*>::const_iterator it;
254 it =
mItemMap1.find(mpTree1->currentItem());
257 it =
mItemMap2.find(mpTree2->currentItem());
Header file of class CModelEntity and CModelValue.
const std::string & getObjectName() const
const CCopasiVectorN< CModelValue > & getModelValues() const
virtual size_t size() const
void treeSelectionChanged()
const std::string & getObjectType() const
std::map< QTreeWidgetItem *, CCopasiObject * > mItemMap2
bool existDependentEntities(const CCopasiObject *pObj)
void add(const CCopasiObject *source, CCopasiObject *copy)
add a source->duplicate mapping
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
std::string getChemEqString(bool expanded) const
CQMergingData(QWidget *parent=0, Qt::WindowFlags fl=0, bool simple=false)
CCopasiVectorNS< CCompartment > & getCompartments()
void fillTree(QTreeWidget *pW, const CModel *pModel, std::map< QTreeWidgetItem *, CCopasiObject * > &itemMap, bool flagGlobalQuantities, bool flagReactions, const std::set< CCopasiObject * > &added, bool highlightInvolved)
bool fl(const C_FLOAT64 &d1, const C_FLOAT64 &d2)
std::map< QTreeWidgetItem *, CCopasiObject * > mItemMap1
CCopasiVectorNS< CReaction > & getReactions()
void replaceInModel(const ElementsMap &emap, bool remove)