summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/treewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widgets/treewidget.cpp')
-rw-r--r--kommander/widgets/treewidget.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp
index ef3b7e65..e04fe41d 100644
--- a/kommander/widgets/treewidget.cpp
+++ b/kommander/widgets/treewidget.cpp
@@ -55,7 +55,7 @@ enum Functions {
};
TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name)
- : KListView(a_parent, a_name), KommanderWidget(this)
+ : KListView(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -95,7 +95,7 @@ void TreeWidget::addItemFromString(const TQString& s)
TQStringList elements = TQStringList::split(m_pathSeparator, s, true);
if (elements.count() > 1)
setRootIsDecorated(true);
- TQListViewItem* parent = 0;
+ TQListViewItem* tqparent = 0;
if (m_lastPath.size() < elements.count())
m_lastPath.resize(elements.count());
uint i = 0;
@@ -103,13 +103,13 @@ void TreeWidget::addItemFromString(const TQString& s)
{
if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i])
{
- parent = m_lastPath[i];
+ tqparent = m_lastPath[i];
i++;
continue;
}
else
{
- TQListViewItem* item = (i>0) ? parent->firstChild() : firstChild();
+ TQListViewItem* item = (i>0) ? tqparent->firstChild() : firstChild();
while (item)
{
if (item->text(0) == *it)
@@ -117,19 +117,19 @@ void TreeWidget::addItemFromString(const TQString& s)
item = item->nextSibling();
}
if (item)
- parent = item;
+ tqparent = item;
else
- parent = itemFromString(parent, *it);
- m_lastPath.insert(i, parent);
+ tqparent = itemFromString(tqparent, *it);
+ m_lastPath.insert(i, tqparent);
i++;
}
}
}
-TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQString& s)
+TQListViewItem* TreeWidget::itemFromString(TQListViewItem* tqparent, const TQString& s)
{
TQStringList elements;
- if (s.contains("\t"))
+ if (s.tqcontains("\t"))
elements = TQStringList::split("\t", s, true);
else
elements = TQStringList::split("\\t", s, true);
@@ -137,8 +137,8 @@ TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQStrin
if (cols >= columns())
cols = columns();
TQListViewItem* item;
- if (parent)
- item = new TQListViewItem(parent);
+ if (tqparent)
+ item = new TQListViewItem(tqparent);
else
item = new TQListViewItem(this);
int i = 0;
@@ -208,8 +208,8 @@ TQString TreeWidget::itemsText()
if (path.isEmpty())
items.append(itemText(it.current()));
else
- items.append(TQString("%1%2%3").arg(path).arg(m_pathSeparator)
- .arg(itemText(it.current())));
+ items.append(TQString("%1%2%3").tqarg(path).tqarg(m_pathSeparator)
+ .tqarg(itemText(it.current())));
++it;
}
return items.join("\n");
@@ -219,14 +219,14 @@ TQString TreeWidget::itemPath(TQListViewItem* item) const
{
if (!item)
return TQString();
- item = item->parent();
+ item = item->tqparent();
if (!item)
return TQString();
TQStringList path;
while (item)
{
path.prepend(item->text(0));
- item = item->parent();
+ item = item->tqparent();
}
return path.join(m_pathSeparator);
}
@@ -295,11 +295,11 @@ void TreeWidget::contextMenuEvent( TQContextMenuEvent * e )
void TreeWidget::setColAlign(int column, const TQString& align)
{
if (align.lower() == "left")
- setColumnAlignment (column, Qt::AlignLeft);
+ setColumnAlignment (column, TQt::AlignLeft);
else if (align.lower() == "right")
- setColumnAlignment (column, Qt::AlignRight);
+ setColumnAlignment (column, TQt::AlignRight);
else if (align.lower() == "center")
- setColumnAlignment (column, Qt::AlignCenter);
+ setColumnAlignment (column, TQt::AlignCenter);
}
bool TreeWidget::isFunctionSupported(int f)
@@ -307,7 +307,7 @@ bool TreeWidget::isFunctionSupported(int f)
return f == DCOP::insertItem || f == DCOP::text || f == DCOP::setText || f == DCOP::insertItems ||
f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::removeItem ||
f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::findItem || f == DCOP::item ||
- f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
+ f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
}
TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
@@ -342,7 +342,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
{
if (it.current()->isSelected())
{
- selection.append(TQString("%1\n").arg(itemToIndexSafe(it.current())));
+ selection.append(TQString("%1\n").tqarg(itemToIndexSafe(it.current())));
}
++it;
}
@@ -368,14 +368,14 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
}
case DCOP::setSelection:
if (selectionModeExt() == Single || selectionModeExt() == NoSelection)
- setCurrentItem(findItem(args[0], 0));
+ setCurrentItem(tqfindItem(args[0], 0));
else
{
clearSelection();
TQStringList items(TQStringList::split("\n", args[0]));
for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
{
- TQListViewItem* item = findItem(*it, 0);
+ TQListViewItem* item = tqfindItem(*it, 0);
if (item)
{
item->setSelected(true);
@@ -405,17 +405,17 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
break;
case DCOP::findItem:
if (!args[1])
- return TQString::number(itemToIndexSafe(findItem(args[0], 0)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], 0)));
else
{
if (args[2].toUInt() && args[3].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt())));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt())));
else if (args[2].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::CaseSensitive | TQt::Contains)));
else if (args[3].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::ExactMatch)));
else
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::Contains)));
}
break;
case DCOP::item:
@@ -494,7 +494,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
case TW_childCount:
return TQString::number(childCount());
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;