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.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp
index fac9bd2e7..78612ec79 100644
--- a/akregator/src/folder.cpp
+++ b/akregator/src/folder.cpp
@@ -19,8 +19,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 "article.h"
#include "folder.h"
@@ -39,9 +39,9 @@ namespace Akregator {
class Folder::FolderPrivate
{
public:
- /** List of children */
- TQValueList<TreeNode*> children;
- /** caching unread count of children */
+ /** List of tqchildren */
+ TQValueList<TreeNode*> tqchildren;
+ /** caching unread count of tqchildren */
int unread;
/** whether or not the folder is expanded */
bool open;
@@ -77,7 +77,7 @@ Folder::Folder(const TQString& title) : TreeNode(), d(new FolderPrivate)
Folder::~Folder()
{
TreeNode* tmp = 0;
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != d->tqchildren.end(); ++it)
{
delete tmp;
tmp = *it;
@@ -93,10 +93,10 @@ Folder::~Folder()
TQStringList Folder::tags() const
{
TQStringList t;
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
{
- // intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want QSet. Now.
+ // intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want TQSet. Now.
TQStringList t2 = (*it)->tags();
for (TQStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2)
if (!t.tqcontains(*it2))
@@ -108,36 +108,36 @@ TQStringList Folder::tags() const
TQValueList<Article> Folder::articles(const TQString& tag)
{
TQValueList<Article> seq;
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
seq += (*it)->articles(tag);
return seq;
}
-TQDomElement Folder::toOPML( TQDomElement parent, TQDomDocument document ) const
+TQDomElement Folder::toOPML( TQDomElement tqparent, TQDomDocument document ) const
{
TQDomElement el = document.createElement( "outline" );
el.setAttribute( "text", title() );
- parent.appendChild( el );
+ tqparent.appendChild( el );
el.setAttribute("isOpen", d->open ? "true" : "false");
el.setAttribute( "id", TQString::number(id()) );
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
el.appendChild( (*it)->toOPML(el, document) );
return el;
}
-TQValueList<TreeNode*> Folder::children() const
+TQValueList<TreeNode*> Folder::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Folder::insertChild(TreeNode* node, TreeNode* after)
{
- int pos = d->children.findIndex(after);
+ int pos = d->tqchildren.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->children.size())
- d->children.append(node);
+ if (index >= d->tqchildren.size())
+ d->tqchildren.append(node);
else
- d->children.insert(d->children.at(index), node);
+ d->tqchildren.insert(d->tqchildren.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->children.append(node);
+ d->tqchildren.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->children.prepend(node);
+ d->tqchildren.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->children.tqcontains(node))
+ if (node && d->tqchildren.tqcontains(node))
{
node->setParent(0);
- d->children.remove(node);
+ d->tqchildren.remove(node);
disconnectFromNode(node);
updateUnreadCount();
emit signalChildRemoved(this, node);
@@ -219,12 +219,12 @@ void Folder::removeChild(TreeNode* node)
TreeNode* Folder::firstChild()
{
- return d->children.isEmpty() ? 0 : d->children.first();
+ return d->tqchildren.isEmpty() ? 0 : d->tqchildren.first();
}
TreeNode* Folder::lastChild()
{
- return d->children.isEmpty() ? 0 : d->children.last();
+ return d->tqchildren.isEmpty() ? 0 : d->tqchildren.last();
}
bool Folder::isOpen() const
@@ -246,8 +246,8 @@ int Folder::totalCount() const
{
int totalCount = 0;
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
totalCount += (*it)->totalCount();
return totalCount;
@@ -257,8 +257,8 @@ void Folder::updateUnreadCount()
{
int unread = 0;
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.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->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
(*it)->slotMarkAllArticlesAsRead();
setNotificationMode(true, true);
}
@@ -281,7 +281,7 @@ void Folder::slotChildChanged(TreeNode* /*node*/)
void Folder::slotChildDestroyed(TreeNode* node)
{
- d->children.remove(node);
+ d->tqchildren.remove(node);
updateUnreadCount();
nodeModified();
}
@@ -289,16 +289,16 @@ void Folder::slotChildDestroyed(TreeNode* node)
void Folder::slotDeleteExpiredArticles()
{
setNotificationMode(false);
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
(*it)->slotDeleteExpiredArticles();
setNotificationMode(true, true);
}
void Folder::slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly)
{
- TQValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->tqchildren.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->tqchildren.begin(); it != en; ++it)
(*it)->slotAddToFetchQueue(queue, intervalFetchOnly);
}
@@ -332,13 +332,13 @@ TreeNode* Folder::next()
if ( nextSibling() )
return nextSibling();
- Folder* p = parent();
+ Folder* p = tqparent();
while (p)
{
if ( p->nextSibling() )
return p->nextSibling();
else
- p = p->parent();
+ p = p->tqparent();
}
return 0;
}