summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/oblique/tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/oblique/tree.cpp')
-rw-r--r--noatun-plugins/oblique/tree.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/noatun-plugins/oblique/tree.cpp b/noatun-plugins/oblique/tree.cpp
index 0087b99..430d4cf 100644
--- a/noatun-plugins/oblique/tree.cpp
+++ b/noatun-plugins/oblique/tree.cpp
@@ -76,7 +76,7 @@ static void treeItemSort(TreeItem **begin, TreeItem **end)
static void treeItemSort(TreeItem *first)
{
- const int count = first->parent() ? first->parent()->childCount() : first->listView()->childCount();
+ const int count = first->tqparent() ? first->tqparent()->childCount() : first->listView()->childCount();
if (count < 2) return;
Query *q = first->tree()->query();
@@ -149,28 +149,28 @@ inline static void sortify(T *item)
}
-TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const TQString &p)
- : KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false)
+TreeItem::TreeItem(Tree *tqparent, QueryGroup *group, const File &file, const TQString &p)
+ : KListViewItem(tqparent, p), mGroup(group), mUserOpened(false), mHidden(false)
{
if (group->option(QueryGroup::Playable))
{
if (mFile = file)
- parent->mPlayableItemCount++;
+ tqparent->mPlayableItemCount++;
}
- sortify(parent);
+ sortify(tqparent);
}
-TreeItem::TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const TQString &p)
- : KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false)
+TreeItem::TreeItem(TreeItem *tqparent, QueryGroup *group, const File &file, const TQString &p)
+ : KListViewItem(tqparent, p), mGroup(group), mUserOpened(false), mHidden(false)
{
if (group->option(QueryGroup::Playable))
{
if (mFile = file)
- parent->tree()->mPlayableItemCount++;
+ tqparent->tree()->mPlayableItemCount++;
}
- sortify(parent);
+ sortify(tqparent);
}
TreeItem::~TreeItem()
@@ -180,7 +180,7 @@ TreeItem::~TreeItem()
tree()->mPlayableItemCount--;
}
- // I have to remove my children, because they need their parent
+ // I have to remove my tqchildren, because they need their tqparent
// in tact for the below code
while (TreeItem *c = firstChild())
delete c;
@@ -258,14 +258,14 @@ TQString TreeItem::presentation() const
return text(0);
}
-TreeItem *TreeItem::find(File item)
+TreeItem *TreeItem::tqfind(File item)
{
TreeItem *i = firstChild();
while (i)
{
if (i->file() == item) return i;
- TreeItem *found = i->find(item);
+ TreeItem *found = i->tqfind(item);
if (found and found->playable()) return found;
i = i->nextSibling();
}
@@ -297,7 +297,7 @@ void TreeItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int w
}
TQColorGroup newcg(cg);
- if (parent() && parent()->isOpen() && !parent()->mUserOpened)
+ if (tqparent() && tqparent()->isOpen() && !tqparent()->mUserOpened)
{
// slow, but not often used
TQColor text = newcg.text();
@@ -338,8 +338,8 @@ void TreeItem::autoExpand()
void TreeItem::forceAutoExpand()
{
- if (parent())
- parent()->forceAutoExpand();
+ if (tqparent())
+ tqparent()->forceAutoExpand();
if (!mUserOpened)
tree()->addAutoExpanded(this);
@@ -352,7 +352,7 @@ bool TreeItem::hideIfNoMatch(const TQString &match)
{
if (match.length())
{
- if (!text(0).contains(match, false))
+ if (!text(0).tqcontains(match, false))
{
setHidden(true);
return false;
@@ -367,7 +367,7 @@ bool TreeItem::hideIfNoMatch(const TQString &match)
if (match.length())
{
- visible = text(0).contains(match, false);
+ visible = text(0).tqcontains(match, false);
}
if (visible)
@@ -419,7 +419,7 @@ TreeItem *TreeItem::next()
{
if (upYours->nextSibling())
return upYours->nextSibling();
- upYours = upYours->parent();
+ upYours = upYours->tqparent();
} while (upYours);
}
return 0;
@@ -431,8 +431,8 @@ TreeItem *TreeItem::next()
-Tree::Tree(Oblique *oblique, TQWidget *parent)
- : KListView(parent), mOblique(oblique), mAutoExpanding(0)
+Tree::Tree(Oblique *oblique, TQWidget *tqparent)
+ : KListView(tqparent), mOblique(oblique), mAutoExpanding(0)
{
mCurrent = 0;
lastMenu =0;
@@ -503,16 +503,16 @@ void Tree::clear()
KListView::clear();
}
-void Tree::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme)
+void Tree::movableDropEvent (TQListViewItem* tqparent, TQListViewItem* afterme)
{
TQPtrList<TQListViewItem> items = selectedItems(true);
for (TQPtrList<TQListViewItem>::Iterator i(items.begin()); *i; ++i)
{
- if ((*i)->parent() != parent)
+ if ((*i)->tqparent() != tqparent)
return;
}
- KListView::movableDropEvent(parent, afterme);
+ KListView::movableDropEvent(tqparent, afterme);
}
@@ -535,7 +535,7 @@ void Tree::dropped(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &
TreeItem *Tree::firstChild()
{ return static_cast<TreeItem*>(KListView::firstChild()); }
-TreeItem *Tree::find(File item)
+TreeItem *Tree::tqfind(File item)
{
TreeItem *i = firstChild();
@@ -543,7 +543,7 @@ TreeItem *Tree::find(File item)
{
if (i->file() == item) return i;
- TreeItem *found = i->find(item);
+ TreeItem *found = i->tqfind(item);
if (found) return found;
i = i->nextSibling();
@@ -551,19 +551,19 @@ TreeItem *Tree::find(File item)
return i;
}
-void Tree::insert(TreeItem *replace, File file)
+void Tree::insert(TreeItem *tqreplace, File file)
{
- TreeItem *created = collate(replace, file);
- if (mCurrent == replace)
+ TreeItem *created = collate(tqreplace, file);
+ if (mCurrent == tqreplace)
{
mCurrent = created;
- repaintItem(created);
- if (isSelected(replace))
+ tqrepaintItem(created);
+ if (isSelected(tqreplace))
setSelected(created, true);
}
- if (created != replace)
+ if (created != tqreplace)
{
- delete replace;
+ delete tqreplace;
}
}
@@ -592,7 +592,7 @@ void Tree::checkRemove(Slice *slice, File f)
void Tree::update(File file)
{
- if (TreeItem *item = find(file))
+ if (TreeItem *item = tqfind(file))
{
insert(item, file);
}
@@ -624,8 +624,8 @@ void Tree::setCurrent(TreeItem *cur)
mCurrent = cur;
TQPtrList<TreeItem> oldAutoExpanded = mAutoExpanded;
mAutoExpanded.clear();
- repaintItem(old);
- repaintItem(cur);
+ tqrepaintItem(old);
+ tqrepaintItem(cur);
if (cur) cur->autoExpand();
// do an anti-intersection on oldAutoUpdated and the new mAutoExpanded
@@ -750,36 +750,36 @@ TreeItem *Tree::collate(TreeItem *fix, QueryGroup *group, const File &file, Tree
TreeItem *Tree::node(TreeItem *fix, QueryGroup *group, const File &file, TreeItem *childOf)
{
- // search childOf's immediate children
- TreeItem *children;
+ // search childOf's immediate tqchildren
+ TreeItem *tqchildren;
if (childOf)
- children = childOf->firstChild();
+ tqchildren = childOf->firstChild();
else
- children = firstChild();
+ tqchildren = firstChild();
TQString presentation = group->presentation(file);
- while (children)
+ while (tqchildren)
{
// merging would be done here
bool matches=false;
if (group->fuzzyness(QueryGroup::Case))
{
- matches = (children->text(0).lower() == presentation.lower());
+ matches = (tqchildren->text(0).lower() == presentation.lower());
}
else
{
- matches = (children->text(0) == presentation);
+ matches = (tqchildren->text(0) == presentation);
}
- matches = matches && !children->group()->option(QueryGroup::Playable);
+ matches = matches && !tqchildren->group()->option(QueryGroup::Playable);
if (matches)
{
- children->setFile(File());
- return children;
+ tqchildren->setFile(File());
+ return tqchildren;
}
- children = children->nextSibling();
+ tqchildren = tqchildren->nextSibling();
}
TreeItem *item;
@@ -790,7 +790,7 @@ TreeItem *Tree::node(TreeItem *fix, QueryGroup *group, const File &file, TreeIte
else if (fix)
{
item = fix;
- if (fix->parent() != childOf)
+ if (fix->tqparent() != childOf)
moveItem(fix, childOf, 0);
item->setText(0, presentation);
}