summaryrefslogtreecommitdiffstats
path: root/noatun/modules/infrared/lirc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/infrared/lirc.cpp')
-rw-r--r--noatun/modules/infrared/lirc.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/noatun/modules/infrared/lirc.cpp b/noatun/modules/infrared/lirc.cpp
index 857c07e2..657172d5 100644
--- a/noatun/modules/infrared/lirc.cpp
+++ b/noatun/modules/infrared/lirc.cpp
@@ -4,7 +4,7 @@
#include <sys/socket.h>
#include <errno.h>
-#include <qsocket.h>
+#include <tqsocket.h>
#include <kdebug.h>
#include <klocale.h>
@@ -12,8 +12,8 @@
#include "lirc.h"
-Lirc::Lirc(QObject *parent)
- : QObject(parent),
+Lirc::Lirc(TQObject *parent)
+ : TQObject(parent),
m_socket(0)
{
int sock = ::socket(PF_UNIX, SOCK_STREAM, 0);
@@ -34,7 +34,7 @@ Lirc::Lirc(QObject *parent)
m_socket = new QSocket;
m_socket->setSocket(sock);
- connect(m_socket, SIGNAL(readyRead()), SLOT(slotRead()));
+ connect(m_socket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotRead()));
update();
}
@@ -43,9 +43,9 @@ Lirc::~Lirc()
delete m_socket;
}
-const QStringList Lirc::remotes() const
+const TQStringList Lirc::remotes() const
{
- QStringList result;
+ TQStringList result;
for (Remotes::ConstIterator it = m_remotes.begin(); it != m_remotes.end(); ++it)
result.append(it.key());
result.sort();
@@ -56,7 +56,7 @@ void Lirc::slotRead()
{
while (m_socket->bytesAvailable())
{
- QString line = readLine();
+ TQString line = readLine();
if (line == "BEGIN")
{
// BEGIN
@@ -84,7 +84,7 @@ void Lirc::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());
@@ -92,7 +92,7 @@ void Lirc::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;
}
@@ -105,13 +105,13 @@ void Lirc::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();
+ TQString btn = readLine();
buttons.append(btn.mid(17));
}
m_remotes.insert(remote, buttons);
@@ -136,7 +136,7 @@ void Lirc::slotRead()
pos = line.find(' ');
if (pos < 0)
return;
- QString btn = line.left(pos);
+ TQString btn = line.left(pos);
line.remove(0, pos + 1);
emit commandReceived(line, btn, repeat);
@@ -150,22 +150,22 @@ void Lirc::update()
sendCommand("LIST");
}
-const QString Lirc::readLine()
+const TQString Lirc::readLine()
{
if (!m_socket->bytesAvailable())
- return QString::null;
+ return TQString::null;
- QString line = m_socket->readLine();
+ TQString line = m_socket->readLine();
if (line.isEmpty())
- return QString::null;
+ return TQString::null;
line.remove(line.length() - 1, 1);
return line;
}
-void Lirc::sendCommand(const QString &command)
+void Lirc::sendCommand(const TQString &command)
{
- QString cmd = command + "\n";
+ TQString cmd = command + "\n";
m_socket->writeBlock(cmd.latin1(), cmd.length());
}