summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widgets/listbox.cpp')
-rw-r--r--kommander/widgets/listbox.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp
index 19b1b540..3dd36357 100644
--- a/kommander/widgets/listbox.cpp
+++ b/kommander/widgets/listbox.cpp
@@ -18,21 +18,21 @@
#include <kiconloader.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <specials.h>
#include "listbox.h"
-ListBox::ListBox(QWidget *a_parent, const char *a_name)
+ListBox::ListBox(TQWidget *a_parent, const char *a_name)
: KListBox(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
@@ -42,9 +42,9 @@ ListBox::~ListBox()
{
}
-QString ListBox::currentState() const
+TQString ListBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ListBox::isKommanderWidget() const
@@ -52,42 +52,42 @@ bool ListBox::isKommanderWidget() const
return true;
}
-QStringList ListBox::associatedText() const
+TQStringList ListBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ListBox::setAssociatedText(const QStringList& a_at)
+void ListBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ListBox::setPopulationText(const QString& a_text)
+void ListBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ListBox::populationText() const
+TQString ListBox::populationText() const
{
return KommanderWidget::populationText();
}
void ListBox::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void ListBox::setWidgetText(const QString& a_text)
+void ListBox::setWidgetText(const TQString& a_text)
{
clear();
- insertStringList(QStringList::split("\n", a_text));
+ insertStringList(TQStringList::split("\n", a_text));
emit widgetTextChanged(a_text);
}
-void ListBox::showEvent(QShowEvent *e)
+void ListBox::showEvent(TQShowEvent *e)
{
- QListBox::showEvent(e);
+ TQListBox::showEvent(e);
emit widgetOpened();
}
@@ -99,15 +99,15 @@ bool ListBox::isFunctionSupported(int f)
f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
-void ListBox::contextMenuEvent( QContextMenuEvent * e )
+void ListBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
-QString ListBox::handleDCOP(int function, const QStringList& args)
+TQString ListBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
@@ -117,7 +117,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
{
if (selectionMode() == Single)
return currentText();
- QString value;
+ TQString value;
for (uint i=0; i<count(); i++)
if (isSelected(i))
value += (value.length() ? "\n" : "") + item(i)->text();
@@ -125,13 +125,13 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
}
case DCOP::setSelection:
{
- QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
if (found)
setCurrentItem(index(found));
break;
}
case DCOP::insertItems:
- insertStringList(QStringList::split("\n", args[0]), args[1].toInt());
+ insertStringList(TQStringList::split("\n", args[0]), args[1].toInt());
break;
case DCOP::insertItem:
insertItem(args[0], args[1].toInt());
@@ -143,9 +143,9 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
clear();
break;
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::currentItem:
- return QString::number(currentItem());
+ return TQString::number(currentItem());
case DCOP::setCurrentItem:
{
int index = args[0].toInt();
@@ -159,7 +159,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
if (index >= 0 && index < (int)count())
return item(index)->text();
else
- return QString();
+ return TQString();
}
case DCOP::addUniqueItem:
if (!findItem(args[0], Qt::ExactMatch))
@@ -167,17 +167,17 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::findItem:
{
- QListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
if (!found) found = findItem(args[0], Qt::BeginsWith);
if (!found) found = findItem(args[0], Qt::Contains);
if (found)
- return QString::number(index(found));
- else return QString::number(-1);
+ return TQString::number(index(found));
+ else return TQString::number(-1);
break;
}
case DCOP::setPixmap:
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small);
if (pixmap.isNull())
pixmap.load(args[0]);
int index = args[1].toInt();
@@ -192,26 +192,26 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
}
case DCOP::text:
{
- QStringList strings;
+ TQStringList strings;
for(uint i=0; i < count() ; ++i)
strings += item(i)->text();
return strings.join("\n");
}
case DCOP::geometry:
{
- QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height());
+ TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
break;
}
case DCOP::hasFocus:
- return QString::number(this->hasFocus());
+ return TQString::number(this->hasFocus());
break;
case DCOP::getBackgroundColor:
return this->paletteBackgroundColor().name();
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -219,7 +219,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "listbox.moc"