summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/execbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/widgets/execbutton.cpp')
-rw-r--r--kommander/widgets/execbutton.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp
index 69d06f8b..eccfe306 100644
--- a/kommander/widgets/execbutton.cpp
+++ b/kommander/widgets/execbutton.cpp
@@ -20,14 +20,14 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qcursor.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qwidgetlist.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqwidgetlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -47,30 +47,30 @@ enum Functions {
LastFunction
};
-ExecButton::ExecButton(QWidget* a_parent, const char* a_name)
+ExecButton::ExecButton(TQWidget* a_parent, const char* a_name)
: KPushButton(a_parent, a_name), KommanderWidget(this)
{
- QStringList states;
+ TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
setWriteStdout(true);
setBlockGUI(Button);
- connect(this, SIGNAL(clicked()), this, SLOT(startProcess()));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess()));
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(EB_isOn, "isOn(QString widget)", i18n("For use only when button is togle type."), 1);
- KommanderPlugin::registerFunction(EB_setPopup, "setPopup(QString widget, QString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2);
- KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(QString widget, QString Text)", i18n("Set the text on the ExecButton."), 2);
+ KommanderPlugin::registerFunction(EB_isOn, "isOn(TQString widget)", i18n("For use only when button is togle type."), 1);
+ KommanderPlugin::registerFunction(EB_setPopup, "setPopup(TQString widget, TQString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2);
+ KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(TQString widget, TQString Text)", i18n("Set the text on the ExecButton."), 2);
}
ExecButton::~ExecButton()
{
}
-QString ExecButton::currentState() const
+TQString ExecButton::currentState() const
{
- return QString("default");
+ return TQString("default");
}
bool ExecButton::isKommanderWidget() const
@@ -78,33 +78,33 @@ bool ExecButton::isKommanderWidget() const
return true;
}
-QStringList ExecButton::associatedText() const
+TQStringList ExecButton::associatedText() const
{
return KommanderWidget::associatedText();
}
-void ExecButton::setAssociatedText(const QStringList& a_at)
+void ExecButton::setAssociatedText(const TQStringList& a_at)
{
KommanderWidget::setAssociatedText(a_at);
}
-void ExecButton::setPopulationText(const QString& a_text)
+void ExecButton::setPopulationText(const TQString& a_text)
{
KommanderWidget::setPopulationText(a_text);
}
-QString ExecButton::populationText() const
+TQString ExecButton::populationText() const
{
return KommanderWidget::populationText();
}
void ExecButton::populate()
{
- QString txt = KommanderWidget::evalAssociatedText(populationText());
+ TQString txt = KommanderWidget::evalAssociatedText(populationText());
setWidgetText(txt);
}
-void ExecButton::setWidgetText(const QString& a_text)
+void ExecButton::setWidgetText(const TQString& a_text)
{
setText(a_text);
emit widgetTextChanged(a_text);
@@ -112,15 +112,15 @@ void ExecButton::setWidgetText(const QString& a_text)
void ExecButton::startProcess()
{
- QString at = evalAssociatedText().stripWhiteSpace();
+ TQString at = evalAssociatedText().stripWhiteSpace();
bool enabledStatus = isEnabled();
if (m_blockGUI != None)
setEnabled(false);
if (m_blockGUI == GUI)
- KApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ KApplication::setOverrideCursor(TQCursor(Qt::WaitCursor));
MyProcess* process = new MyProcess(this);
process->setBlocking(m_blockGUI == GUI);
- connect(process, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*)));
+ connect(process, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*)));
m_output = process->run(at);
if (m_blockGUI == GUI)
{
@@ -165,16 +165,16 @@ void ExecButton::processExited(MyProcess* p)
}
}
-void ExecButton::showEvent(QShowEvent* e)
+void ExecButton::showEvent(TQShowEvent* e)
{
KPushButton::showEvent(e);
emit widgetOpened();
}
-void ExecButton::contextMenuEvent( QContextMenuEvent * e )
+void ExecButton::contextMenuEvent( TQContextMenuEvent * e )
{
e->accept();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
emit contextMenuRequested(p.x(), p.y());
}
@@ -183,7 +183,7 @@ bool ExecButton::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
-QString ExecButton::handleDCOP(int function, const QStringList& args)
+TQString ExecButton::handleDCOP(int function, const TQStringList& args)
{
switch (function) {
case DCOP::text:
@@ -195,21 +195,21 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
startProcess();
break;
case EB_isOn:
- return QString::number(this->isOn() );
+ return TQString::number(this->isOn() );
break;
case EB_setButtonText:
ExecButton::setText(args[0]);
break;
case EB_setPopup:
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list );
- QWidget * w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it( *list );
+ TQWidget * w;
while ( (w=it.current()) != 0 ) { // for each widget...
++it;
if (w->name() == args[0] && w->className() == "PopupMenu")
{
- QPopupMenu *popup = dynamic_cast<QPopupMenu*>(w->child("unnamed", "KPopupMenu"));
+ TQPopupMenu *popup = dynamic_cast<TQPopupMenu*>(w->child("unnamed", "KPopupMenu"));
this->setPopup(popup);
}
}
@@ -217,7 +217,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
}
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;
}
@@ -226,7 +226,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(color);
break;
@@ -234,7 +234,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return QString();
+ return TQString();
}