本文整理汇总了C++中BrowserNodeList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNodeList::append方法的具体用法?C++ BrowserNodeList::append怎么用?C++ BrowserNodeList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNodeList
的用法示例。
在下文中一共展示了BrowserNodeList::append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: children
void BrowserNode::children(BrowserNodeList & nodes,
UmlCode kind1, UmlCode kind2) const {
Q3ListViewItem * child;
for (child = firstChild(); child; child = child->nextSibling())
if (!((BrowserNode *) child)->is_deleted &&
((((BrowserNode *) child)->get_type() == kind1) ||
(((BrowserNode *) child)->get_type() == kind2)))
nodes.append((BrowserNode *) child);
}
示例2: instances
void BrowserOperation::instances(BrowserNodeList & result)
{
IdIterator<BrowserOperation> it(all);
BrowserOperation * op;
while(it.hasNext()){
it.next();
if ((op = it.value()) != 0)
if (!op->deletedp())
result.append(op);
}
result.sort_it();
}
示例3: accept
void RelatedElementsDialog::accept() {
bool inh = (inh_rb != 0) && inh_rb->isChecked();
bool dep = dep_rb->isChecked();
bool assoc = (assoc_rb != 0) && assoc_rb->isChecked();
if (!inh && !dep && !assoc)
return;
bool sametype = sametype_rb->isChecked();
UmlCode k = elt->get_type();
elts.clear();
Q3PtrDict<BrowserNode> d(71);
BrowserNodeList added;
int lvl = sb_level->value();
added.append(elt);
d.insert(elt, elt);
do {
BrowserNodeList newones;
Q3PtrListIterator<BrowserNode> it(added);
for (; it.current() != 0; ++it) {
BrowserNode * e = (BrowserNode *) it.current();
BrowserNode * bn;
if (referenced_rb->isChecked()) {
for (bn = (BrowserNode *) e->firstChild();
bn != 0;
bn = (BrowserNode *) bn->nextSibling()) {
if (! bn->deletedp()) {
BrowserNode * target;
switch (bn->get_type()) {
case UmlAssociation:
case UmlDirectionalAssociation:
case UmlAggregation:
case UmlAggregationByValue:
case UmlDirectionalAggregation:
case UmlDirectionalAggregationByValue:
if (! assoc) continue;
target = ((RelationData *) bn->get_data())->get_end_class();
break;
case UmlDependency:
if (! dep) continue;
target = ((RelationData *) bn->get_data())->get_end_class();
break;
case UmlGeneralisation:
case UmlRealize:
if (! inh) continue;
target = ((RelationData *) bn->get_data())->get_end_class();
break;
case UmlDependOn:
if (! dep) continue;
target = ((SimpleRelationData *) bn->get_data())->get_end_node();
break;
case UmlInherit:
if (! inh) continue;
target = ((SimpleRelationData *) bn->get_data())->get_end_node();
break;
default:
continue;
}
if ((sametype && (target->get_type() != k)) ||
(d[target] != 0))
continue;
d.insert(target, target);
newones.append(target);
}
}
}
if (referencing_rb->isChecked()) {
if (e->get_type() == UmlClass)
BrowserRelation::get_relating(e, d, newones, inh, dep, assoc);
BrowserSimpleRelation::get_relating(e, d, newones, inh, dep, sametype, k);
}
}
added = newones;
} while (--lvl != 0);
d.remove(elt);
Q3PtrDictIterator<BrowserNode> it(d);
while (it.current()) {
elts.append(it.current());
++it;
}
QDialog::accept();
}