本文整理汇总了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;
}
示例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;
}
}
示例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());
}
示例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);
}
示例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);
}