本文整理汇总了C++中Q3PtrDict::find方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3PtrDict::find方法的具体用法?C++ Q3PtrDict::find怎么用?C++ Q3PtrDict::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3PtrDict
的用法示例。
在下文中一共展示了Q3PtrDict::find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save_list
void ColMsgTable::save_list(ColMsgList & l, Q3PtrDict<ColMsgList> & saved) {
if (saved.find(&l) == 0) {
saved.insert(&l, new ColMsgList(l));
Q3PtrListIterator<ColMsg> it(l);
for (; it.current(); ++it) {
ColMsg * m = it.current();
save_list(m->get_msgs(), saved);
save_list(m->in->get_msgs(), saved);
}
}
}
示例2: update_relations
void ArtifactCanvas::update_relations() {
// 'this' is a non source, check its associations
const Q3PtrDict<BrowserArtifact> * associated =
((ArtifactData *) browser_node->get_data())->get_associated();
Q3PtrDict<BrowserArtifact> associations;
Q3PtrListIterator<ArrowCanvas> it(lines);
while (it.current()) {
if ((it.current()->type() == UmlContain) &&
(((AssocContainCanvas *) it.current())->get_start() == this)) {
DiagramItem * adi = ((AssocContainCanvas *) it.current())->get_end();
if ((adi->type() == UmlArtifact) &&
(associated != 0) &&
(associated->find((BrowserArtifact *)
((ArtifactCanvas *) adi)->browser_node) != 0)) {
// association must exist
BrowserArtifact * c = (BrowserArtifact *)
((ArtifactCanvas *) adi)->browser_node;
associations.insert(c, c);
++it;
}
else
// association must not exist
it.current()->delete_it();
}
else
++it;
}
if (associated != 0) {
Q3PtrDictIterator<BrowserArtifact> it(*associated);
while (it.current()) {
if (associations.find(it.current()) == 0) {
// the association to 'it.current()' is not yet drawn
// search 'it.current()' cancas
Q3CanvasItemList all = canvas()->allItems();
Q3CanvasItemList::Iterator cit;
for (cit = all.begin(); cit != all.end(); ++cit) {
if ((*cit)->visible()) {
DiagramItem * adi = QCanvasItemToDiagramItem(*cit);
if ((adi != 0) && // an uml canvas item
(adi->type() == UmlArtifact) &&
(((ArtifactCanvas *) adi)->browser_node == it.current())) {
// find
(new AssocContainCanvas(the_canvas(), this, adi, 0, -1.0, -1.0))
->show();
break;
}
}
}
}
++it;
}
}
}