本文整理汇总了C++中ProjectViewItem::setArchiveState方法的典型用法代码示例。如果您正苦于以下问题:C++ ProjectViewItem::setArchiveState方法的具体用法?C++ ProjectViewItem::setArchiveState怎么用?C++ ProjectViewItem::setArchiveState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectViewItem
的用法示例。
在下文中一共展示了ProjectViewItem::setArchiveState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: add
ProjectViewItem* ProjectView::add(KileProjectItem *projitem, ProjectViewItem *projvi /* = NULL */)
{
KILE_DEBUG() << "\tprojectitem=" << projitem->path()
<< " projvi=" << projvi;
const KileProject *project = projitem->project();
if (!projvi) {
projvi = projectViewItemFor(project->url());
}
KILE_DEBUG() << "\tparent projectviewitem " << projvi->url().fileName();
ProjectViewItem *item = NULL, *parent = NULL;
switch (projitem->type()) {
case (KileProjectItem::Source):
item = new ProjectViewItem(projvi, projitem);
item->setType(KileType::ProjectItem);
item->setIcon(0, KIcon("projectitem"));
break;
case (KileProjectItem::Package):
parent = folder(projitem, projvi);
item = new ProjectViewItem(parent, projitem);
item->setType(KileType::ProjectItem);
item->setIcon(0, KIcon("projectitem"));
break;
case (KileProjectItem::ProjectFile):
default:
parent = folder(projitem, projvi);
item = new ProjectViewItem(parent, projitem);
item->setType(KileType::ProjectExtra);
item->setIcon(0, KIcon((projitem->type()==KileProjectItem::ProjectFile) ? "kile" : "file"));
break;
}
item->setArchiveState(projitem->archive());
item->setURL(projitem->url());
makeTheConnection(item, projitem->getInfo());
projvi->sortChildren(0, Qt::AscendingOrder);
// seems to be necessary to get a correct refreh (Qt 4.4.3)
bool expanded = projvi->isExpanded();
projvi->setExpanded(!expanded);
projvi->setExpanded(expanded);
return item;
}