本文整理汇总了C++中BrowserNode::get_stype方法的典型用法代码示例。如果您正苦于以下问题:C++ BrowserNode::get_stype方法的具体用法?C++ BrowserNode::get_stype怎么用?C++ BrowserNode::get_stype使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrowserNode
的用法示例。
在下文中一共展示了BrowserNode::get_stype方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PickPreviousSibling
void EdgeMenuDialogBase::PickPreviousSibling()
{
bool continueSearch = true;
BrowserNode * previousNode = 0;
BrowserNode * originalNode = GetCurrentNode();
int originalDepth = originalNode->depth();
BrowserNode * currentNode = originalNode;
while (continueSearch)
{
QLOG_INFO() << "CurrentNode is: " << currentNode->get_name();
previousNode = dynamic_cast<BrowserNode *>(currentNode->itemBelow());
QLOG_INFO() << "Nodename is: " << previousNode->get_name() << " " << previousNode->depth();
if (!previousNode)
break;
QLOG_INFO() << "Previous Node is: "<< previousNode->get_name();
int previousDepth = previousNode->depth();
bool sameType = originalNode->get_stype() == previousNode->get_stype();
QLOG_INFO() << "PREVIOUS: " << "Origin level : " << originalDepth;
QLOG_INFO() << "PREVIOUS: " << "Current level : " << previousDepth;
bool sameLevel = originalDepth == previousDepth;
if (sameLevel && sameType)
continueSearch = false;
currentNode = previousNode;
}
if (previousNode == 0)
return;
SaveData();
FillGuiElements(previousNode);
}
示例2: PickNextSibling
void EdgeMenuDialogBase::PickNextSibling()
{
bool continueSearch = true;
BrowserNode * nextNode = 0;
BrowserNode * originalNode = GetCurrentNode();
BrowserNode * currentNode = originalNode;
while (continueSearch)
{
nextNode = dynamic_cast<BrowserNode *>(currentNode->itemAbove());
QLOG_INFO() << "CurrentNode is: "<< currentNode->get_name();
if (!nextNode)
break;
QLOG_INFO() << "NEXT: " << nextNode->get_name() << " " << nextNode->depth();
QLOG_INFO() << "NextNode is: "<< nextNode->get_name();
bool sameLevel = originalNode->depth() == nextNode->depth();
bool sameType = originalNode->get_stype() == nextNode->get_stype();
QLOG_INFO() << originalNode->get_stype();
QLOG_INFO() << nextNode->get_stype();
// QLOG_INFO() << "NEXT: " << "Origin level : " << originalNode->depth();
// QLOG_INFO() << "NEXT: " << "Current level : " << nextNode->depth();
if (sameLevel && sameType)
continueSearch = false;
currentNode = nextNode;
}
if (nextNode == 0)
return;
SaveData();
FillGuiElements(nextNode);
}