本文整理汇总了C++中VisualNode::isHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ VisualNode::isHidden方法的具体用法?C++ VisualNode::isHidden怎么用?C++ VisualNode::isHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisualNode
的用法示例。
在下文中一共展示了VisualNode::isHidden方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: node
forceinline void
UnhideAllCursor::processCurrentNode(void) {
VisualNode* n = node();
if (n->isHidden()) {
n->setHidden(false);
n->dirtyUp(na);
}
}
示例2: update
void
SearcherThread::updateCanvas(void) {
t->layoutMutex.lock();
if (t->root == NULL)
return;
if (t->autoHideFailed) {
t->root->hideFailed(*t->na,true);
}
for (VisualNode* n = t->currentNode; n != NULL; n=n->getParent(*t->na)) {
if (n->isHidden()) {
t->currentNode->setMarked(false);
t->currentNode = n;
t->currentNode->setMarked(true);
break;
}
}
t->root->layout(*t->na);
BoundingBox bb = t->root->getBoundingBox();
int w = static_cast<int>((bb.right-bb.left+Layout::extent)*t->scale);
int h = static_cast<int>(2*Layout::extent+
t->root->getShape()->depth()
*Layout::dist_y*t->scale);
t->xtrans = -bb.left+(Layout::extent / 2);
int scale0 = static_cast<int>(t->scale*100);
if (t->autoZoom) {
QWidget* p = t->parentWidget();
if (p) {
double newXScale =
static_cast<double>(p->width()) / (bb.right - bb.left +
Layout::extent);
double newYScale =
static_cast<double>(p->height()) /
(t->root->getShape()->depth() * Layout::dist_y + 2*Layout::extent);
scale0 = static_cast<int>(std::min(newXScale, newYScale)*100);
if (scale0<LayoutConfig::minScale)
scale0 = LayoutConfig::minScale;
if (scale0>LayoutConfig::maxAutoZoomScale)
scale0 = LayoutConfig::maxAutoZoomScale;
double scale = (static_cast<double>(scale0)) / 100.0;
w = static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
h = static_cast<int>(2*Layout::extent+
t->root->getShape()->depth()*Layout::dist_y*scale);
}
}
t->layoutMutex.unlock();
emit update(w,h,scale0);
}
示例3: node
forceinline void
LayoutCursor::processCurrentNode() {
VisualNode* currentNode = node();
if (currentNode->isDirty()) {
if (currentNode->isHidden()) {
// do nothing
} else if (currentNode->getNumberOfChildren() < 1) {
currentNode->setShape(Shape::leaf);
} else {
currentNode->computeShape(na,startNode());
}
currentNode->setDirty(false);
}
if (currentNode->getNumberOfChildren() >= 1)
currentNode->setChildrenLayoutDone(true);
}
示例4: event
bool
TreeCanvas::event(QEvent* event) {
if (mutex.tryLock()) {
if (event->type() == QEvent::ToolTip) {
VisualNode* n = eventNode(event);
if (n != NULL && !n->isHidden() &&
(n->getStatus() == BRANCH || n->getStatus() == STOP)) {
QHelpEvent* he = static_cast<QHelpEvent*>(event);
QToolTip::showText(he->globalPos(),
QString(n->toolTip(curBest,c_d,a_d).c_str()));
} else {
QToolTip::hideText();
}
}
mutex.unlock();
}
return QWidget::event(event);
}