summaryrefslogtreecommitdiffstats
path: root/akregator/src/folder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/folder.cpp')
-rw-r--r--akregator/src/folder.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp
index f7dc8afbf..f3a583a6d 100644
--- a/akregator/src/folder.cpp
+++ b/akregator/src/folder.cpp
@@ -27,10 +27,10 @@
#include "fetchqueue.h"
#include "treenodevisitor.h"
-#include <qlistview.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -40,16 +40,16 @@ class Folder::FolderPrivate
{
public:
/** List of children */
- QValueList<TreeNode*> children;
+ TQValueList<TreeNode*> children;
/** caching unread count of children */
int unread;
/** whether or not the folder is expanded */
bool open;
/** caches guids for notifying added articles */
- QValueList<Article> addedArticlesNotify;
+ TQValueList<Article> addedArticlesNotify;
/** caches guids for notifying removed articles */
- QValueList<Article> removedArticlesNotify;
+ TQValueList<Article> removedArticlesNotify;
};
bool Folder::accept(TreeNodeVisitor* visitor)
@@ -60,15 +60,15 @@ bool Folder::accept(TreeNodeVisitor* visitor)
return visitor->visitTreeNode(this);
}
-Folder* Folder::fromOPML(QDomElement e)
+Folder* Folder::fromOPML(TQDomElement e)
{
- Folder* fg = new Folder(e.hasAttribute(QString::fromLatin1("text")) ? e.attribute(QString::fromLatin1("text")) : e.attribute(QString::fromLatin1("title")));
- fg->setOpen( e.attribute(QString::fromLatin1("isOpen")) != QString::fromLatin1(("false")));
- fg->setId( e.attribute(QString::fromLatin1("id")).toUInt() );
+ Folder* fg = new Folder(e.hasAttribute(TQString::fromLatin1("text")) ? e.attribute(TQString::fromLatin1("text")) : e.attribute(TQString::fromLatin1("title")));
+ fg->setOpen( e.attribute(TQString::fromLatin1("isOpen")) != TQString::fromLatin1(("false")));
+ fg->setId( e.attribute(TQString::fromLatin1("id")).toUInt() );
return fg;
}
-Folder::Folder(const QString& title) : TreeNode(), d(new FolderPrivate)
+Folder::Folder(const TQString& title) : TreeNode(), d(new FolderPrivate)
{
d->unread = 0;
setTitle(title);
@@ -77,7 +77,7 @@ Folder::Folder(const QString& title) : TreeNode(), d(new FolderPrivate)
Folder::~Folder()
{
TreeNode* tmp = 0;
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it)
{
delete tmp;
tmp = *it;
@@ -90,47 +90,47 @@ Folder::~Folder()
d = 0;
}
-QStringList Folder::tags() const
+TQStringList Folder::tags() const
{
- QStringList t;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQStringList t;
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
{
// intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want QSet. Now.
- QStringList t2 = (*it)->tags();
- for (QStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2)
+ TQStringList t2 = (*it)->tags();
+ for (TQStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2)
if (!t.contains(*it2))
t.append(*it2);
}
return t;
}
-QValueList<Article> Folder::articles(const QString& tag)
+TQValueList<Article> Folder::articles(const TQString& tag)
{
- QValueList<Article> seq;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<Article> seq;
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
seq += (*it)->articles(tag);
return seq;
}
-QDomElement Folder::toOPML( QDomElement parent, QDomDocument document ) const
+TQDomElement Folder::toOPML( TQDomElement parent, TQDomDocument document ) const
{
- QDomElement el = document.createElement( "outline" );
+ TQDomElement el = document.createElement( "outline" );
el.setAttribute( "text", title() );
parent.appendChild( el );
el.setAttribute("isOpen", d->open ? "true" : "false");
- el.setAttribute( "id", QString::number(id()) );
+ el.setAttribute( "id", TQString::number(id()) );
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
el.appendChild( (*it)->toOPML(el, document) );
return el;
}
-QValueList<TreeNode*> Folder::children() const
+TQValueList<TreeNode*> Folder::children() const
{
return d->children;
}
@@ -246,8 +246,8 @@ int Folder::totalCount() const
{
int totalCount = 0;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
totalCount += (*it)->totalCount();
return totalCount;
@@ -257,8 +257,8 @@ void Folder::updateUnreadCount()
{
int unread = 0;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
unread += (*it)->unread();
d->unread = unread;
@@ -267,8 +267,8 @@ void Folder::updateUnreadCount()
void Folder::slotMarkAllArticlesAsRead()
{
setNotificationMode(false);
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotMarkAllArticlesAsRead();
setNotificationMode(true, true);
}
@@ -289,16 +289,16 @@ void Folder::slotChildDestroyed(TreeNode* node)
void Folder::slotDeleteExpiredArticles()
{
setNotificationMode(false);
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotDeleteExpiredArticles();
setNotificationMode(true, true);
}
void Folder::slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly)
{
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotAddToFetchQueue(queue, intervalFetchOnly);
}
@@ -308,20 +308,20 @@ void Folder::doArticleNotification()
void Folder::connectToNode(TreeNode* child)
{
- connect(child, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotChildChanged(TreeNode*)));
- connect(child, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotChildDestroyed(TreeNode*)));
- connect(child, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)));
- connect(child, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- connect(child, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotChildChanged(TreeNode*)));
+ connect(child, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotChildDestroyed(TreeNode*)));
+ connect(child, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
void Folder::disconnectFromNode(TreeNode* child)
{
- disconnect(child, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotChildChanged(TreeNode*)));
- disconnect(child, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotChildDestroyed(TreeNode*)));
- disconnect(child, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)));
- disconnect(child, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- disconnect(child, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotChildChanged(TreeNode*)));
+ disconnect(child, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotChildDestroyed(TreeNode*)));
+ disconnect(child, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
TreeNode* Folder::next()