Logo Search packages:      
Sourcecode: akregator version File versions

QDomElement Feed::toOPML ( QDomElement  parent,
QDomDocument  document 
) const [virtual]

exports the feed settings to OPML

Implements Akregator::TreeNode.

Definition at line 144 of file feed.cpp.

References archiveModeToString(), fetchInterval(), m_description, m_htmlUrl, m_xmlUrl, Akregator::TreeNode::title(), and useCustomFetchInterval().

{
    QDomElement el = document.createElement( "outline" );
    el.setAttribute( "text", title() );
    el.setAttribute( "title", title() );
    el.setAttribute( "xmlUrl", m_xmlUrl );
    el.setAttribute( "htmlUrl", m_htmlUrl );
    el.setAttribute( "id", QString::number(id()) );
    el.setAttribute( "description", m_description );
    el.setAttribute( "autoFetch", (useCustomFetchInterval() ? "true" : "false") );
    el.setAttribute( "fetchInterval", QString::number(fetchInterval()) );
    el.setAttribute( "archiveMode", archiveModeToString(m_archiveMode) );
    el.setAttribute( "maxArticleAge", m_maxArticleAge );
    el.setAttribute( "maxArticleNumber", m_maxArticleNumber );
    if (m_markImmediatelyAsRead)
        el.setAttribute( "markImmediatelyAsRead", "true" );
    if (m_useNotification)
        el.setAttribute( "useNotification", "true" );
    el.setAttribute( "maxArticleNumber", m_maxArticleNumber );
    el.setAttribute( "type", "rss" ); // despite some additional fields, its still "rss" OPML
    el.setAttribute( "version", "RSS" );
    parent.appendChild( el );
    return el;
}


Generated by  Doxygen 1.6.0   Back to index