1 /***************************************************************************
2 * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #include "kdenlivesettingsdialog.h"
21 #include "profilesdialog.h"
22 #if !defined(Q_OS_FREEBSD)
23 #include "v4l/v4lcapture.h"
25 #include "blackmagic/devices.h"
26 #include "encodingprofilesdialog.h"
27 #include "kdenlivesettings.h"
29 #include <KStandardDirs>
31 #include <kopenwithdialog.h>
32 #include <KConfigDialogManager>
34 #include <KIO/NetAccess>
35 #include <kdeversion.h>
39 #include <QTreeWidgetItem>
47 #include "jogaction.h"
48 #include "jogshuttleconfig.h"
49 #include <linux/input.h>
50 #endif /* NO_JOGSHUTTLE */
53 KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& mappable_actions, QWidget * parent) :
54 KConfigDialog(parent, "settings", KdenliveSettings::self()),
56 m_shuttleModified(false),
57 m_mappable_actions(mappable_actions)
59 KdenliveSettings::setV4l_format(0);
60 QWidget *p1 = new QWidget;
61 m_configMisc.setupUi(p1);
62 m_page1 = addPage(p1, i18n("Misc"), "configure");
64 // Hide multi tab option until Kdenlive really supports it
65 m_configMisc.kcfg_activatetabs->setVisible(false);
67 QWidget *p8 = new QWidget;
68 m_configProject.setupUi(p8);
69 m_page8 = addPage(p8, i18n("Project Defaults"), "document-new");
70 connect(m_configProject.kcfg_generateproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyminsize, SLOT(setEnabled(bool)));
71 m_configProject.kcfg_proxyminsize->setEnabled(KdenliveSettings::generateproxy());
72 connect(m_configProject.kcfg_generateimageproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyimageminsize, SLOT(setEnabled(bool)));
73 m_configProject.kcfg_proxyimageminsize->setEnabled(KdenliveSettings::generateimageproxy());
75 QWidget *p3 = new QWidget;
76 m_configTimeline.setupUi(p3);
77 m_page3 = addPage(p3, i18n("Timeline"), "video-display");
79 QWidget *p2 = new QWidget;
80 m_configEnv.setupUi(p2);
81 m_configEnv.mltpathurl->setMode(KFile::Directory);
82 m_configEnv.mltpathurl->lineEdit()->setObjectName("kcfg_mltpath");
83 m_configEnv.rendererpathurl->lineEdit()->setObjectName("kcfg_rendererpath");
84 m_configEnv.kcfg_mltthreads->setMaximum(QThread::idealThreadCount());
85 m_configEnv.tmppathurl->setMode(KFile::Directory);
86 m_configEnv.tmppathurl->lineEdit()->setObjectName("kcfg_currenttmpfolder");
87 m_configEnv.projecturl->setMode(KFile::Directory);
88 m_configEnv.projecturl->lineEdit()->setObjectName("kcfg_defaultprojectfolder");
89 m_configEnv.capturefolderurl->setMode(KFile::Directory);
90 m_configEnv.capturefolderurl->lineEdit()->setObjectName("kcfg_capturefolder");
91 m_configEnv.capturefolderurl->setEnabled(!KdenliveSettings::capturetoprojectfolder());
92 connect(m_configEnv.kcfg_capturetoprojectfolder, SIGNAL(clicked()), this, SLOT(slotEnableCaptureFolder()));
93 m_page2 = addPage(p2, i18n("Environment"), "application-x-executable-script");
95 QWidget *p4 = new QWidget;
96 m_configCapture.setupUi(p4);
98 #if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
100 // Video 4 Linux device detection
101 for (int i = 0; i < 10; i++) {
102 QString path = "/dev/video" + QString::number(i);
103 if (QFile::exists(path)) {
104 QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path.toUtf8().constData());
105 if (!deviceInfo.isEmpty()) {
106 m_configCapture.kcfg_detectedv4ldevices->addItem(deviceInfo.at(0), path);
107 m_configCapture.kcfg_detectedv4ldevices->setItemData(m_configCapture.kcfg_detectedv4ldevices->count() - 1, deviceInfo.at(1), Qt::UserRole + 1);
111 connect(m_configCapture.kcfg_detectedv4ldevices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lDevice()));
112 connect(m_configCapture.kcfg_v4l_format, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lCaptureProfile()));
113 connect(m_configCapture.kcfg_v4l_captureaudio, SIGNAL(toggled(bool)), m_configCapture.kcfg_v4l_alsadevice, SLOT(setEnabled(bool)));
115 slotUpdatev4lDevice();
118 m_page4 = addPage(p4, i18n("Capture"), "media-record");
119 m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
121 m_configCapture.tabWidget->setEnabled(false);
122 m_configCapture.kcfg_defaultcapture->setEnabled(false);
123 m_configCapture.label->setText(i18n("Capture is not yet available on OS X."));
126 QWidget *p5 = new QWidget;
127 m_configShuttle.setupUi(p5);
129 m_configShuttle.kcfg_enableshuttle->hide();
130 m_configShuttle.kcfg_enableshuttle->setDisabled(true);
132 connect(m_configShuttle.kcfg_enableshuttle, SIGNAL(stateChanged(int)), this, SLOT(slotCheckShuttle(int)));
133 connect(m_configShuttle.shuttledevicelist, SIGNAL(activated(int)), this, SLOT(slotUpdateShuttleDevice(int)));
134 slotCheckShuttle(KdenliveSettings::enableshuttle());
135 m_configShuttle.shuttledisabled->hide();
137 // Store the button pointers into an array for easier handling them in the other functions.
138 m_shuttle_buttons.push_back(m_configShuttle.shuttle1);
139 m_shuttle_buttons.push_back(m_configShuttle.shuttle2);
140 m_shuttle_buttons.push_back(m_configShuttle.shuttle3);
141 m_shuttle_buttons.push_back(m_configShuttle.shuttle4);
142 m_shuttle_buttons.push_back(m_configShuttle.shuttle5);
144 // populate the buttons with the current configuration. The items are sorted
145 // according to the user-selected language, so they do not appear in random order.
146 QList<QString> action_names = mappable_actions.keys();
149 // Here we need to compute the action_id -> index-in-action_names. We iterate over the
150 // action_names, as the sorting may depend on the user-language.
151 QStringList actions_map = JogShuttleConfig::actionMap(KdenliveSettings::shuttlebuttons());
152 QMap<QString, int> action_pos;
153 foreach (const QString& action_id, actions_map) {
154 // This loop find out at what index is the string that would map to the action_id.
155 for (int i = 0; i < action_names.size(); i++) {
156 if (mappable_actions[action_names[i]] == action_id) {
157 action_pos[action_id] = i;
164 foreach (KComboBox* button, m_shuttle_buttons) {
165 button->addItems(action_names);
166 connect(button, SIGNAL(activated(int)), this, SLOT(slotShuttleModified()));
168 if (i < actions_map.size())
169 button->setCurrentIndex(action_pos[actions_map[i]]);
171 #endif /* NO_JOGSHUTTLE */
172 m_page5 = addPage(p5, i18n("JogShuttle"), "input-mouse");
174 QWidget *p6 = new QWidget;
175 m_configSdl.setupUi(p6);
177 #if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL)
178 m_configSdl.kcfg_openglmonitors->setHidden(true);
181 m_page6 = addPage(p6, i18n("Playback"), "media-playback-start");
183 QWidget *p7 = new QWidget;
184 m_configTranscode.setupUi(p7);
185 m_page7 = addPage(p7, i18n("Transcode"), "edit-copy");
186 connect(m_configTranscode.button_add, SIGNAL(clicked()), this, SLOT(slotAddTranscode()));
187 connect(m_configTranscode.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteTranscode()));
188 connect(m_configTranscode.profiles_list, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDialogModified()));
190 connect(m_configCapture.kcfg_rmd_capture_audio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
192 m_configCapture.audio_group->setVisible(KdenliveSettings::rmd_capture_audio());
194 connect(m_configEnv.kp_image, SIGNAL(clicked()), this, SLOT(slotEditImageApplication()));
195 connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
196 connect(m_configEnv.kp_player, SIGNAL(clicked()), this, SLOT(slotEditVideoApplication()));
198 loadEncodingProfiles();
203 connect(m_configSdl.kcfg_audio_driver, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCheckAlsaDriver()));
205 connect(m_configProject.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
206 connect(m_configCapture.kcfg_rmd_capture_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateRmdRegionStatus()));
208 slotUpdateRmdRegionStatus();
209 loadTranscodeProfiles();
212 //HACK: check dvgrab version, because only dvgrab >= 3.3 supports
213 // --timestamp option without bug
215 if (KdenliveSettings::dvgrab_path().isEmpty() || !QFile::exists(KdenliveSettings::dvgrab_path())) {
216 QString dvgrabpath = KStandardDirs::findExe("dvgrab");
217 KdenliveSettings::setDvgrab_path(dvgrabpath);
221 m_configCapture.decklink_showprofileinfo->setIcon(KIcon("help-about"));
222 m_configCapture.decklink_manageprofile->setIcon(KIcon("configure"));
223 m_configCapture.decklink_parameters->setVisible(false);
224 m_configCapture.decklink_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
225 m_configCapture.decklink_parameters->setPlainText(KdenliveSettings::decklink_parameters());
226 connect(m_configCapture.decklink_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
227 connect(m_configCapture.kcfg_decklink_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDecklinkProfile()));
228 connect(m_configCapture.decklink_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.decklink_parameters, SLOT(setVisible(bool)));
231 m_configCapture.v4l_showprofileinfo->setIcon(KIcon("help-about"));
232 m_configCapture.v4l_manageprofile->setIcon(KIcon("configure"));
233 m_configCapture.v4l_parameters->setVisible(false);
234 m_configCapture.v4l_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
235 m_configCapture.v4l_parameters->setPlainText(KdenliveSettings::v4l_parameters());
236 connect(m_configCapture.v4l_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
237 connect(m_configCapture.kcfg_v4l_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateV4lProfile()));
238 connect(m_configCapture.v4l_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.v4l_parameters, SLOT(setVisible(bool)));
240 // proxy profile stuff
241 m_configProject.proxy_showprofileinfo->setIcon(KIcon("help-about"));
242 m_configProject.proxy_manageprofile->setIcon(KIcon("configure"));
243 m_configProject.proxyparams->setVisible(false);
244 m_configProject.proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
245 m_configProject.proxyparams->setPlainText(KdenliveSettings::proxyparams());
246 connect(m_configProject.proxy_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
247 connect(m_configProject.proxy_showprofileinfo, SIGNAL(clicked(bool)), m_configProject.proxyparams, SLOT(setVisible(bool)));
248 connect(m_configProject.kcfg_proxy_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateProxyProfile()));
251 slotUpdateProxyProfile(-1);
252 slotUpdateV4lProfile(-1);
253 slotUpdateDecklinkProfile(-1);
255 BMInterface::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
256 if (m_configCapture.kcfg_decklink_capturedevice->count() > 0) {
257 QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
258 m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
260 connect(m_configCapture.kcfg_decklink_capturedevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHDMIModes()));
262 if (BMInterface::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device)) {
263 // Found blackmagic card
264 } else m_configSdl.kcfg_external_display->setEnabled(false);
266 double dvgrabVersion = 0;
267 if (!KdenliveSettings::dvgrab_path().isEmpty()) {
268 QProcess *versionCheck = new QProcess;
269 versionCheck->setProcessChannelMode(QProcess::MergedChannels);
270 versionCheck->start("dvgrab", QStringList() << "--version");
271 if (versionCheck->waitForFinished()) {
272 QString version = QString(versionCheck->readAll()).simplified();
273 if (version.contains(' ')) version = version.section(' ', -1);
274 dvgrabVersion = version.toDouble();
276 kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
279 if (dvgrabVersion < 3.3) {
280 KdenliveSettings::setFirewiretimestamp(false);
281 m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
283 m_configCapture.dvgrab_info->setText(i18n("dvgrab version %1 at %2", dvgrabVersion, KdenliveSettings::dvgrab_path()));
284 } else m_configCapture.dvgrab_info->setText(i18n("<strong><em>dvgrab</em> utility not found, please install it for firewire capture</strong>"));
286 if (KdenliveSettings::rmd_path().isEmpty() || !QFile::exists(KdenliveSettings::rmd_path())) {
287 QString rmdpath = KStandardDirs::findExe("recordmydesktop");
288 KdenliveSettings::setRmd_path(rmdpath);
290 if (KdenliveSettings::rmd_path().isEmpty())
291 m_configCapture.rmd_info->setText(i18n("<strong><em>Recordmydesktop</em> utility not found, please install it for screen grabs</strong>"));
293 m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", KdenliveSettings::rmd_path()));
296 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
298 void KdenliveSettingsDialog::slotUpdateHDMIModes()
300 QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
301 m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
304 void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
306 m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
309 void KdenliveSettingsDialog::slotEnableCaptureFolder()
311 m_configEnv.capturefolderurl->setEnabled(!m_configEnv.kcfg_capturetoprojectfolder->isChecked());
314 void KdenliveSettingsDialog::checkProfile()
316 m_configProject.kcfg_profiles_list->clear();
317 QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
318 QMapIterator<QString, QString> i(profilesInfo);
319 while (i.hasNext()) {
321 m_configProject.kcfg_profiles_list->addItem(i.key(), i.value());
324 if (!KdenliveSettings::default_profile().isEmpty()) {
325 for (int i = 0; i < m_configProject.kcfg_profiles_list->count(); i++) {
326 if (m_configProject.kcfg_profiles_list->itemData(i).toString() == KdenliveSettings::default_profile()) {
327 m_configProject.kcfg_profiles_list->setCurrentIndex(i);
328 KdenliveSettings::setProfiles_list(i);
335 void KdenliveSettingsDialog::initDevices()
337 // Fill audio drivers
338 m_configSdl.kcfg_audio_driver->addItem(i18n("Automatic"), QString());
340 m_configSdl.kcfg_audio_driver->addItem(i18n("OSS"), "dsp");
341 m_configSdl.kcfg_audio_driver->addItem(i18n("ALSA"), "alsa");
342 m_configSdl.kcfg_audio_driver->addItem(i18n("PulseAudio"), "pulse");
343 m_configSdl.kcfg_audio_driver->addItem(i18n("OSS with DMA access"), "dma");
344 m_configSdl.kcfg_audio_driver->addItem(i18n("Esound daemon"), "esd");
345 m_configSdl.kcfg_audio_driver->addItem(i18n("ARTS daemon"), "artsc");
348 if (!KdenliveSettings::audiodrivername().isEmpty())
349 for (int i = 1; i < m_configSdl.kcfg_audio_driver->count(); i++) {
350 if (m_configSdl.kcfg_audio_driver->itemData(i).toString() == KdenliveSettings::audiodrivername()) {
351 m_configSdl.kcfg_audio_driver->setCurrentIndex(i);
352 KdenliveSettings::setAudio_driver((uint) i);
356 // Fill video drivers
357 m_configSdl.kcfg_video_driver->addItem(i18n("Automatic"), QString());
359 m_configSdl.kcfg_video_driver->addItem(i18n("XVideo"), "x11");
360 m_configSdl.kcfg_video_driver->addItem(i18n("X11"), "x11_noaccel");
361 m_configSdl.kcfg_video_driver->addItem(i18n("XFree86 DGA 2.0"), "dga");
362 m_configSdl.kcfg_video_driver->addItem(i18n("Nano X"), "nanox");
363 m_configSdl.kcfg_video_driver->addItem(i18n("Framebuffer console"), "fbcon");
364 m_configSdl.kcfg_video_driver->addItem(i18n("Direct FB"), "directfb");
365 m_configSdl.kcfg_video_driver->addItem(i18n("SVGAlib"), "svgalib");
366 m_configSdl.kcfg_video_driver->addItem(i18n("General graphics interface"), "ggi");
367 m_configSdl.kcfg_video_driver->addItem(i18n("Ascii art library"), "aalib");
370 // Fill the list of audio playback devices
371 m_configSdl.kcfg_audio_device->addItem(i18n("Default"), QString());
372 m_configCapture.kcfg_rmd_alsa_device->addItem(i18n("Default"), QString());
373 if (!KStandardDirs::findExe("aplay").isEmpty()) {
374 m_readProcess.setOutputChannelMode(KProcess::OnlyStdoutChannel);
375 m_readProcess.setProgram("aplay", QStringList() << "-l");
376 connect(&m_readProcess, SIGNAL(readyReadStandardOutput()) , this, SLOT(slotReadAudioDevices()));
377 m_readProcess.execute(5000);
379 // If aplay is not installed on the system, parse the /proc/asound/pcm file
380 QFile file("/proc/asound/pcm");
381 if (file.open(QIODevice::ReadOnly)) {
382 QTextStream stream(&file);
385 while (!stream.atEnd()) {
386 line = stream.readLine();
387 if (line.contains("playback")) {
388 deviceId = line.section(':', 0, 0);
389 m_configSdl.kcfg_audio_device->addItem(line.section(':', 1, 1), "plughw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
391 if (line.contains("capture")) {
392 deviceId = line.section(':', 0, 0);
393 m_configCapture.kcfg_rmd_alsa_device->addItem(line.section(':', 1, 1), "plughw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
394 m_configCapture.kcfg_v4l_alsadevice->addItem(line.section(':', 1, 1), "hw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
400 if (!KdenliveSettings::audiodevicename().isEmpty()) {
401 // Select correct alsa device
402 int ix = m_configSdl.kcfg_audio_device->findData(KdenliveSettings::audiodevicename());
403 m_configSdl.kcfg_audio_device->setCurrentIndex(ix);
404 KdenliveSettings::setAudio_device(ix);
407 if (!KdenliveSettings::rmd_alsadevicename().isEmpty()) {
408 // Select correct alsa device
409 int ix = m_configCapture.kcfg_rmd_alsa_device->findData(KdenliveSettings::rmd_alsadevicename());
410 m_configCapture.kcfg_rmd_alsa_device->setCurrentIndex(ix);
411 KdenliveSettings::setRmd_alsa_device(ix);
414 if (!KdenliveSettings::v4l_alsadevicename().isEmpty()) {
415 // Select correct alsa device
416 int ix = m_configCapture.kcfg_v4l_alsadevice->findData(KdenliveSettings::v4l_alsadevicename());
417 m_configCapture.kcfg_v4l_alsadevice->setCurrentIndex(ix);
418 KdenliveSettings::setV4l_alsadevice(ix);
421 loadCurrentV4lProfileInfo();
425 void KdenliveSettingsDialog::slotReadAudioDevices()
427 QString result = QString(m_readProcess.readAllStandardOutput());
428 kDebug() << "// / / / / / READING APLAY: ";
430 QStringList lines = result.split('\n');
431 foreach(const QString & data, lines) {
432 kDebug() << "// READING LINE: " << data;
433 if (data.simplified().startsWith("card")) {
434 QString card = data.section(':', 0, 0).section(' ', -1);
435 QString device = data.section(':', 1, 1).section(' ', -1);
436 m_configSdl.kcfg_audio_device->addItem(data.section(':', -1), "plughw:" + card + ',' + device);
437 m_configCapture.kcfg_rmd_alsa_device->addItem(data.section(':', -1), "plughw:" + card + ',' + device);
438 m_configCapture.kcfg_v4l_alsadevice->addItem(data.section(':', -1), "hw:" + card + ',' + device);
443 void KdenliveSettingsDialog::showPage(int page, int option)
447 setCurrentPage(m_page1);
450 setCurrentPage(m_page2);
453 setCurrentPage(m_page3);
456 setCurrentPage(m_page4);
457 m_configCapture.tabWidget->setCurrentIndex(option);
460 setCurrentPage(m_page5);
463 setCurrentPage(m_page6);
466 setCurrentPage(m_page7);
469 setCurrentPage(m_page1);
473 void KdenliveSettingsDialog::slotEditVideoApplication()
475 KService::Ptr service;
476 KOpenWithDialog dlg(KUrl::List(), i18n("Select default video player"), m_configEnv.kcfg_defaultplayerapp->text(), this);
477 if (dlg.exec() != QDialog::Accepted)
480 service = dlg.service();
481 m_configEnv.kcfg_defaultplayerapp->setText(service->exec());
484 void KdenliveSettingsDialog::slotEditAudioApplication()
486 KService::Ptr service;
487 KOpenWithDialog dlg(KUrl::List(), i18n("Select default audio editor"), m_configEnv.kcfg_defaultaudioapp->text(), this);
488 if (dlg.exec() != QDialog::Accepted)
491 service = dlg.service();
492 m_configEnv.kcfg_defaultaudioapp->setText(service->exec());
495 void KdenliveSettingsDialog::slotEditImageApplication()
497 KService::Ptr service;
498 KOpenWithDialog dlg(KUrl::List(), i18n("Select default image editor"), m_configEnv.kcfg_defaultimageapp->text(), this);
499 if (dlg.exec() != QDialog::Accepted)
502 service = dlg.service();
503 m_configEnv.kcfg_defaultimageapp->setText(service->exec());
506 #ifndef NO_JOGSHUTTLE
507 void KdenliveSettingsDialog::slotCheckShuttle(int state)
509 m_configShuttle.config_group->setEnabled(state);
510 if (m_configShuttle.shuttledevicelist->count() == 0) {
512 QString baseName = "/dev/input/event";
514 for (int i = 0; i < 30; i++) {
515 QString filename = baseName + QString::number(i);
516 kDebug() << "/// CHECKING OFR: " << filename;
518 char name[256] = "unknown";
519 fd = KDE_open((char *) filename.toUtf8().data(), O_RDONLY);
520 if (fd >= 0 && ioctl(fd, EVIOCGNAME(sizeof(name)), name) >= 0) {
521 m_configShuttle.shuttledevicelist->addItem(name, filename);
525 if (KdenliveSettings::shuttledevice().isEmpty()) QTimer::singleShot(1500, this, SLOT(slotUpdateShuttleDevice()));
529 void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
531 QString device = m_configShuttle.shuttledevicelist->itemData(ix).toString();
532 //KdenliveSettings::setShuttledevice(device);
533 m_configShuttle.kcfg_shuttledevice->setText(device);
536 #endif /* NO_JOGSHUTTLE */
538 void KdenliveSettingsDialog::updateWidgets()
540 // Revert widgets to last saved state (for example when user pressed "Cancel")
541 // kDebug() << "// // // KCONFIG Revert called";
542 #ifndef NO_JOGSHUTTLE
543 // revert jog shuttle device
544 if (m_configShuttle.shuttledevicelist->count() > 0) {
545 for (int i = 0; i < m_configShuttle.shuttledevicelist->count(); i++) {
546 if (m_configShuttle.shuttledevicelist->itemData(i) == KdenliveSettings::shuttledevice()) {
547 m_configShuttle.shuttledevicelist->setCurrentIndex(i);
553 // Revert jog shuttle buttons
554 QList<QString> action_names = m_mappable_actions.keys();
556 QStringList actions_map = JogShuttleConfig::actionMap(KdenliveSettings::shuttlebuttons());
557 QMap<QString, int> action_pos;
558 foreach (const QString& action_id, actions_map) {
559 // This loop find out at what index is the string that would map to the action_id.
560 for (int i = 0; i < action_names.size(); i++) {
561 if (m_mappable_actions[action_names[i]] == action_id) {
562 action_pos[action_id] = i;
568 foreach (KComboBox* button, m_shuttle_buttons) {
570 if (i < actions_map.size())
571 button->setCurrentIndex(action_pos[actions_map[i]]);
576 void KdenliveSettingsDialog::updateSettings()
578 // Save changes to settings (for example when user pressed "Apply" or "Ok")
579 // kDebug() << "// // // KCONFIG UPDATE called";
580 m_defaultProfile = m_configProject.kcfg_profiles_list->currentText();
581 KdenliveSettings::setDefault_profile(m_defaultPath);
583 bool resetProfile = false;
584 bool updateCapturePath = false;
586 /*if (m_configShuttle.shuttledevicelist->count() > 0) {
587 QString device = m_configShuttle.shuttledevicelist->itemData(m_configShuttle.shuttledevicelist->currentIndex()).toString();
588 if (device != KdenliveSettings::shuttledevice()) KdenliveSettings::setShuttledevice(device);
591 if (m_configEnv.kcfg_capturetoprojectfolder->isChecked() != KdenliveSettings::capturetoprojectfolder()) {
592 KdenliveSettings::setCapturetoprojectfolder(m_configEnv.kcfg_capturetoprojectfolder->isChecked());
593 updateCapturePath = true;
596 if (m_configEnv.capturefolderurl->url().path() != KdenliveSettings::capturefolder()) {
597 KdenliveSettings::setCapturefolder(m_configEnv.capturefolderurl->url().path());
598 updateCapturePath = true;
601 if (m_configCapture.kcfg_dvgrabfilename->text() != KdenliveSettings::dvgrabfilename()) {
602 KdenliveSettings::setDvgrabfilename(m_configCapture.kcfg_dvgrabfilename->text());
603 updateCapturePath = true;
606 if ((uint) m_configCapture.kcfg_firewireformat->currentIndex() != KdenliveSettings::firewireformat()) {
607 KdenliveSettings::setFirewireformat(m_configCapture.kcfg_firewireformat->currentIndex());
608 updateCapturePath = true;
611 if ((uint) m_configCapture.kcfg_v4l_format->currentIndex() != KdenliveSettings::v4l_format()) {
612 saveCurrentV4lProfile();
613 KdenliveSettings::setV4l_format(0);
616 // Check encoding profiles
617 QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
618 if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
619 KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
620 KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
622 data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
623 if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::decklink_parameters()) {
624 KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
625 KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
627 data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
628 if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::proxyparams()) {
629 KdenliveSettings::setProxyparams(data.section(";", 0, 0));
630 KdenliveSettings::setProxyextension(data.section(";", 1, 1));
634 if (updateCapturePath) emit updateCaptureFolder();
636 QString value = m_configCapture.kcfg_rmd_alsa_device->itemData(m_configCapture.kcfg_rmd_alsa_device->currentIndex()).toString();
637 if (value != KdenliveSettings::rmd_alsadevicename()) {
638 KdenliveSettings::setRmd_alsadevicename(value);
641 value = m_configCapture.kcfg_v4l_alsadevice->itemData(m_configCapture.kcfg_v4l_alsadevice->currentIndex()).toString();
642 if (value != KdenliveSettings::v4l_alsadevicename()) {
643 KdenliveSettings::setV4l_alsadevicename(value);
646 value = m_configCapture.kcfg_rmd_audio_freq->itemText(m_configCapture.kcfg_rmd_audio_freq->currentIndex());
647 kDebug() << "// AUDIO FREQ VALUE: " << value << ", CURRENT: " << KdenliveSettings::rmd_freq() << ", IX: " << m_configCapture.kcfg_rmd_audio_freq->currentIndex();
648 if (value != KdenliveSettings::rmd_freq()) {
649 kDebug() << "// SETTING AUDIO FREQ TO: " << value;
650 KdenliveSettings::setRmd_freq(value);
653 if (m_configSdl.kcfg_external_display->isChecked() != KdenliveSettings::external_display()) {
654 KdenliveSettings::setExternal_display(m_configSdl.kcfg_external_display->isChecked());
658 value = m_configSdl.kcfg_audio_driver->itemData(m_configSdl.kcfg_audio_driver->currentIndex()).toString();
659 if (value != KdenliveSettings::audiodrivername()) {
660 KdenliveSettings::setAudiodrivername(value);
664 if (value == "alsa") {
665 // Audio device setting is only valid for alsa driver
666 value = m_configSdl.kcfg_audio_device->itemData(m_configSdl.kcfg_audio_device->currentIndex()).toString();
667 if (value != KdenliveSettings::audiodevicename()) {
668 KdenliveSettings::setAudiodevicename(value);
671 } else if (KdenliveSettings::audiodevicename().isEmpty() == false) {
672 KdenliveSettings::setAudiodevicename(QString::null);
676 value = m_configSdl.kcfg_video_driver->itemData(m_configSdl.kcfg_video_driver->currentIndex()).toString();
677 if (value != KdenliveSettings::videodrivername()) {
678 KdenliveSettings::setVideodrivername(value);
682 if (m_configSdl.kcfg_window_background->color() != KdenliveSettings::window_background()) {
683 KdenliveSettings::setWindow_background(m_configSdl.kcfg_window_background->color());
687 if (m_configSdl.kcfg_volume->value() != KdenliveSettings::volume()) {
688 KdenliveSettings::setVolume(m_configSdl.kcfg_volume->value());
693 // The transcoding profiles were modified, save.
695 saveTranscodeProfiles();
698 #ifndef NO_JOGSHUTTLE
699 m_shuttleModified = false;
702 actions << "monitor_pause"; // the Job rest position action.
703 foreach (KComboBox* button, m_shuttle_buttons) {
704 actions << m_mappable_actions[button->currentText()];
706 QString maps = JogShuttleConfig::actionMap(actions);
707 //fprintf(stderr, "Shuttle config: %s\n", JogShuttleConfig::actionMap(actions).toAscii().constData());
708 if (KdenliveSettings::shuttlebuttons() != maps)
709 KdenliveSettings::setShuttlebuttons(maps);
712 #if KDE_IS_VERSION(4,3,0)
713 KConfigDialog::settingsChangedSlot();
716 //KConfigDialog::updateSettings();
717 if (resetProfile) emit doResetProfile();
720 void KdenliveSettingsDialog::slotUpdateDisplay()
722 QString currentProfile = m_configProject.kcfg_profiles_list->itemData(m_configProject.kcfg_profiles_list->currentIndex()).toString();
723 QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(currentProfile);
724 m_configProject.p_size->setText(values.value("width") + 'x' + values.value("height"));
725 m_configProject.p_fps->setText(values.value("frame_rate_num") + '/' + values.value("frame_rate_den"));
726 m_configProject.p_aspect->setText(values.value("sample_aspect_num") + '/' + values.value("sample_aspect_den"));
727 m_configProject.p_display->setText(values.value("display_aspect_num") + '/' + values.value("display_aspect_den"));
728 if (values.value("progressive").toInt() == 0)
729 m_configProject.p_progressive->setText(i18n("Interlaced"));
731 m_configProject.p_progressive->setText(i18n("Progressive"));
732 m_defaultProfile = m_configProject.kcfg_profiles_list->itemText(m_configProject.kcfg_profiles_list->currentIndex());
733 m_defaultPath = currentProfile;
736 void KdenliveSettingsDialog::slotCheckAlsaDriver()
738 QString value = m_configSdl.kcfg_audio_driver->itemData(m_configSdl.kcfg_audio_driver->currentIndex()).toString();
739 m_configSdl.kcfg_audio_device->setEnabled(value == "alsa");
742 void KdenliveSettingsDialog::loadTranscodeProfiles()
744 KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
745 KConfigGroup transConfig(config, "Transcoding");
747 m_configTranscode.profiles_list->blockSignals(true);
748 QMap< QString, QString > profiles = transConfig.entryMap();
749 QMapIterator<QString, QString> i(profiles);
750 while (i.hasNext()) {
752 QTreeWidgetItem *item = new QTreeWidgetItem(m_configTranscode.profiles_list, QStringList() << i.key() << i.value());
753 item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
755 m_configTranscode.profiles_list->blockSignals(false);
758 void KdenliveSettingsDialog::saveTranscodeProfiles()
760 KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
761 //KSharedConfigPtr config = KGlobal::config();
762 KConfigGroup transConfig(config, "Transcoding");
764 transConfig.deleteGroup();
765 int max = m_configTranscode.profiles_list->topLevelItemCount();
766 for (int i = 0; i < max; i++) {
767 QTreeWidgetItem *item = m_configTranscode.profiles_list->topLevelItem(i);
768 transConfig.writeEntry(item->text(0), item->text(1));
773 void KdenliveSettingsDialog::slotAddTranscode()
775 QTreeWidgetItem *item = new QTreeWidgetItem(m_configTranscode.profiles_list, QStringList() << i18n("Name") << i18n("Parameters"));
776 item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
777 m_configTranscode.profiles_list->setCurrentItem(item);
778 m_configTranscode.profiles_list->editItem(item);
779 slotDialogModified();
782 void KdenliveSettingsDialog::slotDeleteTranscode()
784 QTreeWidgetItem *item = m_configTranscode.profiles_list->currentItem();
785 if (item == NULL) return;
787 slotDialogModified();
790 void KdenliveSettingsDialog::slotShuttleModified()
792 #ifndef NO_JOGSHUTTLE
794 actions << "monitor_pause"; // the Job rest position action.
795 foreach (KComboBox* button, m_shuttle_buttons) {
796 actions << m_mappable_actions[button->currentText()];
798 QString maps = JogShuttleConfig::actionMap(actions);
799 m_shuttleModified = KdenliveSettings::shuttlebuttons() != maps;
801 #if KDE_IS_VERSION(4,3,0)
802 KConfigDialog::updateButtons();
806 void KdenliveSettingsDialog::slotDialogModified()
809 #if KDE_IS_VERSION(4,3,0)
810 KConfigDialog::updateButtons();
815 bool KdenliveSettingsDialog::hasChanged()
817 if (m_modified || m_shuttleModified) return true;
818 return KConfigDialog::hasChanged();
821 void KdenliveSettingsDialog::slotUpdatev4lDevice()
823 QString device = m_configCapture.kcfg_detectedv4ldevices->itemData(m_configCapture.kcfg_detectedv4ldevices->currentIndex()).toString();
824 if (!device.isEmpty()) m_configCapture.kcfg_video4vdevice->setText(device);
825 QString info = m_configCapture.kcfg_detectedv4ldevices->itemData(m_configCapture.kcfg_detectedv4ldevices->currentIndex(), Qt::UserRole + 1).toString();
827 m_configCapture.kcfg_v4l_format->blockSignals(true);
828 m_configCapture.kcfg_v4l_format->clear();
830 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
831 if (QFile::exists(vl4ProfilePath)) m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
833 QStringList pixelformats = info.split(">", QString::SkipEmptyParts);
836 QStringList itemRates;
837 for (int i = 0; i < pixelformats.count(); i++) {
838 QString format = pixelformats.at(i).section(':', 0, 0);
839 QStringList sizes = pixelformats.at(i).split(":", QString::SkipEmptyParts);
840 pixelFormat = sizes.takeFirst();
841 for (int j = 0; j < sizes.count(); j++) {
842 itemSize = sizes.at(j).section("=", 0, 0);
843 itemRates = sizes.at(j).section("=", 1, 1).split(",", QString::SkipEmptyParts);
844 for (int k = 0; k < itemRates.count(); k++) {
845 m_configCapture.kcfg_v4l_format->addItem("[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")", QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
849 m_configCapture.kcfg_v4l_format->blockSignals(false);
850 slotUpdatev4lCaptureProfile();
853 void KdenliveSettingsDialog::slotUpdatev4lCaptureProfile()
855 QStringList info = m_configCapture.kcfg_v4l_format->itemData(m_configCapture.kcfg_v4l_format->currentIndex(), Qt::UserRole).toStringList();
856 if (info.isEmpty()) {
857 // No auto info, display the current ones
858 loadCurrentV4lProfileInfo();
861 m_configCapture.p_size->setText(info.at(1) + 'x' + info.at(2));
862 m_configCapture.p_fps->setText(info.at(3) + '/' + info.at(4));
863 m_configCapture.p_aspect->setText("1/1");
864 m_configCapture.p_display->setText(info.at(1) + '/' + info.at(2));
865 m_configCapture.p_colorspace->setText(ProfilesDialog::getColorspaceDescription(601));
866 m_configCapture.p_progressive->setText(i18n("Progressive"));
868 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
869 if (!QFile::exists(vl4ProfilePath)) saveCurrentV4lProfile();
872 void KdenliveSettingsDialog::loadCurrentV4lProfileInfo()
874 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
875 MltVideoProfile prof;
876 if (!QFile::exists(vl4ProfilePath)) {
877 // No default formats found, build one
880 prof.frame_rate_num = 15;
881 prof.frame_rate_den = 1;
882 prof.display_aspect_num = 4;
883 prof.display_aspect_den = 3;
884 prof.sample_aspect_num = 1;
885 prof.sample_aspect_den = 1;
886 prof.progressive = 1;
887 prof.colorspace = 601;
888 ProfilesDialog::saveProfile(prof, vl4ProfilePath);
890 else prof = ProfilesDialog::getVideoProfile(vl4ProfilePath);
891 m_configCapture.p_size->setText(QString::number(prof.width) + 'x' + QString::number(prof.height));
892 m_configCapture.p_fps->setText(QString::number(prof.frame_rate_num) + '/' + QString::number(prof.frame_rate_den));
893 m_configCapture.p_aspect->setText(QString::number(prof.sample_aspect_num) + '/' + QString::number(prof.sample_aspect_den));
894 m_configCapture.p_display->setText(QString::number(prof.display_aspect_num) + '/' + QString::number(prof.display_aspect_den));
895 m_configCapture.p_colorspace->setText(ProfilesDialog::getColorspaceDescription(prof.colorspace));
896 if (prof.progressive) m_configCapture.p_progressive->setText(i18n("Progressive"));
899 void KdenliveSettingsDialog::saveCurrentV4lProfile()
901 MltVideoProfile profile;
902 profile.description = "Video4Linux capture";
903 profile.colorspace = ProfilesDialog::getColorspaceFromDescription(m_configCapture.p_colorspace->text());
904 profile.width = m_configCapture.p_size->text().section('x', 0, 0).toInt();
905 profile.height = m_configCapture.p_size->text().section('x', 1, 1).toInt();
906 profile.sample_aspect_num = m_configCapture.p_aspect->text().section('/', 0, 0).toInt();
907 profile.sample_aspect_den = m_configCapture.p_aspect->text().section('/', 1, 1).toInt();
908 profile.display_aspect_num = m_configCapture.p_display->text().section('/', 0, 0).toInt();
909 profile.display_aspect_den = m_configCapture.p_display->text().section('/', 1, 1).toInt();
910 profile.frame_rate_num = m_configCapture.p_fps->text().section('/', 0, 0).toInt();
911 profile.frame_rate_den = m_configCapture.p_fps->text().section('/', 1, 1).toInt();
912 profile.progressive = m_configCapture.p_progressive->text() == i18n("Progressive");
913 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
914 ProfilesDialog::saveProfile(profile, vl4ProfilePath);
917 void KdenliveSettingsDialog::slotManageEncodingProfile()
920 if (currentPage() == m_page4) {
921 if (m_configCapture.tabWidget->currentIndex() == 1) type = 1;
922 else if (m_configCapture.tabWidget->currentIndex() == 3) type = 2;
924 EncodingProfilesDialog *d = new EncodingProfilesDialog(type);
927 loadEncodingProfiles();
930 void KdenliveSettingsDialog::loadEncodingProfiles()
932 QString profileFile = KStandardDirs::locateLocal("appdata", "encodingprofiles.rc");
933 KConfig conf(profileFile, KConfig::SimpleConfig);
934 if (!QFile::exists(profileFile)) {
935 KConfigGroup g1(&conf, "video4linux");
936 g1.writeEntry("Normal MPEG", KdenliveSettings::v4l_parameters() + ";" + KdenliveSettings::v4l_extension());
937 KConfigGroup g2(&conf, "decklink");
938 g2.writeEntry("Normal MPEG", KdenliveSettings::decklink_parameters() + ";" + KdenliveSettings::decklink_extension());
939 KConfigGroup g3(&conf, "proxy");
940 g3.writeEntry("Normal MPEG", KdenliveSettings::proxyparams() + ";" + KdenliveSettings::proxyextension());
944 m_configCapture.kcfg_v4l_profile->blockSignals(true);
945 QString currentItem = m_configCapture.kcfg_v4l_profile->currentText();
946 m_configCapture.kcfg_v4l_profile->clear();
947 KConfigGroup group(&conf, "video4linux");
948 QMap< QString, QString > values = group.entryMap();
949 QMapIterator<QString, QString> i(values);
950 while (i.hasNext()) {
952 if (!i.key().isEmpty()) m_configCapture.kcfg_v4l_profile->addItem(i.key(), i.value());
954 m_configCapture.kcfg_v4l_profile->blockSignals(false);
955 if (!currentItem.isEmpty()) m_configCapture.kcfg_v4l_profile->setCurrentIndex(m_configCapture.kcfg_v4l_profile->findText(currentItem));
957 // Load Decklink profiles
958 m_configCapture.kcfg_decklink_profile->blockSignals(true);
959 currentItem = m_configCapture.kcfg_decklink_profile->currentText();
960 m_configCapture.kcfg_decklink_profile->clear();
961 KConfigGroup group2(&conf, "decklink");
962 values = group2.entryMap();
963 QMapIterator<QString, QString> j(values);
964 while (j.hasNext()) {
966 if (!j.key().isEmpty()) m_configCapture.kcfg_decklink_profile->addItem(j.key(), j.value());
968 m_configCapture.kcfg_decklink_profile->blockSignals(false);
969 if (!currentItem.isEmpty()) m_configCapture.kcfg_decklink_profile->setCurrentIndex(m_configCapture.kcfg_decklink_profile->findText(currentItem));
971 // Load Proxy profiles
972 m_configProject.kcfg_proxy_profile->blockSignals(true);
973 currentItem = m_configProject.kcfg_proxy_profile->currentText();
974 m_configProject.kcfg_proxy_profile->clear();
975 KConfigGroup group3(&conf, "proxy");
976 values = group3.entryMap();
977 QMapIterator<QString, QString> k(values);
978 while (k.hasNext()) {
980 if (!k.key().isEmpty()) m_configProject.kcfg_proxy_profile->addItem(k.key(), k.value());
982 m_configProject.kcfg_proxy_profile->blockSignals(false);
983 if (!currentItem.isEmpty()) m_configProject.kcfg_proxy_profile->setCurrentIndex(m_configProject.kcfg_proxy_profile->findText(currentItem));
986 void KdenliveSettingsDialog::slotUpdateDecklinkProfile(int ix)
988 if (ix == -1) ix = KdenliveSettings::decklink_profile();
989 else ix = m_configCapture.kcfg_decklink_profile->currentIndex();
990 QString data = m_configCapture.kcfg_decklink_profile->itemData(ix).toString();
991 if (data.isEmpty()) return;
992 m_configCapture.decklink_parameters->setPlainText(data.section(";", 0, 0));
996 void KdenliveSettingsDialog::slotUpdateV4lProfile(int ix)
998 if (ix == -1) ix = KdenliveSettings::v4l_profile();
999 else ix = m_configCapture.kcfg_v4l_profile->currentIndex();
1000 QString data = m_configCapture.kcfg_v4l_profile->itemData(ix).toString();
1001 if (data.isEmpty()) return;
1002 m_configCapture.v4l_parameters->setPlainText(data.section(";", 0, 0));
1006 void KdenliveSettingsDialog::slotUpdateProxyProfile(int ix)
1008 if (ix == -1) ix = KdenliveSettings::v4l_profile();
1009 else ix = m_configProject.kcfg_proxy_profile->currentIndex();
1010 QString data = m_configProject.kcfg_proxy_profile->itemData(ix).toString();
1011 if (data.isEmpty()) return;
1012 m_configProject.proxyparams->setPlainText(data.section(";", 0, 0));
1016 #include "kdenlivesettingsdialog.moc"