#!/bin/sh
echo 'include "/home/user/.config/irwi/lirc.conf"' >> /etc/lircd.conf
+sed -i '/^include/!d' /etc/lircd.conf
#!/bin/sh
-sed -i '/irwi/D' /etc/lircd.conf
+sed -i '/irwi/d' /etc/lircd.conf
IrCtrl::IrCtrl(QObject *parent)
: QObject(parent)
{
+ QSettings settings;
+ m_killLircTimer.setInterval(
+ settings.value("idleTimeout", "300").toInt() * 100);
+ m_killLircTimer.setSingleShot(true);
+ connect(&m_killLircTimer, SIGNAL(timeout()),
+ this, SLOT(stopLirc()));
+ startLirc();
+ m_killLircTimer.start();
}
IrCtrl::~IrCtrl()
public slots:
void sendCmd(const QString &cmd);
+ void stopLirc();
private:
void startLirc();
- void stopLirc();
private:
QTimer m_killLircTimer;
if (reply->error() == QNetworkReply::NoError) {
m_rating = QString(reply->readLine(20)).toInt();
m_voteCount = QString(reply->readLine(20)).toInt();
+ m_mfg = QString(reply->readLine(20));
}
reply->close();
reply->deleteLater();
this, SLOT(downloadRemote()));
this->setLayout(layout);
+ setBusy(true);
connect(&remoteDBMgr, SIGNAL(dbReady(RemoteDB*)),
this, SLOT(setDB(RemoteDB*)));
remoteDBMgr.getDBAsync();
- setBusy(true);
}
} else {
setRemote(selectedRemote);
m_remote.updateInfo();
+ setBusy();
}
}
delete m_layout;
}
+void SettingsDlg::setBusy(bool busy)
+{
+ setAttribute(Qt::WA_Maemo5ShowProgressIndicator, busy);
+ setEnabled(!busy);
+}
+
void SettingsDlg::showAdvSettingsDlg()
{
AdvSettingsDlg dlg(this);
void SettingsDlg::setRemote(const QString &name)
{
+ setBusy();
m_remote = Remote(name);
processRemoteChange();
m_remote.updateInfo(); // request update from server
void SettingsDlg::updateRemoteInfo()
{
+ setBusy(false);
m_remoteNameLabel->setText(m_remote.mfg() + " " + m_remote.name());
m_ratingLabel->setText(tr("Rating") + ": "
+ QString::number(m_remote.rating()));
void enableRateBtns(bool enable = true);
void processRemoteChange();
void processRatingSent();
+ void setBusy(bool busy = true);
private:
Remote m_remote;