summaryrefslogtreecommitdiffstats
path: root/kdelirc/irkick
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kdelirc/irkick
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdelirc/irkick')
-rw-r--r--kdelirc/irkick/irkick.cpp106
-rw-r--r--kdelirc/irkick/irkick.h30
-rw-r--r--kdelirc/irkick/kdedmodule_stub.h6
-rw-r--r--kdelirc/irkick/klircclient.cpp54
-rw-r--r--kdelirc/irkick/klircclient.h26
5 files changed, 111 insertions, 111 deletions
diff --git a/kdelirc/irkick/irkick.cpp b/kdelirc/irkick/irkick.cpp
index 31ec93c..fdcfa3a 100644
--- a/kdelirc/irkick/irkick.cpp
+++ b/kdelirc/irkick/irkick.cpp
@@ -7,12 +7,12 @@
// This program is free software.
-#include <qwidget.h>
-#include <qdialog.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qevent.h>
+#include <tqwidget.h>
+#include <tqdialog.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqevent.h>
#include <kdeversion.h>
#include <kapplication.h>
@@ -42,12 +42,12 @@
#include "profileserver.h"
#include "irkick.h"
-void IRKTrayIcon::mousePressEvent(QMouseEvent *e)
+void IRKTrayIcon::mousePressEvent(TQMouseEvent *e)
{
- KSystemTray::mousePressEvent(new QMouseEvent(QEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == LeftButton ? RightButton : e->button(), e->state()));
+ KSystemTray::mousePressEvent(new TQMouseEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == LeftButton ? RightButton : e->button(), e->state()));
}
-IRKick::IRKick(const QCString &obj) : QObject(), DCOPObject(obj), npApp(QString::null)
+IRKick::IRKick(const TQCString &obj) : TQObject(), DCOPObject(obj), npApp(TQString::null)
{
kapp->dcopClient()->setDefaultObject(obj);
theClient = new KLircClient();
@@ -55,28 +55,28 @@ IRKick::IRKick(const QCString &obj) : QObject(), DCOPObject(obj), npApp(QString:
theTrayIcon = new IRKTrayIcon();
if(theClient->isConnected())
{ theTrayIcon->setPixmap(SmallIcon("irkick"));
- QToolTip::add(theTrayIcon, i18n("KDE Lirc Server: Ready."));
+ TQToolTip::add(theTrayIcon, i18n("KDE Lirc Server: Ready."));
}
else
{ theTrayIcon->setPixmap(SmallIcon("irkickoff"));
- QToolTip::add(theTrayIcon, i18n("KDE Lirc Server: No infra-red remote controls found."));
- QTimer::singleShot(10000, this, SLOT(checkLirc()));
+ TQToolTip::add(theTrayIcon, i18n("KDE Lirc Server: No infra-red remote controls found."));
+ TQTimer::singleShot(10000, this, TQT_SLOT(checkLirc()));
}
- theFlashOff = new QTimer(theTrayIcon);
- connect(theFlashOff, SIGNAL(timeout()), SLOT(flashOff()));
+ theFlashOff = new TQTimer(theTrayIcon);
+ connect(theFlashOff, TQT_SIGNAL(timeout()), TQT_SLOT(flashOff()));
theResetCount = 0;
slotReloadConfiguration();
- connect(theClient, SIGNAL(connectionClosed()), this, SLOT(slotClosed()));
- connect(theClient, SIGNAL(remotesRead()), this, SLOT(resetModes()));
- connect(theClient, SIGNAL(commandReceived(const QString &, const QString &, int)), this, SLOT(gotMessage(const QString &, const QString &, int)));
+ connect(theClient, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(slotClosed()));
+ connect(theClient, TQT_SIGNAL(remotesRead()), this, TQT_SLOT(resetModes()));
+ connect(theClient, TQT_SIGNAL(commandReceived(const TQString &, const TQString &, int)), this, TQT_SLOT(gotMessage(const TQString &, const TQString &, int)));
theTrayIcon->contextMenu()->changeTitle(0, "IRKick");
- theTrayIcon->contextMenu()->insertItem(SmallIcon( "configure" ), i18n("&Configure..."), this, SLOT(slotConfigure()));
+ theTrayIcon->contextMenu()->insertItem(SmallIcon( "configure" ), i18n("&Configure..."), this, TQT_SLOT(slotConfigure()));
theTrayIcon->contextMenu()->insertSeparator();
theTrayIcon->contextMenu()->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), (new KHelpMenu(theTrayIcon, KGlobal::instance()->aboutData()))->menu());
- theTrayIcon->actionCollection()->action("file_quit")->disconnect(SIGNAL(activated()));
- connect(theTrayIcon->actionCollection()->action("file_quit"), SIGNAL(activated()), SLOT(doQuit()));
+ theTrayIcon->actionCollection()->action("file_quit")->disconnect(TQT_SIGNAL(activated()));
+ connect(theTrayIcon->actionCollection()->action("file_quit"), TQT_SIGNAL(activated()), TQT_SLOT(doQuit()));
theTrayIcon->show();
}
@@ -84,7 +84,7 @@ IRKick::IRKick(const QCString &obj) : QObject(), DCOPObject(obj), npApp(QString:
IRKick::~IRKick()
{
delete theTrayIcon;
- for(QMap<QString,IRKTrayIcon *>::iterator i = currentModeIcons.begin(); i != currentModeIcons.end(); ++i)
+ for(TQMap<TQString,IRKTrayIcon *>::iterator i = currentModeIcons.begin(); i != currentModeIcons.end(); ++i)
if(*i) delete *i;
}
@@ -92,7 +92,7 @@ void IRKick::slotClosed()
{
theTrayIcon->setPixmap(SmallIcon("irkickoff"));
KPassivePopup::message("IRKick", i18n("The infrared system has severed its connection. Remote controls are no longer available."), SmallIcon("irkick"), theTrayIcon);
- QTimer::singleShot(1000, this, SLOT(checkLirc()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(checkLirc()));
}
void IRKick::checkLirc()
@@ -103,7 +103,7 @@ void IRKick::checkLirc()
theTrayIcon->setPixmap(SmallIcon("irkick"));
}
else
- QTimer::singleShot(10000, this, SLOT(checkLirc()));
+ TQTimer::singleShot(10000, this, TQT_SLOT(checkLirc()));
}
void IRKick::flashOff()
@@ -130,8 +130,8 @@ void IRKick::resetModes()
if(!theResetCount)
allModes.generateNulls(theClient->remotes());
- QStringList remotes = theClient->remotes();
- for(QStringList::iterator i = remotes.begin(); i != remotes.end(); ++i)
+ TQStringList remotes = theClient->remotes();
+ for(TQStringList::iterator i = remotes.begin(); i != remotes.end(); ++i)
{ currentModes[*i] = allModes.getDefault(*i).name();
if(theResetCount && currentModeIcons[*i]) delete currentModeIcons[*i];
currentModeIcons[*i] = 0;
@@ -157,7 +157,7 @@ void IRKick::slotConfigure()
void IRKick::updateModeIcons()
{
- for(QMap<QString,QString>::iterator i = currentModes.begin(); i != currentModes.end(); ++i)
+ for(TQMap<TQString,TQString>::iterator i = currentModes.begin(); i != currentModes.end(); ++i)
{ Mode mode = allModes.getMode(i.key(), i.data());
if(mode.iconFile().isNull() || mode.iconFile().isEmpty())
{ if(currentModeIcons[i.key()])
@@ -173,12 +173,12 @@ void IRKick::updateModeIcons()
currentModeIcons[i.key()]->actionCollection()->action("file_quit")->setEnabled(false);
}
currentModeIcons[i.key()]->setPixmap(KIconLoader().loadIcon(mode.iconFile(), KIcon::Panel));
- QToolTip::add(currentModeIcons[i.key()], mode.remoteName() + ": <b>" + mode.name() + "</b>");
+ TQToolTip::add(currentModeIcons[i.key()], mode.remoteName() + ": <b>" + mode.name() + "</b>");
}
}
}
-bool IRKick::getPrograms(const IRAction &action, QStringList &programs)
+bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
{
DCOPClient *theDC = KApplication::dcopClient();
programs.clear();
@@ -189,23 +189,23 @@ bool IRKick::getPrograms(const IRAction &action, QStringList &programs)
}
else
{
- QRegExp r = QRegExp("^" + action.program() + "-(\\d+)$");
+ TQRegExp r = TQRegExp("^" + action.program() + "-(\\d+)$");
// find all instances...
QCStringList buf = theDC->registeredApplications();
for(QCStringList::iterator i = buf.begin(); i != buf.end(); ++i)
{
- QString program = QString::fromUtf8(*i);
+ TQString program = TQString::fromUtf8(*i);
if(program.contains(r))
programs += program;
}
if(programs.size() > 1 && action.ifMulti() == IM_DONTSEND)
return false;
else if(programs.size() > 1 && action.ifMulti() == IM_SENDTOTOP)
- { QValueList<WId> s = KWinModule().stackingOrder();
+ { TQValueList<WId> s = KWinModule().stackingOrder();
// go through all the (ordered) window pids
- for(QValueList<WId>::iterator i = s.fromLast(); i != s.end(); i--)
+ for(TQValueList<WId>::iterator i = s.fromLast(); i != s.end(); i--)
{ int p = KWin::info(*i).pid;
- QString id = action.program() + "-" + QString().setNum(p);
+ TQString id = action.program() + "-" + TQString().setNum(p);
if(programs.contains(id))
{ programs.clear();
programs += id;
@@ -215,11 +215,11 @@ bool IRKick::getPrograms(const IRAction &action, QStringList &programs)
while(programs.size() > 1) programs.remove(programs.begin());
}
else if(programs.size() > 1 && action.ifMulti() == IM_SENDTOBOTTOM)
- { QValueList<WId> s = KWinModule().stackingOrder();
+ { TQValueList<WId> s = KWinModule().stackingOrder();
// go through all the (ordered) window pids
- for(QValueList<WId>::iterator i = s.begin(); i != s.end(); ++i)
+ for(TQValueList<WId>::iterator i = s.begin(); i != s.end(); ++i)
{ int p = KWin::info(*i).pid;
- QString id = action.program() + "-" + QString().setNum(p);
+ TQString id = action.program() + "-" + TQString().setNum(p);
if(programs.contains(id))
{ programs.clear();
programs += id;
@@ -235,13 +235,13 @@ bool IRKick::getPrograms(const IRAction &action, QStringList &programs)
void IRKick::executeAction(const IRAction &action)
{
DCOPClient *theDC = KApplication::dcopClient();
- QStringList programs;
+ TQStringList programs;
if(!getPrograms(action, programs)) return;
// if programs.size()==0 here, then the app is definately not running.
if(action.autoStart() && !programs.size())
- { QString sname = ProfileServer::profileServer()->getServiceName(action.program());
+ { TQString sname = ProfileServer::profileServer()->getServiceName(action.program());
if(!sname.isNull())
{
KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon);
@@ -252,20 +252,20 @@ void IRKick::executeAction(const IRAction &action)
if(!getPrograms(action, programs)) return;
- for(QStringList::iterator i = programs.begin(); i != programs.end(); ++i)
- { const QString &program = *i;
+ for(TQStringList::iterator i = programs.begin(); i != programs.end(); ++i)
+ { const TQString &program = *i;
if(theDC->isApplicationRegistered(program.utf8()))
- { QByteArray data; QDataStream arg(data, IO_WriteOnly);
+ { TQByteArray data; TQDataStream arg(data, IO_WriteOnly);
kdDebug() << "Sending data (" << program << ", " << action.object() << ", " << action.method().prototypeNR() << endl;
for(Arguments::const_iterator j = action.arguments().begin(); j != action.arguments().end(); ++j)
{ kdDebug() << "Got argument..." << endl;
switch((*j).type())
- { case QVariant::Int: arg << (*j).toInt(); break;
- case QVariant::CString: arg << (*j).toCString(); break;
- case QVariant::StringList: arg << (*j).toStringList(); break;
- case QVariant::UInt: arg << (*j).toUInt(); break;
- case QVariant::Bool: arg << (*j).toBool(); break;
- case QVariant::Double: arg << (*j).toDouble(); break;
+ { case TQVariant::Int: arg << (*j).toInt(); break;
+ case TQVariant::CString: arg << (*j).toCString(); break;
+ case TQVariant::StringList: arg << (*j).toStringList(); break;
+ case TQVariant::UInt: arg << (*j).toUInt(); break;
+ case TQVariant::Bool: arg << (*j).toBool(); break;
+ case TQVariant::Double: arg << (*j).toDouble(); break;
default: arg << (*j).toString(); break;
}
}
@@ -274,17 +274,17 @@ void IRKick::executeAction(const IRAction &action)
}
}
-void IRKick::gotMessage(const QString &theRemote, const QString &theButton, int theRepeatCounter)
+void IRKick::gotMessage(const TQString &theRemote, const TQString &theButton, int theRepeatCounter)
{
kdDebug() << "Got message: " << theRemote << ": " << theButton << " (" << theRepeatCounter << ")" << endl;
theTrayIcon->setPixmap(SmallIcon("irkickflash"));
theFlashOff->start(200, true);
if(!npApp.isNull())
{
- QString theApp = npApp;
- npApp = QString::null;
+ TQString theApp = npApp;
+ npApp = TQString::null;
// send notifier by DCOP to npApp/npModule/npMethod(theRemote, theButton);
- QByteArray data; QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data; TQDataStream arg(data, IO_WriteOnly);
arg << theRemote << theButton;
KApplication::dcopClient()->send(theApp.utf8(), npModule.utf8(), npMethod.utf8(), data);
}
@@ -321,7 +321,7 @@ void IRKick::gotMessage(const QString &theRemote, const QString &theButton, int
}
}
-void IRKick::stealNextPress(QString app, QString module, QString method)
+void IRKick::stealNextPress(TQString app, TQString module, TQString method)
{
npApp = app;
npModule = module;
@@ -330,7 +330,7 @@ void IRKick::stealNextPress(QString app, QString module, QString method)
void IRKick::dontStealNextPress()
{
- npApp = QString::null;
+ npApp = TQString::null;
}
#include "irkick.moc"
diff --git a/kdelirc/irkick/irkick.h b/kdelirc/irkick/irkick.h
index 875d039..bdcb57e 100644
--- a/kdelirc/irkick/irkick.h
+++ b/kdelirc/irkick/irkick.h
@@ -14,7 +14,7 @@
#ifndef __IRKICK_H
#define __IRKICK_H
-#include <qstring.h>
+#include <tqstring.h>
#include <ksystemtray.h>
#include <kdedmodule.h>
@@ -30,30 +30,30 @@ class QMouseEvent;
class IRKTrayIcon: public KSystemTray
{
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
public:
KPopupMenu* contextMenu() const { return KSystemTray::contextMenu(); }
KActionCollection* actionCollection() { return KSystemTray::actionCollection(); }
- IRKTrayIcon(QWidget *parent = 0, const char *name = 0): KSystemTray(parent, name) {}
+ IRKTrayIcon(TQWidget *parent = 0, const char *name = 0): KSystemTray(parent, name) {}
};
-class IRKick: public QObject, public DCOPObject
+class IRKick: public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
- QString npApp, npModule, npMethod;
- QMap<QString, QString> currentModes;
- QMap<QString, IRKTrayIcon *> currentModeIcons;
+ TQString npApp, npModule, npMethod;
+ TQMap<TQString, TQString> currentModes;
+ TQMap<TQString, IRKTrayIcon *> currentModeIcons;
IRActions allActions;
int theResetCount;
Modes allModes;
IRKTrayIcon *theTrayIcon;
KAboutData *aboutData;
- QTimer *theFlashOff;
+ TQTimer *theFlashOff;
void updateModeIcons();
@@ -82,23 +82,23 @@ k_dcop:
*
* @returns said list.
*/
- virtual const QStringList remotes() { return theClient->remotes(); }
+ virtual const TQStringList remotes() { return theClient->remotes(); }
/**
* Retrieve list of buttons of a praticular remote control.
*
* @returns said list.
*/
- virtual const QStringList buttons(QString theRemote) { return theClient->buttons(theRemote); }
+ virtual const TQStringList buttons(TQString theRemote) { return theClient->buttons(theRemote); }
/**
* Sends next keypress to given application by DCOP.
*
* @param The receiving application.
* @param The receiving application module.
- * @param The method name. Must have two QString parameters.
+ * @param The method name. Must have two TQString parameters.
*/
- virtual void stealNextPress(QString app, QString module, QString method);
+ virtual void stealNextPress(TQString app, TQString module, TQString method);
/**
* Cancels the proceedings of the previous stealNextPress call, if any.
@@ -111,7 +111,7 @@ k_dcop:
virtual void reloadConfiguration() { slotReloadConfiguration(); }
private slots:
- void gotMessage(const QString &theRemote, const QString &theButton, int theRepeatCounter);
+ void gotMessage(const TQString &theRemote, const TQString &theButton, int theRepeatCounter);
void resetModes();
void doQuit();
void flashOff();
@@ -122,10 +122,10 @@ private slots:
void slotClosed();
private:
void executeAction(const IRAction &action);
- bool getPrograms(const IRAction &action, QStringList &populous);
+ bool getPrograms(const IRAction &action, TQStringList &populous);
public:
- IRKick(const QCString &obj);
+ IRKick(const TQCString &obj);
virtual ~IRKick();
};
diff --git a/kdelirc/irkick/kdedmodule_stub.h b/kdelirc/irkick/kdedmodule_stub.h
index 5f248f8..86f4640 100644
--- a/kdelirc/irkick/kdedmodule_stub.h
+++ b/kdelirc/irkick/kdedmodule_stub.h
@@ -14,7 +14,7 @@
#define __KDEDMODULE_STUB__
#include <dcopstub.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
#include <dcopref.h>
#include <ksharedptr.h>
@@ -23,8 +23,8 @@
class KDEDModule_stub : virtual public DCOPStub
{
public:
- KDEDModule_stub( const QCString& app, const QCString& id );
- KDEDModule_stub( DCOPClient* client, const QCString& app, const QCString& id );
+ KDEDModule_stub( const TQCString& app, const TQCString& id );
+ KDEDModule_stub( DCOPClient* client, const TQCString& app, const TQCString& id );
explicit KDEDModule_stub( const DCOPRef& ref );
protected:
KDEDModule_stub() : DCOPStub( never_use ) {};
diff --git a/kdelirc/irkick/klircclient.cpp b/kdelirc/irkick/klircclient.cpp
index 2876079..897d8fc 100644
--- a/kdelirc/irkick/klircclient.cpp
+++ b/kdelirc/irkick/klircclient.cpp
@@ -19,12 +19,12 @@
#include <sys/socket.h>
#include <errno.h>
-#include <qwidget.h>
-#include <qdialog.h>
-#include <qtooltip.h>
-#include <qsocket.h>
-#include <qsocketnotifier.h>
-#include <qfile.h>
+#include <tqwidget.h>
+#include <tqdialog.h>
+#include <tqtooltip.h>
+#include <tqsocket.h>
+#include <tqsocketnotifier.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <ksystemtray.h>
@@ -43,7 +43,7 @@
#include "klircclient.h"
-KLircClient::KLircClient(QWidget *parent, const char *name) : QObject(parent, name), theSocket(0), listIsUpToDate(false)
+KLircClient::KLircClient(TQWidget *parent, const char *name) : TQObject(parent, name), theSocket(0), listIsUpToDate(false)
{
connectToLirc();
}
@@ -68,8 +68,8 @@ bool KLircClient::connectToLirc()
theSocket = new QSocket;
theSocket->setSocket(sock);
- connect(theSocket, SIGNAL(readyRead()), SLOT(slotRead()));
- connect(theSocket, SIGNAL(connectionClosed()), SLOT(slotClosed()));
+ connect(theSocket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotRead()));
+ connect(theSocket, TQT_SIGNAL(connectionClosed()), TQT_SLOT(slotClosed()));
updateRemotes();
return true;
}
@@ -87,16 +87,16 @@ void KLircClient::slotClosed()
emit connectionClosed();
}
-const QStringList KLircClient::remotes() const
+const TQStringList KLircClient::remotes() const
{
- QStringList remotes;
- for(QMap<QString, QStringList>::ConstIterator i = theRemotes.begin(); i != theRemotes.end(); ++i)
+ TQStringList remotes;
+ for(TQMap<TQString, TQStringList>::ConstIterator i = theRemotes.begin(); i != theRemotes.end(); ++i)
remotes.append(i.key());
remotes.sort();
return remotes;
}
-const QStringList KLircClient::buttons(const QString &theRemote) const
+const TQStringList KLircClient::buttons(const TQString &theRemote) const
{
return theRemotes[theRemote];
}
@@ -105,7 +105,7 @@ void KLircClient::slotRead()
{
while (theSocket->bytesAvailable())
{
- QString line = readLine();
+ TQString line = readLine();
if (line == "BEGIN")
{
// BEGIN
@@ -133,7 +133,7 @@ void KLircClient::slotRead()
while (!line.isEmpty() && line != "END");
return;
}
- QStringList remotes;
+ TQStringList remotes;
int count = readLine().toInt();
for (int i = 0; i < count; ++i)
remotes.append(readLine());
@@ -141,7 +141,7 @@ void KLircClient::slotRead()
while (!line.isEmpty() && line != "END");
if (line.isEmpty())
return; // abort on corrupt data
- for (QStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it)
+ for (TQStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it)
sendCommand("LIST " + *it);
return;
}
@@ -154,13 +154,13 @@ void KLircClient::slotRead()
while (!line.isEmpty() && line != "END");
return;
}
- QString remote = line.mid(5);
- QStringList buttons;
+ TQString remote = line.mid(5);
+ TQStringList buttons;
int count = readLine().toInt();
for (int i = 0; i < count; ++i)
{
// <code> <name>
- QString btn = readLine().mid(17);
+ TQString btn = readLine().mid(17);
if(btn.isNull()) break;
if(btn.startsWith("'") && btn.endsWith("'"))
btn = btn.mid(1, btn.length() - 2);
@@ -186,7 +186,7 @@ void KLircClient::slotRead()
pos = line.find(' ');
if (pos < 0) return;
- QString btn = line.left(pos);
+ TQString btn = line.left(pos);
if(btn.startsWith("'") && btn.endsWith("'"))
btn = btn.mid(1, btn.length() - 2);
line.remove(0, pos + 1);
@@ -206,7 +206,7 @@ void KLircClient::updateRemotes()
bool KLircClient::isConnected() const
{
if(!theSocket) return false;
- return theSocket->state() == QSocket::Connected;
+ return theSocket->state() == TQSocket::Connected;
}
bool KLircClient::haveFullList() const
@@ -214,7 +214,7 @@ bool KLircClient::haveFullList() const
return listIsUpToDate;
}
-const QString KLircClient::readLine()
+const TQString KLircClient::readLine()
{
if (!theSocket->canReadLine())
{ bool timeout;
@@ -223,18 +223,18 @@ const QString KLircClient::readLine()
theSocket->waitForMore(500, &timeout);
if (timeout)
{ // something's wrong. there ain't no line comin!
- return QString::null;
+ return TQString::null;
}
}
- QString line = theSocket->readLine();
+ TQString line = theSocket->readLine();
line.truncate(line.length() - 1);
return line;
}
-void KLircClient::sendCommand(const QString &command)
+void KLircClient::sendCommand(const TQString &command)
{
- QString cmd = command + "\n";
- theSocket->writeBlock(QFile::encodeName( cmd ), cmd.length());
+ TQString cmd = command + "\n";
+ theSocket->writeBlock(TQFile::encodeName( cmd ), cmd.length());
}
diff --git a/kdelirc/irkick/klircclient.h b/kdelirc/irkick/klircclient.h
index ea5fa75..30f5fe5 100644
--- a/kdelirc/irkick/klircclient.h
+++ b/kdelirc/irkick/klircclient.h
@@ -13,10 +13,10 @@
#ifndef KLIRCCLIENT_H
#define KLIRCCLIENT_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QSocket;
class QSocketNotifier;
@@ -32,14 +32,14 @@ class KLircClient: public QObject
private:
struct lirc_config *theConfig;
- QSocket *theSocket;
- QSocketNotifier *theNotifier;
- QMap<QString, QStringList> theRemotes;
+ TQSocket *theSocket;
+ TQSocketNotifier *theNotifier;
+ TQMap<TQString, TQStringList> theRemotes;
bool listIsUpToDate;
void updateRemotes();
- void sendCommand(const QString &command);
- const QString readLine();
+ void sendCommand(const TQString &command);
+ const TQString readLine();
private slots:
void slotRead();
@@ -62,7 +62,7 @@ signals:
* The repeat counter starts with 0 and increases
* every time this signal is emitted.
*/
- void commandReceived(const QString &remote, const QString &button, int repeatCounter);
+ void commandReceived(const TQString &remote, const TQString &button, int repeatCounter);
/**
* Emitted when the Lirc connection is closed.
@@ -91,14 +91,14 @@ public:
*
* @returns said list.
*/
- const QStringList remotes() const;
+ const TQStringList remotes() const;
/**
* Retrieve list of buttons of a praticular remote control.
*
* @returns said list.
*/
- const QStringList buttons(const QString &theRemote) const;
+ const TQStringList buttons(const TQString &theRemote) const;
/**
* Connects to lirc.
@@ -107,7 +107,7 @@ public:
*/
bool connectToLirc();
- KLircClient(QWidget *parent = 0, const char *name = 0);
+ KLircClient(TQWidget *parent = 0, const char *name = 0);
~KLircClient();
};