summaryrefslogtreecommitdiffstats
path: root/noatun/modules/infrared/lirc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/infrared/lirc.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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());
}