connect(page_next, SIGNAL(clicked()), this, SLOT(slotNextPage()));
connect(page_prev, SIGNAL(clicked()), this, SLOT(slotPreviousPage()));
connect(page_number, SIGNAL(valueChanged(int)), this, SLOT(slotStartSearch(int)));
connect(page_next, SIGNAL(clicked()), this, SLOT(slotNextPage()));
connect(page_prev, SIGNAL(clicked()), this, SLOT(slotPreviousPage()));
connect(page_number, SIGNAL(valueChanged(int)), this, SLOT(slotStartSearch(int)));
}
m_currentPreview = item->data(previewRole).toString();
m_currentUrl = item->data(downloadRole).toString();
}
m_currentPreview = item->data(previewRole).toString();
m_currentUrl = item->data(downloadRole).toString();
button_preview->setEnabled(!m_currentPreview.isEmpty());
sound_box->setEnabled(true);
sound_name->setText(item->text());
button_preview->setEnabled(!m_currentPreview.isEmpty());
sound_box->setEnabled(true);
sound_name->setText(item->text());
+
+void FreeSound::slotForcePlaySound(bool play)
+{
+ if (m_service != FREESOUND) return;
+ m_previewProcess->close();
+ if (m_currentPreview.isEmpty()) return;
+ if (play)
+ m_previewProcess->start("ffplay", QStringList() << m_currentPreview << "-nodisp");
+}
+
void FreeSound::slotPreviewStatusChanged(QProcess::ProcessState state)
{
if (state == QProcess::NotRunning)
void FreeSound::slotPreviewStatusChanged(QProcess::ProcessState state)
{
if (state == QProcess::NotRunning)