| 408 | } |
| 409 | |
| 410 | void Widget::getParents(bool ascendant, WidgetsList& parents) |
| 411 | { |
| 412 | for (Widget* widget=this; widget; widget=widget->m_parent) { |
| 413 | // append parents in tail |
| 414 | if (ascendant) |
| 415 | parents.push_back(widget); |
| 416 | // append parents in head |
| 417 | else |
| 418 | parents.insert(parents.begin(), widget); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | Widget* Widget::nextSibling() |
| 423 | { |