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"
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>
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);
66 // Hide avformat-novalidate trick, causes crash (bug #2205 and #2206)
67 m_configMisc.kcfg_projectloading_avformatnovalidate->setVisible(false);
69 QWidget *p8 = new QWidget;
70 m_configProject.setupUi(p8);
71 m_page8 = addPage(p8, i18n("Project Defaults"), "document-new");
72 connect(m_configProject.kcfg_generateproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyminsize, SLOT(setEnabled(bool)));
73 m_configProject.kcfg_proxyminsize->setEnabled(KdenliveSettings::generateproxy());
74 connect(m_configProject.kcfg_generateimageproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyimageminsize, SLOT(setEnabled(bool)));
75 m_configProject.kcfg_proxyimageminsize->setEnabled(KdenliveSettings::generateimageproxy());
77 QWidget *p3 = new QWidget;
78 m_configTimeline.setupUi(p3);
79 m_page3 = addPage(p3, i18n("Timeline"), "video-display");
81 QWidget *p2 = new QWidget;
82 m_configEnv.setupUi(p2);
83 m_configEnv.mltpathurl->setMode(KFile::Directory);
84 m_configEnv.mltpathurl->lineEdit()->setObjectName("kcfg_mltpath");
85 m_configEnv.rendererpathurl->lineEdit()->setObjectName("kcfg_rendererpath");
86 m_configEnv.kcfg_mltthreads->setMaximum( QThread::idealThreadCount() < 4 ? QThread::idealThreadCount() : 3 );
87 m_configEnv.tmppathurl->setMode(KFile::Directory);
88 m_configEnv.tmppathurl->lineEdit()->setObjectName("kcfg_currenttmpfolder");
89 m_configEnv.projecturl->setMode(KFile::Directory);
90 m_configEnv.projecturl->lineEdit()->setObjectName("kcfg_defaultprojectfolder");
91 m_configEnv.capturefolderurl->setMode(KFile::Directory);
92 m_configEnv.capturefolderurl->lineEdit()->setObjectName("kcfg_capturefolder");
93 m_configEnv.capturefolderurl->setEnabled(!KdenliveSettings::capturetoprojectfolder());
94 connect(m_configEnv.kcfg_capturetoprojectfolder, SIGNAL(clicked()), this, SLOT(slotEnableCaptureFolder()));
95 m_page2 = addPage(p2, i18n("Environment"), "application-x-executable-script");
97 QWidget *p4 = new QWidget;
98 m_configCapture.setupUi(p4);
102 // Video 4 Linux device detection
103 for (int i = 0; i < 10; i++) {
104 QString path = "/dev/video" + QString::number(i);
105 if (QFile::exists(path)) {
106 QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path.toUtf8().constData());
107 if (!deviceInfo.isEmpty()) {
108 m_configCapture.kcfg_detectedv4ldevices->addItem(deviceInfo.at(0), path);
109 m_configCapture.kcfg_detectedv4ldevices->setItemData(m_configCapture.kcfg_detectedv4ldevices->count() - 1, deviceInfo.at(1), Qt::UserRole + 1);
113 connect(m_configCapture.kcfg_detectedv4ldevices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lDevice()));
114 connect(m_configCapture.kcfg_v4l_format, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lCaptureProfile()));
115 connect(m_configCapture.config_v4l, SIGNAL(clicked()), this, SLOT(slotEditVideo4LinuxProfile()));
117 slotUpdatev4lDevice();
120 m_page4 = addPage(p4, i18n("Capture"), "media-record");
121 m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
123 m_configCapture.tabWidget->setEnabled(false);
124 m_configCapture.kcfg_defaultcapture->setEnabled(false);
125 m_configCapture.label->setText(i18n("Capture is not yet available on Mac OS X."));
128 QWidget *p5 = new QWidget;
129 m_configShuttle.setupUi(p5);
130 #ifdef USE_JOGSHUTTLE
131 connect(m_configShuttle.kcfg_enableshuttle, SIGNAL(stateChanged(int)), this, SLOT(slotCheckShuttle(int)));
132 connect(m_configShuttle.shuttledevicelist, SIGNAL(activated(int)), this, SLOT(slotUpdateShuttleDevice(int)));
133 slotCheckShuttle(KdenliveSettings::enableshuttle());
134 m_configShuttle.shuttledisabled->hide();
136 // Store the button pointers into an array for easier handling them in the other functions.
137 m_shuttle_buttons.push_back(m_configShuttle.shuttle1);
138 m_shuttle_buttons.push_back(m_configShuttle.shuttle2);
139 m_shuttle_buttons.push_back(m_configShuttle.shuttle3);
140 m_shuttle_buttons.push_back(m_configShuttle.shuttle4);
141 m_shuttle_buttons.push_back(m_configShuttle.shuttle5);
143 // populate the buttons with the current configuration. The items are sorted
144 // according to the user-selected language, so they do not appear in random order.
145 QList<QString> action_names = mappable_actions.keys();
148 // Here we need to compute the action_id -> index-in-action_names. We iterate over the
149 // action_names, as the sorting may depend on the user-language.
150 QStringList actions_map = JogShuttleConfig::actionMap(KdenliveSettings::shuttlebuttons());
151 QMap<QString, int> action_pos;
152 foreach (const QString& action_id, actions_map) {
153 // This loop find out at what index is the string that would map to the action_id.
154 for (int i = 0; i < action_names.size(); i++) {
155 if (mappable_actions[action_names[i]] == action_id) {
156 action_pos[action_id] = i;
163 foreach (KComboBox* button, m_shuttle_buttons) {
164 button->addItems(action_names);
165 connect(button, SIGNAL(activated(int)), this, SLOT(slotShuttleModified()));
167 if (i < actions_map.size())
168 button->setCurrentIndex(action_pos[actions_map[i]]);
170 #else /* ! USE_JOGSHUTTLE */
171 m_configShuttle.kcfg_enableshuttle->hide();
172 m_configShuttle.kcfg_enableshuttle->setDisabled(true);
173 #endif /* USE_JOGSHUTTLE */
174 m_page5 = addPage(p5, i18n("JogShuttle"), "input-mouse");
176 QWidget *p6 = new QWidget;
177 m_configSdl.setupUi(p6);
180 m_configSdl.kcfg_openglmonitors->setHidden(true);
183 m_page6 = addPage(p6, i18n("Playback"), "media-playback-start");
185 QWidget *p7 = new QWidget;
186 m_configTranscode.setupUi(p7);
187 m_page7 = addPage(p7, i18n("Transcode"), "edit-copy");
188 connect(m_configTranscode.button_add, SIGNAL(clicked()), this, SLOT(slotAddTranscode()));
189 connect(m_configTranscode.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteTranscode()));
190 connect(m_configTranscode.profiles_list, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDialogModified()));
192 connect(m_configCapture.kcfg_rmd_capture_audio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
194 m_configCapture.audio_group->setVisible(KdenliveSettings::rmd_capture_audio());
196 connect(m_configEnv.kp_image, SIGNAL(clicked()), this, SLOT(slotEditImageApplication()));
197 connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
198 connect(m_configEnv.kp_player, SIGNAL(clicked()), this, SLOT(slotEditVideoApplication()));
200 loadEncodingProfiles();
205 connect(m_configSdl.kcfg_audio_driver, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCheckAlsaDriver()));
207 connect(m_configProject.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
208 connect(m_configCapture.kcfg_rmd_capture_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateRmdRegionStatus()));
210 slotUpdateRmdRegionStatus();
211 loadTranscodeProfiles();
214 //HACK: check dvgrab version, because only dvgrab >= 3.3 supports
215 // --timestamp option without bug
217 if (KdenliveSettings::dvgrab_path().isEmpty() || !QFile::exists(KdenliveSettings::dvgrab_path())) {
218 QString dvgrabpath = KStandardDirs::findExe("dvgrab");
219 KdenliveSettings::setDvgrab_path(dvgrabpath);
223 m_configCapture.decklink_showprofileinfo->setIcon(KIcon("help-about"));
224 m_configCapture.decklink_manageprofile->setIcon(KIcon("configure"));
225 m_configCapture.decklink_parameters->setVisible(false);
226 m_configCapture.decklink_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
227 m_configCapture.decklink_parameters->setPlainText(KdenliveSettings::decklink_parameters());
228 connect(m_configCapture.decklink_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
229 connect(m_configCapture.kcfg_decklink_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDecklinkProfile()));
230 connect(m_configCapture.decklink_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.decklink_parameters, SLOT(setVisible(bool)));
233 m_configCapture.v4l_showprofileinfo->setIcon(KIcon("help-about"));
234 m_configCapture.v4l_manageprofile->setIcon(KIcon("configure"));
235 m_configCapture.v4l_parameters->setVisible(false);
236 m_configCapture.v4l_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
237 m_configCapture.v4l_parameters->setPlainText(KdenliveSettings::v4l_parameters());
238 connect(m_configCapture.v4l_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
239 connect(m_configCapture.kcfg_v4l_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateV4lProfile()));
240 connect(m_configCapture.v4l_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.v4l_parameters, SLOT(setVisible(bool)));
242 // proxy profile stuff
243 m_configProject.proxy_showprofileinfo->setIcon(KIcon("help-about"));
244 m_configProject.proxy_manageprofile->setIcon(KIcon("configure"));
245 m_configProject.proxyparams->setVisible(false);
246 m_configProject.proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
247 m_configProject.proxyparams->setPlainText(KdenliveSettings::proxyparams());
248 connect(m_configProject.proxy_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
249 connect(m_configProject.proxy_showprofileinfo, SIGNAL(clicked(bool)), m_configProject.proxyparams, SLOT(setVisible(bool)));
250 connect(m_configProject.kcfg_proxy_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateProxyProfile()));
253 slotUpdateProxyProfile(-1);
254 slotUpdateV4lProfile(-1);
255 slotUpdateDecklinkProfile(-1);
257 BMInterface::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
258 if (m_configCapture.kcfg_decklink_capturedevice->count() > 0) {
259 QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
260 m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
262 connect(m_configCapture.kcfg_decklink_capturedevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHDMIModes()));
264 if (BMInterface::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device)) {
265 // Found blackmagic card
266 } else m_configSdl.kcfg_external_display->setEnabled(false);
268 double dvgrabVersion = 0;
269 if (!KdenliveSettings::dvgrab_path().isEmpty()) {
270 QProcess *versionCheck = new QProcess;
271 versionCheck->setProcessChannelMode(QProcess::MergedChannels);
272 versionCheck->start("dvgrab", QStringList() << "--version");
273 if (versionCheck->waitForFinished()) {
274 QString version = QString(versionCheck->readAll()).simplified();
275 if (version.contains(' ')) version = version.section(' ', -1);
276 dvgrabVersion = version.toDouble();
278 kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
281 if (dvgrabVersion < 3.3) {
282 KdenliveSettings::setFirewiretimestamp(false);
283 m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
285 m_configCapture.dvgrab_info->setText(i18n("dvgrab version %1 at %2", dvgrabVersion, KdenliveSettings::dvgrab_path()));
286 } else m_configCapture.dvgrab_info->setText(i18n("<strong><em>dvgrab</em> utility not found, please install it for firewire capture</strong>"));
288 if (KdenliveSettings::rmd_path().isEmpty() || !QFile::exists(KdenliveSettings::rmd_path())) {
289 QString rmdpath = KStandardDirs::findExe("recordmydesktop");
290 KdenliveSettings::setRmd_path(rmdpath);
292 if (KdenliveSettings::rmd_path().isEmpty())
293 m_configCapture.rmd_info->setText(i18n("<strong><em>Recordmydesktop</em> utility not found, please install it for screen grabs</strong>"));
295 m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", KdenliveSettings::rmd_path()));
298 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
300 void KdenliveSettingsDialog::slotUpdateHDMIModes()
302 QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
303 m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
306 void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
308 m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
311 void KdenliveSettingsDialog::slotEnableCaptureFolder()
313 m_configEnv.capturefolderurl->setEnabled(!m_configEnv.kcfg_capturetoprojectfolder->isChecked());
316 void KdenliveSettingsDialog::checkProfile()
318 m_configProject.kcfg_profiles_list->clear();
319 QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
320 QMapIterator<QString, QString> i(profilesInfo);
321 while (i.hasNext()) {
323 m_configProject.kcfg_profiles_list->addItem(i.key(), i.value());
326 if (!KdenliveSettings::default_profile().isEmpty()) {
327 for (int i = 0; i < m_configProject.kcfg_profiles_list->count(); i++) {
328 if (m_configProject.kcfg_profiles_list->itemData(i).toString() == KdenliveSettings::default_profile()) {
329 m_configProject.kcfg_profiles_list->setCurrentIndex(i);
330 KdenliveSettings::setProfiles_list(i);
337 void KdenliveSettingsDialog::initDevices()
339 // Fill audio drivers
340 m_configSdl.kcfg_audio_driver->addItem(i18n("Automatic"), QString());
342 m_configSdl.kcfg_audio_driver->addItem(i18n("OSS"), "dsp");
343 m_configSdl.kcfg_audio_driver->addItem(i18n("ALSA"), "alsa");
344 m_configSdl.kcfg_audio_driver->addItem(i18n("PulseAudio"), "pulse");
345 m_configSdl.kcfg_audio_driver->addItem(i18n("OSS with DMA access"), "dma");
346 m_configSdl.kcfg_audio_driver->addItem(i18n("Esound daemon"), "esd");
347 m_configSdl.kcfg_audio_driver->addItem(i18n("ARTS daemon"), "artsc");
350 if (!KdenliveSettings::audiodrivername().isEmpty())
351 for (int i = 1; i < m_configSdl.kcfg_audio_driver->count(); i++) {
352 if (m_configSdl.kcfg_audio_driver->itemData(i).toString() == KdenliveSettings::audiodrivername()) {
353 m_configSdl.kcfg_audio_driver->setCurrentIndex(i);
354 KdenliveSettings::setAudio_driver((uint) i);
358 // Fill video drivers
359 m_configSdl.kcfg_video_driver->addItem(i18n("Automatic"), QString());
361 m_configSdl.kcfg_video_driver->addItem(i18n("XVideo"), "x11");
362 m_configSdl.kcfg_video_driver->addItem(i18n("X11"), "x11_noaccel");
363 m_configSdl.kcfg_video_driver->addItem(i18n("XFree86 DGA 2.0"), "dga");
364 m_configSdl.kcfg_video_driver->addItem(i18n("Nano X"), "nanox");
365 m_configSdl.kcfg_video_driver->addItem(i18n("Framebuffer console"), "fbcon");
366 m_configSdl.kcfg_video_driver->addItem(i18n("Direct FB"), "directfb");
367 m_configSdl.kcfg_video_driver->addItem(i18n("SVGAlib"), "svgalib");
368 m_configSdl.kcfg_video_driver->addItem(i18n("General graphics interface"), "ggi");
369 m_configSdl.kcfg_video_driver->addItem(i18n("Ascii art library"), "aalib");
372 // Fill the list of audio playback devices
373 m_configSdl.kcfg_audio_device->addItem(i18n("Default"), QString());
374 m_configCapture.kcfg_rmd_alsa_device->addItem(i18n("Default"), QString());
375 if (!KStandardDirs::findExe("aplay").isEmpty()) {
376 m_readProcess.setOutputChannelMode(KProcess::OnlyStdoutChannel);
377 m_readProcess.setProgram("aplay", QStringList() << "-l");
378 connect(&m_readProcess, SIGNAL(readyReadStandardOutput()) , this, SLOT(slotReadAudioDevices()));
379 m_readProcess.execute(5000);
381 // If aplay is not installed on the system, parse the /proc/asound/pcm file
382 QFile file("/proc/asound/pcm");
383 if (file.open(QIODevice::ReadOnly)) {
384 QTextStream stream(&file);
387 while (!stream.atEnd()) {
388 line = stream.readLine();
389 if (line.contains("playback")) {
390 deviceId = line.section(':', 0, 0);
391 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()));
393 if (line.contains("capture")) {
394 deviceId = line.section(':', 0, 0);
395 m_configCapture.kcfg_rmd_alsa_device->addItem(line.section(':', 1, 1).simplified(), "plughw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
396 m_configCapture.kcfg_v4l_alsadevice->addItem(line.section(':', 1, 1).simplified(), "hw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
403 // Add pulseaudio capture option
404 m_configCapture.kcfg_v4l_alsadevice->addItem(i18n("PulseAudio"), "pulse");
406 if (!KdenliveSettings::audiodevicename().isEmpty()) {
407 // Select correct alsa device
408 int ix = m_configSdl.kcfg_audio_device->findData(KdenliveSettings::audiodevicename());
409 m_configSdl.kcfg_audio_device->setCurrentIndex(ix);
410 KdenliveSettings::setAudio_device(ix);
413 if (!KdenliveSettings::rmd_alsadevicename().isEmpty()) {
414 // Select correct alsa device
415 int ix = m_configCapture.kcfg_rmd_alsa_device->findData(KdenliveSettings::rmd_alsadevicename());
416 m_configCapture.kcfg_rmd_alsa_device->setCurrentIndex(ix);
417 KdenliveSettings::setRmd_alsa_device(ix);
420 if (!KdenliveSettings::v4l_alsadevicename().isEmpty()) {
421 // Select correct alsa device
422 int ix = m_configCapture.kcfg_v4l_alsadevice->findData(KdenliveSettings::v4l_alsadevicename());
423 m_configCapture.kcfg_v4l_alsadevice->setCurrentIndex(ix);
424 KdenliveSettings::setV4l_alsadevice(ix);
427 loadCurrentV4lProfileInfo();
431 void KdenliveSettingsDialog::slotReadAudioDevices()
433 QString result = QString(m_readProcess.readAllStandardOutput());
434 kDebug() << "// / / / / / READING APLAY: ";
436 QStringList lines = result.split('\n');
437 foreach(const QString & data, lines) {
438 //kDebug() << "// READING LINE: " << data;
439 if (!data.startsWith(" ") && data.count(':') > 1) {
440 QString card = data.section(':', 0, 0).section(' ', -1);
441 QString device = data.section(':', 1, 1).section(' ', -1);
442 m_configSdl.kcfg_audio_device->addItem(data.section(':', -1).simplified(), "plughw:" + card + ',' + device);
443 m_configCapture.kcfg_rmd_alsa_device->addItem(data.section(':', -1).simplified(), "plughw:" + card + ',' + device);
444 m_configCapture.kcfg_v4l_alsadevice->addItem(data.section(':', -1).simplified(), "hw:" + card + ',' + device);
449 void KdenliveSettingsDialog::showPage(int page, int option)
453 setCurrentPage(m_page1);
456 setCurrentPage(m_page2);
459 setCurrentPage(m_page3);
462 setCurrentPage(m_page4);
463 m_configCapture.tabWidget->setCurrentIndex(option);
466 setCurrentPage(m_page5);
469 setCurrentPage(m_page6);
472 setCurrentPage(m_page7);
475 setCurrentPage(m_page1);
479 void KdenliveSettingsDialog::slotEditVideoApplication()
481 KService::Ptr service;
482 KOpenWithDialog dlg(KUrl::List(), i18n("Select default video player"), m_configEnv.kcfg_defaultplayerapp->text(), this);
483 if (dlg.exec() != QDialog::Accepted)
486 service = dlg.service();
487 m_configEnv.kcfg_defaultplayerapp->setText(service->exec());
490 void KdenliveSettingsDialog::slotEditAudioApplication()
492 KService::Ptr service;
493 KOpenWithDialog dlg(KUrl::List(), i18n("Select default audio editor"), m_configEnv.kcfg_defaultaudioapp->text(), this);
494 if (dlg.exec() != QDialog::Accepted)
497 service = dlg.service();
498 m_configEnv.kcfg_defaultaudioapp->setText(service->exec());
501 void KdenliveSettingsDialog::slotEditImageApplication()
503 KService::Ptr service;
504 KOpenWithDialog dlg(KUrl::List(), i18n("Select default image editor"), m_configEnv.kcfg_defaultimageapp->text(), this);
505 if (dlg.exec() != QDialog::Accepted)
508 service = dlg.service();
509 m_configEnv.kcfg_defaultimageapp->setText(service->exec());
512 #ifdef USE_JOGSHUTTLE
513 void KdenliveSettingsDialog::slotCheckShuttle(int state)
515 m_configShuttle.config_group->setEnabled(state);
516 if (m_configShuttle.shuttledevicelist->count() == 0) {
518 QString baseName = "/dev/input/event";
520 for (int i = 0; i < 30; i++) {
521 QString filename = baseName + QString::number(i);
522 kDebug() << "/// CHECKING OFR: " << filename;
524 char name[256] = "unknown";
525 fd = KDE_open((char *) filename.toUtf8().data(), O_RDONLY);
526 if (fd >= 0 && ioctl(fd, EVIOCGNAME(sizeof(name)), name) >= 0) {
527 m_configShuttle.shuttledevicelist->addItem(name, filename);
531 if (KdenliveSettings::shuttledevice().isEmpty()) QTimer::singleShot(1500, this, SLOT(slotUpdateShuttleDevice()));
535 void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix)
537 QString device = m_configShuttle.shuttledevicelist->itemData(ix).toString();
538 //KdenliveSettings::setShuttledevice(device);
539 m_configShuttle.kcfg_shuttledevice->setText(device);
542 #endif /* USE_JOGSHUTTLE */
544 void KdenliveSettingsDialog::updateWidgets()
546 // Revert widgets to last saved state (for example when user pressed "Cancel")
547 // kDebug() << "// // // KCONFIG Revert called";
548 #ifdef USE_JOGSHUTTLE
549 // revert jog shuttle device
550 if (m_configShuttle.shuttledevicelist->count() > 0) {
551 for (int i = 0; i < m_configShuttle.shuttledevicelist->count(); i++) {
552 if (m_configShuttle.shuttledevicelist->itemData(i) == KdenliveSettings::shuttledevice()) {
553 m_configShuttle.shuttledevicelist->setCurrentIndex(i);
559 // Revert jog shuttle buttons
560 QList<QString> action_names = m_mappable_actions.keys();
562 QStringList actions_map = JogShuttleConfig::actionMap(KdenliveSettings::shuttlebuttons());
563 QMap<QString, int> action_pos;
564 foreach (const QString& action_id, actions_map) {
565 // This loop find out at what index is the string that would map to the action_id.
566 for (int i = 0; i < action_names.size(); i++) {
567 if (m_mappable_actions[action_names[i]] == action_id) {
568 action_pos[action_id] = i;
574 foreach (KComboBox* button, m_shuttle_buttons) {
576 if (i < actions_map.size())
577 button->setCurrentIndex(action_pos[actions_map[i]]);
579 #endif /* USE_JOGSHUTTLE */
582 void KdenliveSettingsDialog::updateSettings()
584 // Save changes to settings (for example when user pressed "Apply" or "Ok")
585 // kDebug() << "// // // KCONFIG UPDATE called";
586 m_defaultProfile = m_configProject.kcfg_profiles_list->currentText();
587 KdenliveSettings::setDefault_profile(m_defaultPath);
589 bool resetProfile = false;
590 bool updateCapturePath = false;
592 /*if (m_configShuttle.shuttledevicelist->count() > 0) {
593 QString device = m_configShuttle.shuttledevicelist->itemData(m_configShuttle.shuttledevicelist->currentIndex()).toString();
594 if (device != KdenliveSettings::shuttledevice()) KdenliveSettings::setShuttledevice(device);
597 if (m_configEnv.kcfg_capturetoprojectfolder->isChecked() != KdenliveSettings::capturetoprojectfolder()) {
598 KdenliveSettings::setCapturetoprojectfolder(m_configEnv.kcfg_capturetoprojectfolder->isChecked());
599 updateCapturePath = true;
602 if (m_configEnv.capturefolderurl->url().path() != KdenliveSettings::capturefolder()) {
603 KdenliveSettings::setCapturefolder(m_configEnv.capturefolderurl->url().path());
604 updateCapturePath = true;
607 if (m_configCapture.kcfg_dvgrabfilename->text() != KdenliveSettings::dvgrabfilename()) {
608 KdenliveSettings::setDvgrabfilename(m_configCapture.kcfg_dvgrabfilename->text());
609 updateCapturePath = true;
612 if ((uint) m_configCapture.kcfg_firewireformat->currentIndex() != KdenliveSettings::firewireformat()) {
613 KdenliveSettings::setFirewireformat(m_configCapture.kcfg_firewireformat->currentIndex());
614 updateCapturePath = true;
617 if ((uint) m_configCapture.kcfg_v4l_format->currentIndex() != KdenliveSettings::v4l_format()) {
618 saveCurrentV4lProfile();
619 KdenliveSettings::setV4l_format(0);
622 // Check encoding profiles
623 QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
624 if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::v4l_parameters() || data.section(";", 1, 1) != KdenliveSettings::v4l_extension())) {
625 KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
626 KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
628 data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
629 if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::decklink_parameters() || data.section(";", 1, 1) != KdenliveSettings::decklink_extension())) {
630 KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
631 KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
633 data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
634 if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::proxyparams() || data.section(";", 1, 1) != KdenliveSettings::proxyextension())) {
635 KdenliveSettings::setProxyparams(data.section(";", 0, 0));
636 KdenliveSettings::setProxyextension(data.section(";", 1, 1));
640 if (updateCapturePath) emit updateCaptureFolder();
642 QString value = m_configCapture.kcfg_rmd_alsa_device->itemData(m_configCapture.kcfg_rmd_alsa_device->currentIndex()).toString();
643 if (value != KdenliveSettings::rmd_alsadevicename()) {
644 KdenliveSettings::setRmd_alsadevicename(value);
647 value = m_configCapture.kcfg_v4l_alsadevice->itemData(m_configCapture.kcfg_v4l_alsadevice->currentIndex()).toString();
648 if (value != KdenliveSettings::v4l_alsadevicename()) {
649 KdenliveSettings::setV4l_alsadevicename(value);
652 value = m_configCapture.kcfg_rmd_audio_freq->itemText(m_configCapture.kcfg_rmd_audio_freq->currentIndex());
653 kDebug() << "// AUDIO FREQ VALUE: " << value << ", CURRENT: " << KdenliveSettings::rmd_freq() << ", IX: " << m_configCapture.kcfg_rmd_audio_freq->currentIndex();
654 if (value != KdenliveSettings::rmd_freq()) {
655 kDebug() << "// SETTING AUDIO FREQ TO: " << value;
656 KdenliveSettings::setRmd_freq(value);
659 if (m_configSdl.kcfg_external_display->isChecked() != KdenliveSettings::external_display()) {
660 KdenliveSettings::setExternal_display(m_configSdl.kcfg_external_display->isChecked());
664 value = m_configSdl.kcfg_audio_driver->itemData(m_configSdl.kcfg_audio_driver->currentIndex()).toString();
665 if (value != KdenliveSettings::audiodrivername()) {
666 KdenliveSettings::setAudiodrivername(value);
670 if (value == "alsa") {
671 // Audio device setting is only valid for alsa driver
672 value = m_configSdl.kcfg_audio_device->itemData(m_configSdl.kcfg_audio_device->currentIndex()).toString();
673 if (value != KdenliveSettings::audiodevicename()) {
674 KdenliveSettings::setAudiodevicename(value);
677 } else if (KdenliveSettings::audiodevicename().isEmpty() == false) {
678 KdenliveSettings::setAudiodevicename(QString::null);
682 value = m_configSdl.kcfg_video_driver->itemData(m_configSdl.kcfg_video_driver->currentIndex()).toString();
683 if (value != KdenliveSettings::videodrivername()) {
684 KdenliveSettings::setVideodrivername(value);
688 if (m_configSdl.kcfg_window_background->color() != KdenliveSettings::window_background()) {
689 KdenliveSettings::setWindow_background(m_configSdl.kcfg_window_background->color());
693 if (m_configSdl.kcfg_volume->value() != KdenliveSettings::volume()) {
694 KdenliveSettings::setVolume(m_configSdl.kcfg_volume->value());
699 // The transcoding profiles were modified, save.
701 saveTranscodeProfiles();
704 #ifdef USE_JOGSHUTTLE
705 m_shuttleModified = false;
708 actions << "monitor_pause"; // the Job rest position action.
709 foreach (KComboBox* button, m_shuttle_buttons) {
710 actions << m_mappable_actions[button->currentText()];
712 QString maps = JogShuttleConfig::actionMap(actions);
713 //fprintf(stderr, "Shuttle config: %s\n", JogShuttleConfig::actionMap(actions).toAscii().constData());
714 if (KdenliveSettings::shuttlebuttons() != maps)
715 KdenliveSettings::setShuttlebuttons(maps);
718 KConfigDialog::settingsChangedSlot();
719 //KConfigDialog::updateSettings();
720 if (resetProfile) emit doResetProfile();
723 void KdenliveSettingsDialog::slotUpdateDisplay()
725 QString currentProfile = m_configProject.kcfg_profiles_list->itemData(m_configProject.kcfg_profiles_list->currentIndex()).toString();
726 QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(currentProfile);
727 m_configProject.p_size->setText(values.value("width") + 'x' + values.value("height"));
728 m_configProject.p_fps->setText(values.value("frame_rate_num") + '/' + values.value("frame_rate_den"));
729 m_configProject.p_aspect->setText(values.value("sample_aspect_num") + '/' + values.value("sample_aspect_den"));
730 m_configProject.p_display->setText(values.value("display_aspect_num") + '/' + values.value("display_aspect_den"));
731 if (values.value("progressive").toInt() == 0)
732 m_configProject.p_progressive->setText(i18n("Interlaced"));
734 m_configProject.p_progressive->setText(i18n("Progressive"));
735 m_defaultProfile = m_configProject.kcfg_profiles_list->itemText(m_configProject.kcfg_profiles_list->currentIndex());
736 m_defaultPath = currentProfile;
739 void KdenliveSettingsDialog::slotCheckAlsaDriver()
741 QString value = m_configSdl.kcfg_audio_driver->itemData(m_configSdl.kcfg_audio_driver->currentIndex()).toString();
742 m_configSdl.kcfg_audio_device->setEnabled(value == "alsa");
745 void KdenliveSettingsDialog::loadTranscodeProfiles()
747 KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
748 KConfigGroup transConfig(config, "Transcoding");
750 m_configTranscode.profiles_list->blockSignals(true);
751 QMap< QString, QString > profiles = transConfig.entryMap();
752 QMapIterator<QString, QString> i(profiles);
753 while (i.hasNext()) {
755 QTreeWidgetItem *item = new QTreeWidgetItem(m_configTranscode.profiles_list, QStringList() << i.key() << i.value());
756 item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
758 m_configTranscode.profiles_list->blockSignals(false);
761 void KdenliveSettingsDialog::saveTranscodeProfiles()
763 KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
764 //KSharedConfigPtr config = KGlobal::config();
765 KConfigGroup transConfig(config, "Transcoding");
767 transConfig.deleteGroup();
768 int max = m_configTranscode.profiles_list->topLevelItemCount();
769 for (int i = 0; i < max; i++) {
770 QTreeWidgetItem *item = m_configTranscode.profiles_list->topLevelItem(i);
771 transConfig.writeEntry(item->text(0), item->text(1));
776 void KdenliveSettingsDialog::slotAddTranscode()
778 QTreeWidgetItem *item = new QTreeWidgetItem(m_configTranscode.profiles_list, QStringList() << i18n("Name") << i18n("Parameters"));
779 item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
780 m_configTranscode.profiles_list->setCurrentItem(item);
781 m_configTranscode.profiles_list->editItem(item);
782 slotDialogModified();
785 void KdenliveSettingsDialog::slotDeleteTranscode()
787 QTreeWidgetItem *item = m_configTranscode.profiles_list->currentItem();
788 if (item == NULL) return;
790 slotDialogModified();
793 void KdenliveSettingsDialog::slotShuttleModified()
795 #ifdef USE_JOGSHUTTLE
797 actions << "monitor_pause"; // the Job rest position action.
798 foreach (KComboBox* button, m_shuttle_buttons) {
799 actions << m_mappable_actions[button->currentText()];
801 QString maps = JogShuttleConfig::actionMap(actions);
802 m_shuttleModified = KdenliveSettings::shuttlebuttons() != maps;
804 KConfigDialog::updateButtons();
807 void KdenliveSettingsDialog::slotDialogModified()
810 KConfigDialog::updateButtons();
814 bool KdenliveSettingsDialog::hasChanged()
816 if (m_modified || m_shuttleModified) return true;
817 return KConfigDialog::hasChanged();
820 void KdenliveSettingsDialog::slotUpdatev4lDevice()
822 QString device = m_configCapture.kcfg_detectedv4ldevices->itemData(m_configCapture.kcfg_detectedv4ldevices->currentIndex()).toString();
823 if (!device.isEmpty()) m_configCapture.kcfg_video4vdevice->setText(device);
824 QString info = m_configCapture.kcfg_detectedv4ldevices->itemData(m_configCapture.kcfg_detectedv4ldevices->currentIndex(), Qt::UserRole + 1).toString();
826 m_configCapture.kcfg_v4l_format->blockSignals(true);
827 m_configCapture.kcfg_v4l_format->clear();
829 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
830 if (QFile::exists(vl4ProfilePath)) {
831 m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
834 QStringList pixelformats = info.split(">", QString::SkipEmptyParts);
837 QStringList itemRates;
838 for (int i = 0; i < pixelformats.count(); i++) {
839 QString format = pixelformats.at(i).section(':', 0, 0);
840 QStringList sizes = pixelformats.at(i).split(":", QString::SkipEmptyParts);
841 pixelFormat = sizes.takeFirst();
842 for (int j = 0; j < sizes.count(); j++) {
843 itemSize = sizes.at(j).section("=", 0, 0);
844 itemRates = sizes.at(j).section("=", 1, 1).split(",", QString::SkipEmptyParts);
845 for (int k = 0; k < itemRates.count(); k++) {
846 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));
850 m_configCapture.kcfg_v4l_format->blockSignals(false);
851 slotUpdatev4lCaptureProfile();
854 void KdenliveSettingsDialog::slotUpdatev4lCaptureProfile()
856 QStringList info = m_configCapture.kcfg_v4l_format->itemData(m_configCapture.kcfg_v4l_format->currentIndex(), Qt::UserRole).toStringList();
857 if (info.isEmpty()) {
858 // No auto info, display the current ones
859 loadCurrentV4lProfileInfo();
862 m_configCapture.p_size->setText(info.at(1) + 'x' + info.at(2));
863 m_configCapture.p_fps->setText(info.at(3) + '/' + info.at(4));
864 m_configCapture.p_aspect->setText("1/1");
865 m_configCapture.p_display->setText(info.at(1) + '/' + info.at(2));
866 m_configCapture.p_colorspace->setText(ProfilesDialog::getColorspaceDescription(601));
867 m_configCapture.p_progressive->setText(i18n("Progressive"));
869 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
870 if (!QFile::exists(vl4ProfilePath)) saveCurrentV4lProfile();
873 void KdenliveSettingsDialog::loadCurrentV4lProfileInfo()
875 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
876 MltVideoProfile prof;
877 if (!QFile::exists(vl4ProfilePath)) {
878 // No default formats found, build one
881 prof.frame_rate_num = 15;
882 prof.frame_rate_den = 1;
883 prof.display_aspect_num = 4;
884 prof.display_aspect_den = 3;
885 prof.sample_aspect_num = 1;
886 prof.sample_aspect_den = 1;
887 prof.progressive = 1;
888 prof.colorspace = 601;
889 ProfilesDialog::saveProfile(prof, vl4ProfilePath);
891 else prof = ProfilesDialog::getVideoProfile(vl4ProfilePath);
892 m_configCapture.p_size->setText(QString::number(prof.width) + 'x' + QString::number(prof.height));
893 m_configCapture.p_fps->setText(QString::number(prof.frame_rate_num) + '/' + QString::number(prof.frame_rate_den));
894 m_configCapture.p_aspect->setText(QString::number(prof.sample_aspect_num) + '/' + QString::number(prof.sample_aspect_den));
895 m_configCapture.p_display->setText(QString::number(prof.display_aspect_num) + '/' + QString::number(prof.display_aspect_den));
896 m_configCapture.p_colorspace->setText(ProfilesDialog::getColorspaceDescription(prof.colorspace));
897 if (prof.progressive) m_configCapture.p_progressive->setText(i18n("Progressive"));
900 void KdenliveSettingsDialog::saveCurrentV4lProfile()
902 MltVideoProfile profile;
903 profile.description = "Video4Linux capture";
904 profile.colorspace = ProfilesDialog::getColorspaceFromDescription(m_configCapture.p_colorspace->text());
905 profile.width = m_configCapture.p_size->text().section('x', 0, 0).toInt();
906 profile.height = m_configCapture.p_size->text().section('x', 1, 1).toInt();
907 profile.sample_aspect_num = m_configCapture.p_aspect->text().section('/', 0, 0).toInt();
908 profile.sample_aspect_den = m_configCapture.p_aspect->text().section('/', 1, 1).toInt();
909 profile.display_aspect_num = m_configCapture.p_display->text().section('/', 0, 0).toInt();
910 profile.display_aspect_den = m_configCapture.p_display->text().section('/', 1, 1).toInt();
911 profile.frame_rate_num = m_configCapture.p_fps->text().section('/', 0, 0).toInt();
912 profile.frame_rate_den = m_configCapture.p_fps->text().section('/', 1, 1).toInt();
913 profile.progressive = m_configCapture.p_progressive->text() == i18n("Progressive");
914 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
915 ProfilesDialog::saveProfile(profile, vl4ProfilePath);
918 void KdenliveSettingsDialog::slotManageEncodingProfile()
921 if (currentPage() == m_page4) {
922 if (m_configCapture.tabWidget->currentIndex() == 1) type = 1;
923 else if (m_configCapture.tabWidget->currentIndex() == 3) type = 2;
925 EncodingProfilesDialog *d = new EncodingProfilesDialog(type);
928 loadEncodingProfiles();
931 void KdenliveSettingsDialog::loadEncodingProfiles()
933 KConfig conf("encodingprofiles.rc", KConfig::FullConfig, "appdata");
936 m_configCapture.kcfg_v4l_profile->blockSignals(true);
937 QString currentItem = m_configCapture.kcfg_v4l_profile->currentText();
938 m_configCapture.kcfg_v4l_profile->clear();
939 KConfigGroup group(&conf, "video4linux");
940 QMap< QString, QString > values = group.entryMap();
941 QMapIterator<QString, QString> i(values);
942 while (i.hasNext()) {
944 if (!i.key().isEmpty()) m_configCapture.kcfg_v4l_profile->addItem(i.key(), i.value());
946 m_configCapture.kcfg_v4l_profile->blockSignals(false);
947 if (!currentItem.isEmpty()) m_configCapture.kcfg_v4l_profile->setCurrentIndex(m_configCapture.kcfg_v4l_profile->findText(currentItem));
949 // Load Decklink profiles
950 m_configCapture.kcfg_decklink_profile->blockSignals(true);
951 currentItem = m_configCapture.kcfg_decklink_profile->currentText();
952 m_configCapture.kcfg_decklink_profile->clear();
953 KConfigGroup group2(&conf, "decklink");
954 values = group2.entryMap();
955 QMapIterator<QString, QString> j(values);
956 while (j.hasNext()) {
958 if (!j.key().isEmpty()) m_configCapture.kcfg_decklink_profile->addItem(j.key(), j.value());
960 m_configCapture.kcfg_decklink_profile->blockSignals(false);
961 if (!currentItem.isEmpty()) m_configCapture.kcfg_decklink_profile->setCurrentIndex(m_configCapture.kcfg_decklink_profile->findText(currentItem));
963 // Load Proxy profiles
964 m_configProject.kcfg_proxy_profile->blockSignals(true);
965 currentItem = m_configProject.kcfg_proxy_profile->currentText();
966 m_configProject.kcfg_proxy_profile->clear();
967 KConfigGroup group3(&conf, "proxy");
968 values = group3.entryMap();
969 QMapIterator<QString, QString> k(values);
970 while (k.hasNext()) {
972 if (!k.key().isEmpty()) m_configProject.kcfg_proxy_profile->addItem(k.key(), k.value());
974 if (!currentItem.isEmpty()) m_configProject.kcfg_proxy_profile->setCurrentIndex(m_configProject.kcfg_proxy_profile->findText(currentItem));
975 m_configProject.kcfg_proxy_profile->blockSignals(false);
976 slotUpdateProxyProfile();
980 void KdenliveSettingsDialog::slotUpdateDecklinkProfile(int ix)
982 if (ix == -1) ix = KdenliveSettings::decklink_profile();
983 else ix = m_configCapture.kcfg_decklink_profile->currentIndex();
984 QString data = m_configCapture.kcfg_decklink_profile->itemData(ix).toString();
985 if (data.isEmpty()) return;
986 m_configCapture.decklink_parameters->setPlainText(data.section(";", 0, 0));
990 void KdenliveSettingsDialog::slotUpdateV4lProfile(int ix)
992 if (ix == -1) ix = KdenliveSettings::v4l_profile();
993 else ix = m_configCapture.kcfg_v4l_profile->currentIndex();
994 QString data = m_configCapture.kcfg_v4l_profile->itemData(ix).toString();
995 if (data.isEmpty()) return;
996 m_configCapture.v4l_parameters->setPlainText(data.section(";", 0, 0));
1000 void KdenliveSettingsDialog::slotUpdateProxyProfile(int ix)
1002 if (ix == -1) ix = KdenliveSettings::v4l_profile();
1003 else ix = m_configProject.kcfg_proxy_profile->currentIndex();
1004 QString data = m_configProject.kcfg_proxy_profile->itemData(ix).toString();
1005 if (data.isEmpty()) return;
1006 m_configProject.proxyparams->setPlainText(data.section(";", 0, 0));
1010 void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
1012 QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
1013 ProfilesDialog *w = new ProfilesDialog(vl4ProfilePath);
1014 if (w->exec() == QDialog::Accepted) {
1015 // save and update profile
1016 loadCurrentV4lProfileInfo();
1021 #include "kdenlivesettingsdialog.moc"