{
QSettings settings(this);
m_layout = new QVBoxLayout(this);
- m_btnLayout = new QHBoxLayout(this);
- m_remoteNameLayout = new QHBoxLayout(this);
+ m_btnLayout = new QHBoxLayout(m_layout);
+ m_remoteNameLayout = new QHBoxLayout(m_layout);
m_advSettingsBtn = new QPushButton(tr("Advanced"), this);
m_selectRemoteBtn = new QPushButton(tr("Select remote"), this);
connect(m_rateDownBtn, SIGNAL(clicked()),
this, SLOT(rateDownClicked()));
- m_layout->addLayout(m_remoteNameLayout);
- m_layout->addLayout(m_btnLayout);
this->setLayout(m_layout);
QString selectedRemote = QSettings(this).value("remoteName", "").toString();
} 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()));