+void KdenliveSettingsDialog::slotEnableTranscodeUpdate()
+{
+ if (!m_configTranscode.profile_box->isEnabled()) return;
+ bool allow = true;
+ if (m_configTranscode.profile_name->text().isEmpty() || m_configTranscode.profile_extension->text().isEmpty()) allow = false;
+ m_configTranscode.button_update->setEnabled(allow);
+}
+
+void KdenliveSettingsDialog::slotSetTranscodeProfile()
+{
+ m_configTranscode.profile_box->setEnabled(false);
+ m_configTranscode.button_update->setEnabled(false);
+ m_configTranscode.profile_name->clear();
+ m_configTranscode.profile_description->clear();
+ m_configTranscode.profile_extension->clear();
+ m_configTranscode.profile_parameters->clear();
+ m_configTranscode.profile_audioonly->setChecked(false);
+ QListWidgetItem *item = m_configTranscode.profiles_list->currentItem();
+ if (!item) {
+ return;
+ }
+ m_configTranscode.profile_name->setText(item->text());
+ QString data = item->data(Qt::UserRole).toString();
+ if (data.contains(';')) {
+ m_configTranscode.profile_description->setText(data.section(';', 1, 1));
+ if (data.section(';', 2, 2) == "audio") m_configTranscode.profile_audioonly->setChecked(true);
+ data = data.section(';', 0, 0).simplified();
+ }
+ m_configTranscode.profile_extension->setText(data.section('.', -1));
+ m_configTranscode.profile_parameters->setPlainText(data.section(' ', 0, -2));
+ m_configTranscode.profile_box->setEnabled(true);
+}
+