summaryrefslogtreecommitdiffstats
path: root/akregator/src/feedlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/feedlistview.cpp')
-rw-r--r--akregator/src/feedlistview.cpp120
1 files changed, 60 insertions, 60 deletions
diff --git a/akregator/src/feedlistview.cpp b/akregator/src/feedlistview.cpp
index b680c7c58..0ca068fdd 100644
--- a/akregator/src/feedlistview.cpp
+++ b/akregator/src/feedlistview.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include "dragobjects.h"
@@ -65,7 +65,7 @@ class NodeListView::NodeListViewPrivate
bool showTagFolders;
// Drag and Drop variables
- TQListViewItem *parent;
+ TQListViewItem *tqparent;
TQListViewItem *afterme;
TQTimer autoopentimer;
ConnectNodeVisitor* connectNodeVisitor;
@@ -179,9 +179,9 @@ class NodeListView::DeleteItemVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
- // delete child items recursively before deleting parent
- TQValueList<TreeNode*> children = node->children();
- for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ // delete child items recursively before deleting tqparent
+ TQValueList<TreeNode*> tqchildren = node->tqchildren();
+ for (TQValueList<TreeNode*>::ConstIterator it = tqchildren.begin(); it != tqchildren.end(); ++it )
visit(*it);
visitTreeNode(node);
@@ -212,15 +212,15 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
TagNodeItem* item = 0;
TreeNode* prev = node->prevSibling();
- FolderItem* parentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->parent()));
- if (parentItem)
+ FolderItem* tqparentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->tqparent()));
+ if (tqparentItem)
{
if (prev)
{
- item = new TagNodeItem( parentItem, m_view->findNodeItem(prev), node);
+ item = new TagNodeItem( tqparentItem, m_view->findNodeItem(prev), node);
}
else
- item = new TagNodeItem( parentItem, node);
+ item = new TagNodeItem( tqparentItem, node);
}
else
{
@@ -234,8 +234,8 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
item->nodeChanged();
m_view->d->itemDict.insert(node, item);
m_view->connectToNode(node);
- if (parentItem)
- parentItem->sortChildItems(0, true);
+ if (tqparentItem)
+ tqparentItem->sortChildItems(0, true);
return true;
}
@@ -246,15 +246,15 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
TagFolderItem* item = 0;
TreeNode* prev = node->prevSibling();
- FolderItem* parentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->parent()));
- if (parentItem)
+ FolderItem* tqparentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->tqparent()));
+ if (tqparentItem)
{
if (prev)
{
- item = new TagFolderItem( parentItem, m_view->findNodeItem(prev), node);
+ item = new TagFolderItem( tqparentItem, m_view->findNodeItem(prev), node);
}
else
- item = new TagFolderItem(parentItem, node);
+ item = new TagFolderItem(tqparentItem, node);
}
else
{
@@ -267,10 +267,10 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
}
m_view->d->itemDict.insert(node, item);
- TQValueList<TreeNode*> children = node->children();
+ TQValueList<TreeNode*> tqchildren = node->tqchildren();
- // add children recursively
- for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ // add tqchildren recursively
+ for (TQValueList<TreeNode*>::ConstIterator it = tqchildren.begin(); it != tqchildren.end(); ++it )
visit(*it);
m_view->connectToNode(node);
@@ -284,15 +284,15 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
FolderItem* item = 0;
TreeNode* prev = node->prevSibling();
- FolderItem* parentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->parent()));
- if (parentItem)
+ FolderItem* tqparentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->tqparent()));
+ if (tqparentItem)
{
if (prev)
{
- item = new FolderItem( parentItem, m_view->findNodeItem(prev), node);
+ item = new FolderItem( tqparentItem, m_view->findNodeItem(prev), node);
}
else
- item = new FolderItem(parentItem, node);
+ item = new FolderItem(tqparentItem, node);
}
else
{
@@ -305,9 +305,9 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
}
m_view->d->itemDict.insert(node, item);
- // add children recursively
- TQValueList<TreeNode*> children = node->children();
- for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ // add tqchildren recursively
+ TQValueList<TreeNode*> tqchildren = node->tqchildren();
+ for (TQValueList<TreeNode*>::ConstIterator it = tqchildren.begin(); it != tqchildren.end(); ++it )
visit(*it);
m_view->connectToNode(node);
@@ -321,16 +321,16 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
FeedItem* item = 0;
TreeNode* prev = node->prevSibling();
- FolderItem* parentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->parent()));
+ FolderItem* tqparentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->tqparent()));
- if (parentItem)
+ if (tqparentItem)
{
if (prev)
{
- item = new FeedItem( parentItem, m_view->findNodeItem(prev), node);
+ item = new FeedItem( tqparentItem, m_view->findNodeItem(prev), node);
}
else
- item = new FeedItem( parentItem, node);
+ item = new FeedItem( tqparentItem, node);
}
else
{
@@ -352,8 +352,8 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
NodeListView* m_view;
};
-NodeListView::NodeListView( TQWidget *parent, const char *name)
- : KListView(parent, name), d(new NodeListViewPrivate)
+NodeListView::NodeListView( TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name), d(new NodeListViewPrivate)
{
d->showTagFolders = true;
d->connectNodeVisitor = new ConnectNodeVisitor(this),
@@ -457,7 +457,7 @@ TreeNode* NodeListView::findNodeByTitle(const TQString& title)
TreeNodeItem* NodeListView::findNodeItem(TreeNode* node)
{
- return d->itemDict.find(node);
+ return d->itemDict.tqfind(node);
}
TreeNodeItem* NodeListView::findItemByTitle(const TQString& text, int column, ComparisonFlags compare) const
@@ -510,7 +510,7 @@ void NodeListView::slotDropped( TQDropEvent *e, TQListViewItem*
if (KURLDrag::canDecode(e))
{
- FolderItem* parent = dynamic_cast<FolderItem*> (d->parent);
+ FolderItem* tqparent = dynamic_cast<FolderItem*> (d->tqparent);
TreeNodeItem* afterMe = 0;
if(d->afterme)
@@ -519,7 +519,7 @@ void NodeListView::slotDropped( TQDropEvent *e, TQListViewItem*
KURL::List urls;
KURLDrag::decode( e, urls );
e->accept();
- emit signalDropped( urls, afterMe ? afterMe->node() : 0, parent ? parent->node() : 0);
+ emit signalDropped( urls, afterMe ? afterMe->node() : 0, tqparent ? tqparent->node() : 0);
}
}
else
@@ -527,23 +527,23 @@ void NodeListView::slotDropped( TQDropEvent *e, TQListViewItem*
}
}
-void NodeListView::movableDropEvent(TQListViewItem* /*parent*/, TQListViewItem* /*afterme*/)
+void NodeListView::movableDropEvent(TQListViewItem* /*tqparent*/, TQListViewItem* /*afterme*/)
{
d->autoopentimer.stop();
- if (d->parent)
+ if (d->tqparent)
{
openFolder();
- Folder* parentNode = (dynamic_cast<FolderItem*> (d->parent))->node();
+ Folder* tqparentNode = (dynamic_cast<FolderItem*> (d->tqparent))->node();
TreeNode* afterMeNode = 0;
TreeNode* current = selectedNode();
if (d->afterme)
afterMeNode = (dynamic_cast<TreeNodeItem*> (d->afterme))->node();
- current->parent()->removeChild(current);
- parentNode->insertChild(current, afterMeNode);
- KListView::movableDropEvent(d->parent, d->afterme);
+ current->tqparent()->removeChild(current);
+ tqparentNode->insertChild(current, afterMeNode);
+ KListView::movableDropEvent(d->tqparent, d->afterme);
}
}
@@ -557,13 +557,13 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
TQPoint vp = contentsToViewport(event->pos());
TQListViewItem *i = itemAt(vp);
- TQListViewItem *qiparent;
+ TQListViewItem *qitqparent;
TQListViewItem *qiafterme;
- findDrop( event->pos(), qiparent, qiafterme );
+ findDrop( event->pos(), qitqparent, qiafterme );
if (event->source() == viewport()) {
// disable any drops where the result would be top level nodes
- if (i && !i->parent())
+ if (i && !i->tqparent())
{
event->ignore();
d->autoopentimer.stop();
@@ -572,12 +572,12 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
// prevent dragging nodes from All Feeds to My Tags or vice versa
TQListViewItem* root1 = i;
- while (root1 && root1->parent())
- root1 = root1->parent();
+ while (root1 && root1->tqparent())
+ root1 = root1->tqparent();
TQListViewItem* root2 = selectedItem();
- while (root2 && root2->parent())
- root2 = root2->parent();
+ while (root2 && root2->tqparent())
+ root2 = root2->tqparent();
if (root1 != root2)
{
@@ -587,7 +587,7 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
}
// don't drop node into own subtree
- TQListViewItem* p = qiparent;
+ TQListViewItem* p = qitqparent;
while (p)
if (p == selectedItem())
{
@@ -597,7 +597,7 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
}
else
{
- p = p->parent();
+ p = p->tqparent();
}
// disable drags onto the item itself
@@ -615,7 +615,7 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
// event->pos().x() < header()->cellPos(header()->mapToIndex(0)))
// {} else
- // do we want to move inside the old parent or do we want to move to a new parent
+ // do we want to move inside the old tqparent or do we want to move to a new tqparent
if (i && (itemAt(vp - TQPoint(0,5)) == i && itemAt(vp + TQPoint(0,5)) == i))
{
setDropVisualizer(false);
@@ -625,10 +625,10 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
TreeNode *iNode = (dynamic_cast<TreeNodeItem*> (i))->node();
if (iNode->isGroup())
{
- if (i != d->parent)
+ if (i != d->tqparent)
d->autoopentimer.start(750);
- d->parent = i;
+ d->tqparent = i;
d->afterme = 0;
}
else
@@ -644,7 +644,7 @@ void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
setDropVisualizer(true);
setDropHighlighter(false);
cleanItemHighlighter();
- d->parent = qiparent;
+ d->tqparent = qitqparent;
d->afterme = qiafterme;
d->autoopentimer.stop();
}
@@ -665,7 +665,7 @@ bool NodeListView::acceptDrag(TQDropEvent *e) const
else
{
// disable dragging of top-level nodes (All Feeds, My Tags)
- if (selectedItem() && !selectedItem()->parent())
+ if (selectedItem() && !selectedItem()->tqparent())
return false;
else
return true;
@@ -719,8 +719,8 @@ void NodeListView::slotItemLeft()
sel->setOpen(false);
else
{
- if (sel->parent())
- setSelected( sel->parent(), true );
+ if (sel->tqparent())
+ setSelected( sel->tqparent(), true );
}
ensureItemVisible( selectedItem() );
@@ -927,7 +927,7 @@ void NodeListView::slotNodeAdded(TreeNode* node)
d->createItemVisitor->visit(node);
}
-void NodeListView::slotNodeRemoved(Folder* /*parent*/, TreeNode* node)
+void NodeListView::slotNodeRemoved(Folder* /*tqparent*/, TreeNode* node)
{
if (node)
d->deleteItemVisitor->deleteItem(node, false);
@@ -1012,9 +1012,9 @@ TQDragObject *NodeListView::dragObject()
void NodeListView::openFolder() {
d->autoopentimer.stop();
- if (d->parent && !d->parent->isOpen())
+ if (d->tqparent && !d->tqparent->isOpen())
{
- d->parent->setOpen(true);
+ d->tqparent->setOpen(true);
}
}