本文整理汇总了C++中ZSwcTree::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ ZSwcTree::setVisible方法的具体用法?C++ ZSwcTree::setVisible怎么用?C++ ZSwcTree::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZSwcTree
的用法示例。
在下文中一共展示了ZSwcTree::setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recruitCast
void ZMovieMaker::recruitCast()
{
std::map<string, string> cast = m_script.getCast();
ZStackDoc *academy = getAcademy();
academy->blockSignals(true);
for (std::map<string, string>::const_iterator iter = cast.begin();
iter != cast.end(); ++iter) {
switch (ZFileType::fileType(iter->second)) {
case ZFileType::SWC_FILE:
{
ZSwcTree *tree = new ZSwcTree;
tree->load(iter->second.c_str());
tree->setVisible(false);
academy->addObject(tree);
ZSwcMovieActor *actor = new ZSwcMovieActor;
actor->setActor(tree);
actor->setId(iter->first);
actor->setVisible(false);
m_cast.push_back(actor);
}
break;
case ZFileType::TIFF_FILE:
{
ZStack *stack = new ZStack();
stack->load(iter->second);
if (academy->getStack() != NULL) {
cout << "Warning: " << "multiple volume detected. Only one allowed."
<< endl;
} else {
academy->loadStack(stack);
}
ZStackMovieActor *actor = new ZStackMovieActor;
actor->setVisible(false);
actor->setId(iter->first);
actor->setActor(stack);
m_cast.push_back(actor);
}
break;
case ZFileType::V3D_MARKER_FILE:
{
QList<ZPunctum*> punctaList =
ZPunctumIO::load(iter->second.c_str());
for (int i=0; i<punctaList.size(); i++) {
punctaList[i]->setVisible(false);
// academy->addObject(punctaList[i]);
}
academy->addPunctum(punctaList);
ZPunctaMovieActor *actor = new ZPunctaMovieActor;
actor->setVisible(false);
actor->setId(iter->first);
vector<ZPunctum*> puncta;
for (QList<ZPunctum*>::const_iterator iter = punctaList.begin();
iter != punctaList.end(); ++iter) {
puncta.push_back(*iter);
}
actor->setActor(puncta);
m_cast.push_back(actor);
}
default:
break;
}
}
academy->blockSignals(false);
}