summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/toolbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widgets/toolbox.cpp')
-rw-r--r--kommander/widgets/toolbox.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp
index 90a31e46..a6340098 100644
--- a/kommander/widgets/toolbox.cpp
+++ b/kommander/widgets/toolbox.cpp
@@ -27,27 +27,27 @@
#define FIRST_FUNCTION ADDWIDGET
#define LAST_FUNCTION INDEXOF
-ToolBox::ToolBox(QWidget *parent, const char *name)
- : QToolBox(parent, name), KommanderWidget(this)
+ToolBox::ToolBox(TQWidget *parent, const char *name)
+ : TQToolBox(parent, name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(QString widget, QString widgetName, QString Label)",
+ KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(TQString widget, TQString widgetName, TQString Label)",
i18n("Adds a widget to the toolbox. Returns the index of the widget."), 3);
- KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(QString widget)",
+ KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(TQString widget)",
i18n("Returns the name of the active widget."), 1);
- KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(QString widget, QString widgetName)", i18n("Remove the selected widget, returns the index of the removed widget or -1 if no such widget was found."), 2);
- KommanderPlugin::registerFunction(REMOVEWIDGETAT, "removeWidgetAt(QString widget, int index)", i18n("Remove the widget from the index position, returns the index of the removed widget or -1 if no widget was found."), 2);
- KommanderPlugin::registerFunction(SETCURRENTWIDGET, "setCurrentWidget(QString widget, QString widgetName)",
+ KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(TQString widget, TQString widgetName)", i18n("Remove the selected widget, returns the index of the removed widget or -1 if no such widget was found."), 2);
+ KommanderPlugin::registerFunction(REMOVEWIDGETAT, "removeWidgetAt(TQString widget, int index)", i18n("Remove the widget from the index position, returns the index of the removed widget or -1 if no widget was found."), 2);
+ KommanderPlugin::registerFunction(SETCURRENTWIDGET, "setCurrentWidget(TQString widget, TQString widgetName)",
i18n("Activates the selected widget."), 2);
- KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(QString widget)",
+ KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(TQString widget)",
i18n("Returns the index of the active widget."), 1);
- KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(QString widget, int index)",
+ KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(TQString widget, int index)",
i18n("Returns the widget having the supplied index."), 2);
- KommanderPlugin::registerFunction(INDEXOF, "indexOf(QString widget, QString widgetName)",
+ KommanderPlugin::registerFunction(INDEXOF, "indexOf(TQString widget, TQString widgetName)",
i18n("Returns the index of the widget, -1 if the widget is not part of the toolbox."), 2);
}
@@ -57,9 +57,9 @@ ToolBox::~ToolBox()
{
}
-QString ToolBox::currentState() const
+TQString ToolBox::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ToolBox::isKommanderWidget() const
@@ -72,50 +72,50 @@ void ToolBox::populate()
setAssociatedText(KommanderWidget::evalAssociatedText( populationText()));
}
-QStringList ToolBox::associatedText() const
+TQStringList ToolBox::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ToolBox::setAssociatedText(const QStringList& a_at)
+void ToolBox::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ToolBox::setPopulationText(const QString& a_text)
+void ToolBox::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ToolBox::populationText() const
+TQString ToolBox::populationText() const
{
return KommanderWidget::populationText();
}
-QString ToolBox::addWidget(const QString& widgetName, const QString &label)
+TQString ToolBox::addWidget(const TQString& widgetName, const TQString &label)
{
KommanderWidget *w = widgetByName(widgetName);
if (w)
{
- int idx = addItem(dynamic_cast<QWidget*>(w), label);
+ int idx = addItem(dynamic_cast<TQWidget*>(w), label);
adjustSize();
- return QString::number(idx);
+ return TQString::number(idx);
} else
- return QString("-1");
+ return TQString("-1");
}
-void ToolBox::showEvent(QShowEvent* e)
+void ToolBox::showEvent(TQShowEvent* e)
{
- QToolBox::showEvent(e);
+ TQToolBox::showEvent(e);
emit widgetOpened();
}
-void ToolBox::contextMenuEvent( QContextMenuEvent * e )
+void ToolBox::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -124,7 +124,7 @@ bool ToolBox::isFunctionSupported(int f)
return f == DCOP::count || f == DCOP::geometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ;
}
-QString ToolBox::handleDCOP(int function, const QStringList& args)
+TQString ToolBox::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case ADDWIDGET:
@@ -132,59 +132,59 @@ QString ToolBox::handleDCOP(int function, const QStringList& args)
break;
case CURRENTWIDGET:
{
- QWidget *w = currentItem();
+ TQWidget *w = currentItem();
if (w)
return w->name();
else
- return QString();
+ return TQString();
break;
}
case SETCURRENTWIDGET:
{
KommanderWidget *w = widgetByName(args[0]);
- setCurrentItem(dynamic_cast<QWidget*>(w));
- return QString();
+ setCurrentItem(dynamic_cast<TQWidget*>(w));
+ return TQString();
}
case REMOVEWIDGET:
{
KommanderWidget *w = widgetByName(args[0]);
- return QString::number(removeItem(dynamic_cast<QWidget*>(w)));
+ return TQString::number(removeItem(dynamic_cast<TQWidget*>(w)));
}
case REMOVEWIDGETAT:
{
- QWidget *w = item(args[0].toInt());
- return QString::number(removeItem(w));
+ TQWidget *w = item(args[0].toInt());
+ return TQString::number(removeItem(w));
}
case CURRENTINDEX:
{
- return QString::number(currentIndex());
+ return TQString::number(currentIndex());
break;
}
case WIDGETAT:
{
- QWidget *w = item(args[0].toInt());
+ TQWidget *w = item(args[0].toInt());
if (w)
return w->name();
else
- return QString();
+ return TQString();
break;
}
case INDEXOF:
{
KommanderWidget *w = widgetByName(args[0]);
- return QString::number(indexOf(dynamic_cast<QWidget*>(w)));
+ return TQString::number(indexOf(dynamic_cast<TQWidget*>(w)));
}
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
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;
}
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "toolbox.moc"