当前位置: 首页>>代码示例>>C++>>正文


C++ QTreeWidget::invisibleRootItem方法代码示例

本文整理汇总了C++中QTreeWidget::invisibleRootItem方法的典型用法代码示例。如果您正苦于以下问题:C++ QTreeWidget::invisibleRootItem方法的具体用法?C++ QTreeWidget::invisibleRootItem怎么用?C++ QTreeWidget::invisibleRootItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QTreeWidget的用法示例。


在下文中一共展示了QTreeWidget::invisibleRootItem方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: executeOscCommand

bool RundownGroupWidget::executeOscCommand(Playout::PlayoutType type)
{
    if (this->parentWidget()->parentWidget() == NULL)
        return true;

    QTreeWidget* treeWidgetRundown = dynamic_cast<QTreeWidget*>(this->parentWidget()->parentWidget());
    for (int i = 0; i < treeWidgetRundown->invisibleRootItem()->childCount(); i++)
    {
        QTreeWidgetItem* child = treeWidgetRundown->invisibleRootItem()->child(i);
        QWidget* widget = treeWidgetRundown->itemWidget(child, 0);
        if (widget == this)
        {
            EventManager::getInstance().fireExecuteRundownItemEvent(ExecuteRundownItemEvent(type, child));

            if (type == Playout::PlayoutType::Play || type == Playout::PlayoutType::PlayNow)
            {
                EventManager::getInstance().fireDurationChangedEvent(DurationChangedEvent(this->command.getDuration()));

                if (this->markUsedItems)
                    setUsed(true);
            }

            break;
        }
    }

    return true;
}
开发者ID:CasparCG,项目名称:Client,代码行数:28,代码来源:RundownGroupWidget.cpp

示例2: selectNodeByName

void StatsView::selectNodeByName(const char *name)
{
	QTreeWidget *statsTree = this->findChild<QTreeWidget *>("statsTree");
	std::string nodeName = name;
	DataContainerTreeItem *selectedNode = findNodeByData(statsTree->invisibleRootItem(), nodeName);
	if (selectedNode != 0) {
		statsTree->setCurrentItem(selectedNode);
		selectedNode->setTextColor(0, QColor(255, 0, 0));
		selectedItem = selectedNode;
	}
}
开发者ID:mishley,项目名称:MooseEdit,代码行数:11,代码来源:StatsView.cpp

示例3: getTreeWidget

QList<U2Region> GTUtilsAnnotationsTreeView::getAnnotatedRegions(HI::GUITestOpStatus &os) {
    QList<U2Region> res;

    QTreeWidget *treeWidget = getTreeWidget(os);
    GT_CHECK_RESULT(treeWidget != NULL, "Tree widget is NULL", res);

    QList<QTreeWidgetItem*> treeItems = GTTreeWidget::getItems(treeWidget->invisibleRootItem());
    foreach (QTreeWidgetItem* item, treeItems) {
        AVAnnotationItem* annotationItem = dynamic_cast<AVAnnotationItem*>(item);
        CHECK_OPERATION(annotationItem != NULL, continue);

        Annotation *ann = annotationItem->annotation;
        res.append(ann->getRegions().toList());
    }
开发者ID:m-angelov,项目名称:ugene,代码行数:14,代码来源:GTUtilsAnnotationsTreeView.cpp

示例4:

dmz::V8Value
dmz::JsModuleUiV8QtBasic::_tree_root (const v8::Arguments &Args) {

   v8::HandleScope scope;
   V8Value result = v8::Undefined ();

   JsModuleUiV8QtBasic *self = _to_self (Args);
   if (self) {

      QTreeWidget *tree = self->v8_to_qobject<QTreeWidget> (Args.This ());
      if (tree) { result = self->create_v8_qtreewidgetitem (tree->invisibleRootItem ()); }
   }

   return scope.Close (result);
}
开发者ID:bstewart33,项目名称:js,代码行数:15,代码来源:dmzJsModuleUiV8QtBasicTreeWidget.cpp

示例5: populateSkillTree

void SkillEditFrame::populateSkillTree() {
	QTreeWidget *skillTree = this->findChild<QTreeWidget *>("skillTree");
	for (int i=0; i<skillStats->size(); ++i) {
		StatsContainer *skill = skillStats->at(i);
		std::string abilityText = skill->getData("Ability");
		std::string elementText = skill->getData("Element");
		if (elementText.size() == 0) {
			elementText = "Unknown";
		}
		std::string skillText = skill->getData("DisplayNameRef");
		std::string skillInternalText = skill->getArg(0);
		QTreeWidgetItem *abilityFolder = createFolderIfNeeded(skillTree->invisibleRootItem(), abilityText.c_str(), 0);
		QTreeWidgetItem *elementFolder = createFolderIfNeeded(abilityFolder, elementText.c_str(), 0);
		createFolderIfNeeded(elementFolder, skillText.c_str(), skillInternalText.c_str());
	}
	skillTree->setUpdatesEnabled(false);
	skillTree->expandAll();
	skillTree->resizeColumnToContents(0);
	skillTree->collapseAll();
	skillTree->setUpdatesEnabled(true);
}
开发者ID:mishley,项目名称:MooseEdit,代码行数:21,代码来源:SkillEditFrame.cpp


注:本文中的QTreeWidget::invisibleRootItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。