summaryrefslogtreecommitdiffstats
path: root/noatun/modules/infrared
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/infrared')
-rw-r--r--noatun/modules/infrared/infrared.cpp4
-rw-r--r--noatun/modules/infrared/infrared.h1
-rw-r--r--noatun/modules/infrared/infrared.plugin2
-rw-r--r--noatun/modules/infrared/irprefs.cpp44
-rw-r--r--noatun/modules/infrared/irprefs.h3
-rw-r--r--noatun/modules/infrared/lirc.cpp12
-rw-r--r--noatun/modules/infrared/lirc.h5
7 files changed, 37 insertions, 34 deletions
diff --git a/noatun/modules/infrared/infrared.cpp b/noatun/modules/infrared/infrared.cpp
index c9b31230..1bfe0aae 100644
--- a/noatun/modules/infrared/infrared.cpp
+++ b/noatun/modules/infrared/infrared.cpp
@@ -93,11 +93,11 @@ void InfraRed::slotCommand(const TQString &remote, const TQString &button, int r
break;
case IRPrefs::SeekBackward: // - 3 seconds
- napp->player()->skipTo( QMAX(0, napp->player()->getTime() - 3000) );
+ napp->player()->skipTo( TQMAX(0, napp->player()->getTime() - 3000) );
break;
case IRPrefs::SeekForward: // + 3 seconds
- napp->player()->skipTo( QMIN(napp->player()->getLength(),
+ napp->player()->skipTo( TQMIN(napp->player()->getLength(),
napp->player()->getTime() + 3000) );
break;
case IRPrefs::ShowPlaylist:
diff --git a/noatun/modules/infrared/infrared.h b/noatun/modules/infrared/infrared.h
index 870efbd5..cb58ff82 100644
--- a/noatun/modules/infrared/infrared.h
+++ b/noatun/modules/infrared/infrared.h
@@ -11,6 +11,7 @@ class Lirc;
class InfraRed : public TQObject, public Plugin
{
Q_OBJECT
+ TQ_OBJECT
NOATUNPLUGIND
public:
InfraRed();
diff --git a/noatun/modules/infrared/infrared.plugin b/noatun/modules/infrared/infrared.plugin
index dab20149..4074e6b0 100644
--- a/noatun/modules/infrared/infrared.plugin
+++ b/noatun/modules/infrared/infrared.plugin
@@ -101,7 +101,7 @@ Comment[nds]=Noatun mit Dien Infraroot-Feernbedenen stüern
Comment[ne]=तपाईँको IR टाढाकोसँग नियन्त्रण नोवटुन
Comment[nl]=Bedien Noatun met uw infrarood afstandbediening
Comment[nn]=Styr Noatun med ein infraraud fjernkontroll
-Comment[pl]=Sterowanie Noatun za pomocą pilota podczerwieni
+Comment[pl]=Sterowanie Noatun za potqmocą pilota podczerwieni
Comment[pt]=Controle o Noatun com um comando à distância
Comment[pt_BR]=Controlar o Noatun com seu controle-remoto infravermelho
Comment[ro]=Controlează Noatun cu telecomanda în infraroşu
diff --git a/noatun/modules/infrared/irprefs.cpp b/noatun/modules/infrared/irprefs.cpp
index 548fd27d..52cae0ea 100644
--- a/noatun/modules/infrared/irprefs.cpp
+++ b/noatun/modules/infrared/irprefs.cpp
@@ -14,13 +14,13 @@
#include "irprefs.h"
#include "lirc.h"
-class CommandItem : public QListViewItem
+class CommandItem : public TQListViewItem
{
public:
CommandItem(TQListViewItem *remote, const TQString &name,
IRPrefs::Action action, int interval)
: TQListViewItem(remote, name, IRPrefs::actionName(action),
- interval ? TQString().setNum(interval) : TQString::null),
+ interval ? TQString().setNum(interval) : TQString()),
m_name(remote->text(0) + "::" + name),
m_action(action),
m_interval(interval)
@@ -37,7 +37,7 @@ public:
}
void setInterval(int interval)
{
- setText(2, interval ? TQString().setNum(interval) : TQString::null);
+ setText(2, interval ? TQString().setNum(interval) : TQString());
m_interval = interval;
}
@@ -51,38 +51,38 @@ Lirc *IRPrefs::s_lirc = 0;
bool IRPrefs::s_configRead = false;
TQMap<TQString, IRPrefs::Command> IRPrefs::s_commands;
-IRPrefs::IRPrefs(TQObject *parent)
- : CModule(i18n("Infrared Control"), i18n("Configure Infrared Commands"), "remote", parent)
+IRPrefs::IRPrefs(TQObject *tqparent)
+ : CModule(i18n("Infrared Control"), i18n("Configure Infrared Commands"), "remote", tqparent)
{
- TQGridLayout *layout = new TQGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint());
- layout->setColStretch(1, 1);
+ TQGridLayout *tqlayout = new TQGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint());
+ tqlayout->setColStretch(1, 1);
TQLabel *label = new TQLabel(i18n("Remote control &commands:"), this);
- layout->addMultiCellWidget(label, 0, 0, 0, 4);
+ tqlayout->addMultiCellWidget(label, 0, 0, 0, 4);
label->setBuddy(m_commands = new KListView(this));
- layout->addMultiCellWidget(m_commands, 1, 1, 0, 4);
+ tqlayout->addMultiCellWidget(m_commands, 1, 1, 0, 4);
label = new TQLabel(i18n("&Action:"), this);
- layout->addWidget(label, 2, 0);
+ tqlayout->addWidget(label, 2, 0);
label->setBuddy(m_action = new KComboBox(this));
m_action->setEnabled(false);
- layout->addWidget(m_action, 2, 1);
+ tqlayout->addWidget(m_action, 2, 1);
m_repeat = new TQCheckBox(i18n("&Repeat"), this);
m_repeat->setEnabled(false);
- layout->addWidget(m_repeat, 2, 2);
+ tqlayout->addWidget(m_repeat, 2, 2);
label = new TQLabel(i18n("&Interval:"), this);
- layout->addWidget(label, 2, 3);
+ tqlayout->addWidget(label, 2, 3);
label->setBuddy(m_interval = new KIntSpinBox(this));
m_interval->setMinValue(1);
m_interval->setMaxValue(0xff);
m_interval->setValue(10);
m_interval->setEnabled(false);
- layout->addWidget(m_interval, 2, 4);
+ tqlayout->addWidget(m_interval, 2, 4);
connect(s_lirc, TQT_SIGNAL(remotesRead()), TQT_SLOT(reopen()));
connect(m_commands,
@@ -109,9 +109,9 @@ void IRPrefs::save()
int i = 1;
for (TQMap<TQString, Command>::ConstIterator it = s_commands.begin(); it != s_commands.end(); ++it)
{
- c->writePathEntry(TQString("Command_%1").arg(i), it.key());
- c->writeEntry(TQString("Action_%1").arg(i), (int)((*it).action));
- c->writeEntry(TQString("Interval_%1").arg(i), (*it).interval);
+ c->writePathEntry(TQString("Command_%1").tqarg(i), it.key());
+ c->writeEntry(TQString("Action_%1").tqarg(i), (int)((*it).action));
+ c->writeEntry(TQString("Interval_%1").tqarg(i), (*it).interval);
++i;
}
}
@@ -152,7 +152,7 @@ void IRPrefs::reopen()
for (TQStringList::ConstIterator btn = buttons.begin(); btn != buttons.end(); ++btn)
{
TQString key = *it + "::" + *btn;
- if (s_commands.contains(key))
+ if (s_commands.tqcontains(key))
new CommandItem(remote, *btn, s_commands[key].action, s_commands[key].interval);
else
new CommandItem(remote, *btn, None, 0);
@@ -275,7 +275,7 @@ const TQString IRPrefs::actionName(Action action)
case PreviousSection:
return i18n("Previous Section");
}
- return TQString::null;
+ return TQString();
}
void IRPrefs::readConfig()
@@ -288,9 +288,9 @@ void IRPrefs::readConfig()
for (int i = 1; i <= count; ++i)
{
Command cmd;
- cmd.action = (Action)(c->readNumEntry(TQString("Action_%1").arg(i)));
- cmd.interval = c->readNumEntry(TQString("Interval_%1").arg(i));
- s_commands.insert(c->readPathEntry(TQString("Command_%1").arg(i)), cmd);
+ cmd.action = (Action)(c->readNumEntry(TQString("Action_%1").tqarg(i)));
+ cmd.interval = c->readNumEntry(TQString("Interval_%1").tqarg(i));
+ s_commands.insert(c->readPathEntry(TQString("Command_%1").tqarg(i)), cmd);
}
s_configRead = true;
}
diff --git a/noatun/modules/infrared/irprefs.h b/noatun/modules/infrared/irprefs.h
index 925acaa0..69d7f41f 100644
--- a/noatun/modules/infrared/irprefs.h
+++ b/noatun/modules/infrared/irprefs.h
@@ -15,6 +15,7 @@ class Lirc;
class IRPrefs : public CModule
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Action
{
@@ -24,7 +25,7 @@ public:
NextSection, PreviousSection
};
- IRPrefs(TQObject *parent);
+ IRPrefs(TQObject *tqparent);
virtual void save();
diff --git a/noatun/modules/infrared/lirc.cpp b/noatun/modules/infrared/lirc.cpp
index 363849c1..731bb5c1 100644
--- a/noatun/modules/infrared/lirc.cpp
+++ b/noatun/modules/infrared/lirc.cpp
@@ -12,8 +12,8 @@
#include "lirc.h"
-Lirc::Lirc(TQObject *parent)
- : TQObject(parent),
+Lirc::Lirc(TQObject *tqparent)
+ : TQObject(tqparent),
m_socket(0)
{
int sock = ::socket(PF_UNIX, SOCK_STREAM, 0);
@@ -124,7 +124,7 @@ void Lirc::slotRead()
{
// <code> <repeat> <button name> <remote control name>
line.remove(0, 17); // strip code
- int pos = line.find(' ');
+ int pos = line.tqfind(' ');
if (pos < 0)
return;
bool ok;
@@ -133,7 +133,7 @@ void Lirc::slotRead()
return;
line.remove(0, pos + 1);
- pos = line.find(' ');
+ pos = line.tqfind(' ');
if (pos < 0)
return;
TQString btn = line.left(pos);
@@ -153,11 +153,11 @@ void Lirc::update()
const TQString Lirc::readLine()
{
if (!m_socket->bytesAvailable())
- return TQString::null;
+ return TQString();
TQString line = m_socket->readLine();
if (line.isEmpty())
- return TQString::null;
+ return TQString();
line.remove(line.length() - 1, 1);
return line;
diff --git a/noatun/modules/infrared/lirc.h b/noatun/modules/infrared/lirc.h
index 8519bb8a..5f30d751 100644
--- a/noatun/modules/infrared/lirc.h
+++ b/noatun/modules/infrared/lirc.h
@@ -10,14 +10,15 @@ class TQSocket;
typedef TQMap<TQString, TQStringList> Remotes;
-class Lirc : public QObject
+class Lirc : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- Lirc(TQObject *parent);
+ Lirc(TQObject *tqparent);
/**
* Destructor
*/