Logo Search packages:      
Sourcecode: akregator version File versions

void View::slotFeedAddGroup (  )  [slot]

adds a feed group to the feed tree

Definition at line 908 of file akregator_view.cpp.

References Akregator::FeedGroup::appendChild(), Akregator::FeedGroup::insertChild(), Akregator::TreeNode::isGroup(), m_tree, and Akregator::TreeNode::parent().

    TreeNode* node = m_tree->selectedNode();
    TreeNode* after = 0;
    if (!node)
        node = m_tree->rootNode();

    // if a feed is selected, add group next to it
    if (!node->isGroup())
        after = node;
        node = node->parent();

    FeedGroup* currentGroup = static_cast<FeedGroup*> (node);
    bool Ok;
    QString text = KInputDialog::getText(i18n("Add Folder"), i18n("Folder name:"), "", &Ok);
    if (Ok)
        FeedGroup* newGroup = new FeedGroup(text);
        if (!after)
            currentGroup->insertChild(newGroup, after);

Generated by  Doxygen 1.6.0   Back to index