diff options
Diffstat (limited to 'akregator/src/folder.cpp')
-rw-r--r-- | akregator/src/folder.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp index 1d2c6a5cf..739b0cf19 100644 --- a/akregator/src/folder.cpp +++ b/akregator/src/folder.cpp @@ -39,9 +39,9 @@ namespace Akregator { class Folder::FolderPrivate { public: - /** List of tqchildren */ - TQValueList<TreeNode*> tqchildren; - /** caching unread count of tqchildren */ + /** List of children */ + TQValueList<TreeNode*> children; + /** caching unread count of children */ int unread; /** whether or not the folder is expanded */ bool open; @@ -62,9 +62,9 @@ bool Folder::accept(TreeNodeVisitor* visitor) Folder* Folder::fromOPML(TQDomElement e) { - Folder* fg = new Folder(e.hasAttribute(TQString::tqfromLatin1("text")) ? e.attribute(TQString::tqfromLatin1("text")) : e.attribute(TQString::tqfromLatin1("title"))); - fg->setOpen( e.attribute(TQString::tqfromLatin1("isOpen")) != TQString::tqfromLatin1(("false"))); - fg->setId( e.attribute(TQString::tqfromLatin1("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; } @@ -77,7 +77,7 @@ Folder::Folder(const TQString& title) : TreeNode(), d(new FolderPrivate) Folder::~Folder() { TreeNode* tmp = 0; - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != d->tqchildren.end(); ++it) + for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it) { delete tmp; tmp = *it; @@ -93,8 +93,8 @@ Folder::~Folder() TQStringList Folder::tags() const { TQStringList t; - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it) + 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 TQSet. Now. TQStringList t2 = (*it)->tags(); @@ -108,8 +108,8 @@ TQStringList Folder::tags() const TQValueList<Article> Folder::articles(const TQString& tag) { TQValueList<Article> seq; - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it) + TQValueList<TreeNode*>::ConstIterator en = d->children.end(); + for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it) seq += (*it)->articles(tag); return seq; @@ -123,21 +123,21 @@ TQDomElement Folder::toOPML( TQDomElement parent, TQDomDocument document ) const el.setAttribute("isOpen", d->open ? "true" : "false"); el.setAttribute( "id", TQString::number(id()) ); - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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; } -TQValueList<TreeNode*> Folder::tqchildren() const +TQValueList<TreeNode*> Folder::children() const { - return d->tqchildren; + return d->children; } void Folder::insertChild(TreeNode* node, TreeNode* after) { - int pos = d->tqchildren.findIndex(after); + int pos = d->children.findIndex(after); if (pos < 0) prependChild(node); @@ -150,10 +150,10 @@ void Folder::insertChild(uint index, TreeNode* node) // kdDebug() << "enter Folder::insertChild(int, node) " << node->title() << endl; if (node) { - if (index >= d->tqchildren.size()) - d->tqchildren.append(node); + if (index >= d->children.size()) + d->children.append(node); else - d->tqchildren.insert(d->tqchildren.at(index), node); + d->children.insert(d->children.at(index), node); node->setParent(this); connectToNode(node); updateUnreadCount(); @@ -170,7 +170,7 @@ void Folder::appendChild(TreeNode* node) // kdDebug() << "enter Folder::appendChild() " << node->title() << endl; if (node) { - d->tqchildren.append(node); + d->children.append(node); node->setParent(this); connectToNode(node); updateUnreadCount(); @@ -187,7 +187,7 @@ void Folder::prependChild(TreeNode* node) // kdDebug() << "enter Folder::prependChild() " << node->title() << endl; if (node) { - d->tqchildren.prepend(node); + d->children.prepend(node); node->setParent(this); connectToNode(node); updateUnreadCount(); @@ -202,10 +202,10 @@ void Folder::prependChild(TreeNode* node) void Folder::removeChild(TreeNode* node) { // kdDebug() << "enter Folder::removeChild() node:" << (node ? node->title() : "null") << endl; - if (node && d->tqchildren.contains(node)) + if (node && d->children.contains(node)) { node->setParent(0); - d->tqchildren.remove(node); + d->children.remove(node); disconnectFromNode(node); updateUnreadCount(); emit signalChildRemoved(this, node); @@ -219,12 +219,12 @@ void Folder::removeChild(TreeNode* node) TreeNode* Folder::firstChild() { - return d->tqchildren.isEmpty() ? 0 : d->tqchildren.first(); + return d->children.isEmpty() ? 0 : d->children.first(); } TreeNode* Folder::lastChild() { - return d->tqchildren.isEmpty() ? 0 : d->tqchildren.last(); + return d->children.isEmpty() ? 0 : d->children.last(); } bool Folder::isOpen() const @@ -246,8 +246,8 @@ int Folder::totalCount() const { int totalCount = 0; - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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; - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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); - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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); } @@ -281,7 +281,7 @@ void Folder::slotChildChanged(TreeNode* /*node*/) void Folder::slotChildDestroyed(TreeNode* node) { - d->tqchildren.remove(node); + d->children.remove(node); updateUnreadCount(); nodeModified(); } @@ -289,16 +289,16 @@ void Folder::slotChildDestroyed(TreeNode* node) void Folder::slotDeleteExpiredArticles() { setNotificationMode(false); - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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) { - TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end(); - for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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); } |