Logo Search packages:      
Sourcecode: akregator version File versions

void View::readProperties ( KConfig *  config  )  [virtual]

session management

Definition at line 1535 of file akregator_view.cpp.

References m_articles, and m_tree.

Referenced by Akregator::Part::readProperties().

{
    // read filter settings
    m_searchLine->setText(config->readEntry("searchLine"));
    m_searchCombo->setCurrentItem(config->readEntry("searchCombo").toInt());
    slotSearchComboChanged(config->readEntry("searchCombo").toInt());

    // read the position of the selected feed

    QString selectedFeed = config->readEntry("selectedFeed");
    if ( selectedFeed.isNull() )
    {
        QStringList pos = QStringList::split(' ', selectedFeed);
        QListViewItem* current = m_tree->firstChild();
        for ( unsigned int i = 0; current && i < pos.count(); i++ )
        {
            int childPos = pos[i].toUInt();
            current = current->firstChild();
            if (current)
                for (int j = 0; j < childPos; j++)
                    if ( current->nextSibling() )
                        current = current->nextSibling();
        }
        m_tree->setSelected(current, true);
        // read the selected article title (not in Combined View)

        if ( m_viewMode != CombinedView )
        {
            QString selectedArticleEntry = config->readEntry("selectedArticle");
            if ( selectedArticleEntry.isNull() )
            {
                QListViewItem* selectedArticle = m_articles->findItem(selectedArticleEntry, 0);
                if ( selectedArticle )
                    m_articles->setSelected(selectedArticle, true);
            }
        } // if viewMode != combinedView
    } // if selectedFeed is set
}


Generated by  Doxygen 1.6.0   Back to index