* \brief Get the level of the widget within the tree, regarting the * generators, not the parents. * * The root widget has the level 0. */
| 1610 | * The root widget has the level 0. |
| 1611 | */ |
| 1612 | int Widget::getGeneratorLevel () |
| 1613 | { |
| 1614 | Widget *widget = this; |
| 1615 | int level = 0; |
| 1616 | |
| 1617 | while (widget->getGenerator ()) { |
| 1618 | level++; |
| 1619 | widget = widget->getGenerator (); |
| 1620 | } |
| 1621 | |
| 1622 | return level; |
| 1623 | } |
| 1624 | |
| 1625 | /** |
| 1626 | * \brief Get the widget with the highest level, which is a direct ancestor of |