Logo Search packages:      
Sourcecode: akregator version File versions

void View::addFeedToGroup ( const QString &  url,
const QString &  group 
)

Add a feed to a group.

Parameters:
url The URL of the feed to add.
group The name of the folder into which the feed is added. If the group does not exist, it is created. The feed is added as the last member of the group.

Definition at line 500 of file akregator_view.cpp.

References Akregator::FeedGroup::appendChild(), Akregator::TreeNode::isGroup(), m_feedList, m_tree, and Akregator::FeedList::rootNode().

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

{
    
    // Locate the group.
    TreeNode* node = m_tree->findNodeByTitle(groupName);
                    
    FeedGroup* group = 0;
    if (!node || !node->isGroup())
    {
        FeedGroup* g = new FeedGroup( groupName );
        m_feedList->rootNode()->appendChild(g);
        group = g;
    }
    else
        group = static_cast<FeedGroup*>(node);
    
    // Invoke the Add Feed dialog with url filled in.
    if (group)
        addFeed(url, 0, group, true);
}


Generated by  Doxygen 1.6.0   Back to index