本文整理汇总了C++中BrowserNode::is_from_lib方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNode::is_from_lib方法的具体用法?C++ BrowserNode::is_from_lib怎么用?C++ BrowserNode::is_from_lib使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNode
的用法示例。
在下文中一共展示了BrowserNode::is_from_lib方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: delete_internal
bool BrowserNode::delete_internal(QString & warning) {
if (deletedp())
return TRUE;
if (!is_writable() && !root_permission() && !is_from_lib()) {
warning += "\n " + TR("%1 is read-only", full_name());
return FALSE;
}
static Q3PtrList<BrowserNode> targetof;
static bool made = FALSE;
bool made_here;
if (!made) {
made = TRUE;
made_here = TRUE;
referenced_by(targetof, TRUE);
}
else
made_here = FALSE;
bool ro = FALSE;
if (!root_permission()) {
Q3PtrListIterator<BrowserNode> it(targetof);
BrowserNode * r;
while ((r = it.current()) != 0) {
if (!r->is_writable() && !r->is_from_lib()) {
ro = TRUE;
warning += "\n ";
switch (r->get_type()) {
case UmlComponent:
warning += TR("%1 referenced by the read-only component %2", full_name(), r->full_name());
break;
case UmlArtifact:
warning += TR("%1 referenced by the read-only artifact %2", full_name(), r->full_name());
break;
default:
warning += TR("%1 is the target of the read-only relation %2", full_name(), r->full_name());
break;
}
}
++it;
}
}
if (made_here) {
made = FALSE;
targetof.clear();
}
if (ro)
return FALSE;
// sub elts
Q3ListViewItem * child;
bool ok = TRUE;
for (child = firstChild(); child != 0; child = child->nextSibling())
ok &= ((BrowserNode *) child)->delete_internal(warning);
if (ok) {
is_deleted = TRUE;
if (is_marked) {
marked_list.removeRef(this);
is_marked = FALSE;
}
get_data()->delete_it();
repaint();
package_modified();
}
return ok;
}