Exemple #1
0
void MythGenericTree::addYourselfIfSelectable(QList<MythGenericTree*> *flat_list)
{
    if (m_selectable)
        flat_list->append(this);

    QList<MythGenericTree*>::iterator it;
    it = m_subnodes->begin();
    MythGenericTree *child;
    while ((child = *it) != 0)
    {
        child->addYourselfIfSelectable(flat_list);
        ++it;
    }
}
Exemple #2
0
void MythGenericTree::buildFlatListOfSubnodes(bool scrambled_parents)
{
    // This builds a flat list of every selectable child according to the
    // current ordering index.

    m_flatenedSubnodes->clear();

    QList<MythGenericTree*>::iterator it;
    it = m_subnodes->begin();
    MythGenericTree *child;
    while ((child = *it) != 0)
    {
        child->addYourselfIfSelectable(m_flatenedSubnodes);
        ++it;
    }

    if (m_currentOrderingIndex > -1)
        m_flatenedSubnodes->SetAttributeIndex(m_currentOrderingIndex);
}