summaryrefslogtreecommitdiffstats
path: root/noatun/modules/infrared/irprefs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/infrared/irprefs.cpp')
-rw-r--r--noatun/modules/infrared/irprefs.cpp44
1 files changed, 22 insertions, 22 deletions
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;
}