MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getCurrentIndexNode

Function getCurrentIndexNode

Gui/ComboBox.cpp:791–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791static ComboBoxMenuNode*
792getCurrentIndexNode(int index,
793 ComboBoxMenuNode* node)
794{
795 if (node->isLeaf) {
796 if (node->isLeaf->data().toInt() == index) {
797 return node;
798 } else {
799 return 0;
800 }
801 } else {
802 for (std::size_t i = 0; i < node->children.size(); ++i) {
803 ComboBoxMenuNode* tmp = getCurrentIndexNode( index, node->children[i].get() );
804 if (tmp) {
805 return tmp;
806 }
807 }
808 }
809
810 return 0;
811}
812
813static QString
814getNodeTextRecursive(ComboBoxMenuNode* node,

Callers 8

getCurrentIndexTextMethod · 0.85
itemTextMethod · 0.85
setItemTextMethod · 0.85
setItemShortcutMethod · 0.85
setItemIconMethod · 0.85
disableItemMethod · 0.85
enableItemMethod · 0.85

Calls 3

dataMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected