summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/scriptobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widgets/scriptobject.cpp')
-rw-r--r--kommander/widgets/scriptobject.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp
index 859d87d0..2824d81f 100644
--- a/kommander/widgets/scriptobject.cpp
+++ b/kommander/widgets/scriptobject.cpp
@@ -14,8 +14,8 @@
* *
***************************************************************************/
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -29,17 +29,17 @@
#include <myprocess.h>
#include <specials.h>
-ScriptObject::ScriptObject(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+ScriptObject::ScriptObject(TQWidget *a_parent, const char *a_name)
+ : TQLabel(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
if (KommanderWidget::inEditor)
{
setPixmap(KGlobal::iconLoader()->loadIcon("shellscript", KIcon::NoGroup, KIcon::SizeMedium));
- setFrameStyle(QFrame::Box | QFrame::Plain);
+ setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
setFixedSize(pixmap()->size());
}
@@ -51,9 +51,9 @@ ScriptObject::~ScriptObject()
{
}
-QString ScriptObject::currentState() const
+TQString ScriptObject::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ScriptObject::isKommanderWidget() const
@@ -61,27 +61,27 @@ bool ScriptObject::isKommanderWidget() const
return true;
}
-QStringList ScriptObject::associatedText() const
+TQStringList ScriptObject::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ScriptObject::setAssociatedText(const QStringList& a_at)
+void ScriptObject::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ScriptObject::setWidgetText(const QString& a_text)
+void ScriptObject::setWidgetText(const TQString& a_text)
{
KommanderWidget::setAssociatedText(a_text);
}
-void ScriptObject::setPopulationText(const QString& a_text)
+void ScriptObject::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ScriptObject::populationText() const
+TQString ScriptObject::populationText() const
{
return KommanderWidget::populationText();
}
@@ -91,15 +91,15 @@ void ScriptObject::populate()
setAssociatedText(KommanderWidget::evalAssociatedText(populationText()));
}
-QString ScriptObject::executeProcess(bool blocking)
+TQString ScriptObject::executeProcess(bool blocking)
{
int index = ( states().findIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
- return QString();
+ return TQString();
}
- QString evalText = m_associatedText[index];
+ TQString evalText = m_associatedText[index];
if ((KommanderWidget::useInternalParser && !evalText.startsWith("#!")) || evalText.startsWith("#!kommander"))
{
@@ -119,14 +119,14 @@ void ScriptObject::execute()
executeProcess(true);
}
-void ScriptObject::execute(const QString& s)
+void ScriptObject::execute(const TQString& s)
{
m_params.clear();
m_params.append(s);
executeProcess(true);
}
-void ScriptObject::execute(const QString& s1, const QString& s2)
+void ScriptObject::execute(const TQString& s1, const TQString& s2)
{
m_params.clear();
m_params.append(s1);
@@ -137,22 +137,22 @@ void ScriptObject::execute(const QString& s1, const QString& s2)
void ScriptObject::execute(int i)
{
m_params.clear();
- m_params.append(QString::number(i));
+ m_params.append(TQString::number(i));
executeProcess(true);
}
void ScriptObject::execute(int i, int j)
{
m_params.clear();
- m_params.append(QString::number(i));
- m_params.append(QString::number(j));
+ m_params.append(TQString::number(i));
+ m_params.append(TQString::number(j));
executeProcess(true);
}
void ScriptObject::execute(bool i)
{
m_params.clear();
- m_params.append(QString::number(i));
+ m_params.append(TQString::number(i));
executeProcess(true);
}
@@ -162,14 +162,14 @@ bool ScriptObject::isFunctionSupported(int f)
|| f == DCOP::count;
}
-QString ScriptObject::handleDCOP(int function, const QStringList& args)
+TQString ScriptObject::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::setText:
setAssociatedText(args[0]);
break;
case DCOP::clear:
- setAssociatedText(QString::null);
+ setAssociatedText(TQString::null);
break;
case DCOP::execute:
m_params = args;
@@ -178,14 +178,14 @@ QString ScriptObject::handleDCOP(int function, const QStringList& args)
case DCOP::item:
{
uint index = args[0].toInt();
- return index < m_params.count() ? m_params[index] : QString::null;
+ return index < m_params.count() ? m_params[index] : TQString::null;
}
case DCOP::count:
- return QString::number(m_params.count());
+ return TQString::number(m_params.count());
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}
#include "scriptobject.moc"