1 /***************************************************************************
2 * Copyright (C) 2007 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 ***************************************************************************/
21 #include "kdenlivesettings.h"
22 #include "profilesdialog.h"
23 #include "kdenlive-config.h"
25 #include <KStandardDirs>
28 #include <kmimetype.h>
33 #include <QXmlStreamWriter>
36 const double recommendedMltVersion = 40;
37 static const char version[] = VERSION;
39 Wizard::Wizard(bool upgrade, QWidget *parent) :
42 setWindowTitle(i18n("Config Wizard"));
43 setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
45 QWizardPage *page1 = new QWizardPage;
46 page1->setTitle(i18n("Welcome"));
49 label = new QLabel(i18n("Your Kdenlive version was upgraded to version %1. Please take some time to review the basic settings", QString(version).section(' ', 0, 0)));
51 label = new QLabel(i18n("This is the first time you run Kdenlive. This wizard will let you adjust some basic settings, you will be ready to edit your first movie in a few seconds..."));
52 label->setWordWrap(true);
53 m_startLayout = new QVBoxLayout;
54 m_startLayout->addWidget(label);
55 QPushButton *but = new QPushButton(KIcon("help-about"), i18n("Discover the features of this Kdenlive release"), this);
56 connect(but, SIGNAL(clicked()), this, SLOT(slotShowWebInfos()));
57 m_startLayout->addStretch();
58 m_startLayout->addWidget(but);
61 page1->setLayout(m_startLayout);
64 QWizardPage *page4 = new QWizardPage;
65 page4->setTitle(i18n("Checking MLT engine"));
66 m_mltCheck.setupUi(page4);
69 WizardDelegate *listViewDelegate = new WizardDelegate(m_mltCheck.programList);
70 m_mltCheck.programList->setItemDelegate(listViewDelegate);
72 QWizardPage *page2 = new QWizardPage;
73 page2->setTitle(i18n("Video Standard"));
74 m_standard.setupUi(page2);
76 m_okIcon = KIcon("dialog-ok");
77 m_badIcon = KIcon("dialog-close");
79 // build profiles lists
80 QMap<QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
81 QMap<QString, QString>::const_iterator i = profilesInfo.constBegin();
82 while (i != profilesInfo.constEnd()) {
83 QMap< QString, QString > profileData = ProfilesDialog::getSettingsFromFile(i.value());
84 if (profileData.value("width") == "720") m_dvProfiles.insert(i.key(), i.value());
85 else if (profileData.value("width").toInt() >= 1080) m_hdvProfiles.insert(i.key(), i.value());
86 else m_otherProfiles.insert(i.key(), i.value());
90 m_standard.button_all->setChecked(true);
91 connect(m_standard.button_all, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
92 connect(m_standard.button_hdv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
93 connect(m_standard.button_dv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
95 connect(m_standard.profiles_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckSelectedItem()));
98 if (!KdenliveSettings::default_profile().isEmpty()) {
99 for (int i = 0; i < m_standard.profiles_list->count(); i++) {
100 if (m_standard.profiles_list->item(i)->data(Qt::UserRole).toString() == KdenliveSettings::default_profile()) {
101 m_standard.profiles_list->setCurrentRow(i);
102 m_standard.profiles_list->scrollToItem(m_standard.profiles_list->currentItem());
108 // select default profile
109 fprintf(stderr, "LOOKING FOR: %s", ProfilesDialog::getProfileDescription(KdenliveSettings::default_profile()).toUtf8().data());
110 QList<QListWidgetItem *> profiles = m_standard.profiles_list->findItems(ProfilesDialog::getProfileDescription(KdenliveSettings::default_profile()), Qt::MatchExactly);
111 if (profiles.count() > 0) m_standard.profiles_list->setCurrentItem(profiles.at(0));
113 fprintf(stderr, "LOOKING FOR: %s // %d", ProfilesDialog::getProfileDescription(KdenliveSettings::default_profile()).toUtf8().data(), profiles.count());
116 QWizardPage *page3 = new QWizardPage;
117 page3->setTitle(i18n("Additional Settings"));
118 m_extra.setupUi(page3);
119 m_extra.projectfolder->setMode(KFile::Directory);
120 m_extra.projectfolder->setPath(KdenliveSettings::defaultprojectfolder());
121 m_extra.videothumbs->setChecked(KdenliveSettings::videothumbnails());
122 m_extra.audiothumbs->setChecked(KdenliveSettings::audiothumbnails());
123 m_extra.autosave->setChecked(KdenliveSettings::crashrecovery());
124 connect(m_extra.videothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
125 connect(m_extra.audiothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
130 QWizardPage *page5 = new QWizardPage;
131 page5->setTitle(i18n("Checking system"));
132 m_check.setupUi(page5);
135 listViewDelegate = new WizardDelegate(m_check.programList);
136 m_check.programList->setItemDelegate(listViewDelegate);
138 QTimer::singleShot(500, this, SLOT(slotCheckMlt()));
142 void Wizard::checkMltComponents()
144 m_mltCheck.programList->setColumnCount(2);
145 m_mltCheck.programList->setRootIsDecorated(false);
146 m_mltCheck.programList->setHeaderHidden(true);
147 QSize itemSize(20, fontMetrics().height() * 2.5);
148 m_mltCheck.programList->setColumnWidth(0, 30);
149 m_mltCheck.programList->setIconSize(QSize(24, 24));
152 QTreeWidgetItem *mltitem = new QTreeWidgetItem(m_mltCheck.programList);
154 QTreeWidgetItem *meltitem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Melt") + " (" + KdenliveSettings::rendererpath() + ')');
155 meltitem->setData(1, Qt::UserRole, i18n("Required for rendering (part of MLT package)"));
156 meltitem->setSizeHint(0, itemSize);
157 meltitem->setIcon(0, m_okIcon);
159 // Check MLT's installed producers
160 QProcess checkProcess;
161 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
162 if (!checkProcess.waitForStarted()) {
163 meltitem->setIcon(0, m_badIcon);
164 meltitem->setData(1, Qt::UserRole, i18n("Error starting MLT's command line player (melt)"));
165 button(QWizard::NextButton)->setEnabled(false);
167 checkProcess.waitForFinished();
168 QByteArray result = checkProcess.readAllStandardError();
170 // Check MLT avformat module
171 QTreeWidgetItem *avformatItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Avformat module (FFmpeg)"));
172 avformatItem->setData(1, Qt::UserRole, i18n("Required to work with various video formats (hdv, mpeg, flash, ...)"));
173 avformatItem->setSizeHint(0, itemSize);
174 if (!result.contains("- avformat")) {
175 avformatItem->setIcon(0, m_badIcon);
176 m_mltCheck.tabWidget->setTabEnabled(1, false);
178 avformatItem->setIcon(0, m_okIcon);
179 // Make sure we have MLT > 0.3.4
182 QString exepath = KStandardDirs::findExe("pkg-config");
183 if (!exepath.isEmpty()) {
184 checkProcess.start(exepath, QStringList() << "--variable=version" << "mlt++");
185 if (!checkProcess.waitForStarted()) {
186 kDebug() << "// Error querying MLT's version";
188 checkProcess.waitForFinished();
189 mltVersion = checkProcess.readAllStandardOutput();
190 version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
191 kDebug() << "// FOUND MLT's pkgconfig version: " << version;
195 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "--version");
196 if (!checkProcess.waitForStarted()) {
197 kDebug() << "// Error querying MLT's version";
199 checkProcess.waitForFinished();
200 mltVersion = checkProcess.readAllStandardError();
201 mltVersion = mltVersion.section('\n', 0, 0).simplified();
202 mltVersion = mltVersion.section(' ', -1).simplified();
203 version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
204 kDebug() << "// FOUND MLT version: " << version;
208 mltitem->setText(1, i18n("MLT version: %1", mltVersion.simplified()));
209 mltitem->setSizeHint(0, itemSize);
211 mltitem->setData(1, Qt::UserRole, i18n("Your MLT version is unsupported!!!"));
212 mltitem->setIcon(0, m_badIcon);
214 if (version < recommendedMltVersion) {
215 mltitem->setData(1, Qt::UserRole, i18n("Please upgrade to the latest MLT version"));
216 mltitem->setIcon(0, m_badIcon);
218 mltitem->setData(1, Qt::UserRole, i18n("MLT version is correct"));
219 mltitem->setIcon(0, m_okIcon);
221 // Check installed audio codecs
222 QProcess checkProcess2;
223 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "acodec=list");
224 if (!checkProcess2.waitForStarted()) {
225 m_mltCheck.tabWidget->setTabEnabled(1, false);
226 kDebug() << "// Error parsing MLT's avformat codecs";
228 checkProcess2.waitForFinished();
229 QByteArray codecList = checkProcess2.readAllStandardError();
230 QString acodecList(codecList);
232 QStringList alist = acodecList.split('\n', QString::SkipEmptyParts);
233 for (int i = 0; i < alist.count(); i++) {
234 if (alist.at(i).contains("- ")) result.append(alist.at(i).section("- ", 1).simplified().toLower());
236 m_mltCheck.acodecs_list->addItems(result);
237 KdenliveSettings::setAudiocodecs(result);
238 //kDebug()<<"// FOUND LIST:\n\n"<<m_audioCodecs<<"\n\n++++++++++++++++++++";
240 // Check video codecs
241 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "vcodec=list");
242 if (!checkProcess2.waitForStarted()) {
243 kDebug() << "// Error parsing MLT's avformat codecs";
245 checkProcess2.waitForFinished();
246 QByteArray codecList = checkProcess2.readAllStandardError();
247 QString vcodecList(codecList);
249 QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts);
250 for (int i = 0; i < vlist.count(); i++) {
251 if (vlist.at(i).contains("- ")) result.append(vlist.at(i).section("- ", 1).simplified().toLower());
253 m_mltCheck.vcodecs_list->addItems(result);
254 KdenliveSettings::setVideocodecs(result);
255 //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
258 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "f=list");
259 if (!checkProcess2.waitForStarted()) {
260 kDebug() << "// Error parsing MLT's avformat codecs";
262 checkProcess2.waitForFinished();
263 QByteArray codecList = checkProcess2.readAllStandardError();
264 QString vcodecList(codecList);
266 QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts);
267 for (int i = 0; i < vlist.count(); i++) {
268 if (vlist.at(i).contains("- ")) {
269 QString format = vlist.at(i).section("- ", 1).simplified().toLower();
270 if (format.contains(',')) {
271 QStringList sub = format.split(',', QString::SkipEmptyParts);
272 for (int j = 0; j < sub.count(); j++)
273 result.append(sub.at(j));
274 } else result.append(format);
277 m_mltCheck.formats_list->addItems(result);
278 KdenliveSettings::setSupportedformats(result);
279 //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
285 // Check MLT dv module
286 QTreeWidgetItem *dvItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("DV module (libdv)"));
287 dvItem->setData(1, Qt::UserRole, i18n("Required to work with dv files if avformat module is not installed"));
288 dvItem->setSizeHint(0, itemSize);
289 if (!result.contains("- libdv")) {
290 dvItem->setIcon(0, m_badIcon);
292 dvItem->setIcon(0, m_okIcon);
295 // Check MLT image format module
296 QTreeWidgetItem *imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("QImage module"));
297 imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
298 imageItem->setSizeHint(0, itemSize);
299 if (!result.contains("- qimage")) {
300 imageItem->setIcon(0, m_badIcon);
301 imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Pixbuf module"));
302 imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
303 imageItem->setSizeHint(0, itemSize);
304 if (!result.contains("- pixbuf")) imageItem->setIcon(0, m_badIcon);
305 else imageItem->setIcon(0, m_okIcon);
307 imageItem->setIcon(0, m_okIcon);
312 void Wizard::slotCheckPrograms()
314 m_check.programList->setColumnCount(2);
315 m_check.programList->setRootIsDecorated(false);
316 m_check.programList->setHeaderHidden(true);
317 QSize itemSize(20, fontMetrics().height() * 2.5);
318 m_check.programList->setColumnWidth(0, 30);
319 m_check.programList->setIconSize(QSize(24, 24));
321 QTreeWidgetItem *item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("FFmpeg & ffplay"));
322 item->setData(1, Qt::UserRole, i18n("Required for webcam capture"));
323 item->setSizeHint(0, itemSize);
324 QString exepath = KStandardDirs::findExe("ffmpeg");
325 if (exepath.isEmpty()) item->setIcon(0, m_badIcon);
326 else if (KStandardDirs::findExe("ffplay").isEmpty()) item->setIcon(0, m_badIcon);
327 else item->setIcon(0, m_okIcon);
329 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Recordmydesktop"));
330 item->setData(1, Qt::UserRole, i18n("Required for screen capture"));
331 item->setSizeHint(0, itemSize);
332 if (KStandardDirs::findExe("recordmydesktop").isEmpty()) item->setIcon(0, m_badIcon);
333 else item->setIcon(0, m_okIcon);
335 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvgrab"));
336 item->setData(1, Qt::UserRole, i18n("Required for firewire capture"));
337 item->setSizeHint(0, itemSize);
338 if (KStandardDirs::findExe("dvgrab").isEmpty()) item->setIcon(0, m_badIcon);
339 else item->setIcon(0, m_okIcon);
341 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvdauthor"));
342 item->setData(1, Qt::UserRole, i18n("Required for creation of DVD"));
343 item->setSizeHint(0, itemSize);
344 if (KStandardDirs::findExe("dvdauthor").isEmpty()) item->setIcon(0, m_badIcon);
345 else item->setIcon(0, m_okIcon);
347 item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Mkisofs"));
348 item->setData(1, Qt::UserRole, i18n("Required for creation of DVD ISO images"));
349 item->setSizeHint(0, itemSize);
350 if (KStandardDirs::findExe("mkisofs").isEmpty()) item->setIcon(0, m_badIcon);
351 else item->setIcon(0, m_okIcon);
355 void Wizard::installExtraMimes(QString baseName, QStringList globs)
357 QString mimefile = baseName;
358 mimefile.replace('/', '-');
359 KMimeType::Ptr mime = KMimeType::mimeType(baseName);
361 kDebug() << "KMimeTypeTrader: mimeType " << baseName << " not found";
363 QStringList extensions = mime->patterns();
364 QString comment = mime->comment();
365 foreach(const QString &glob, globs) {
366 if (!extensions.contains(glob)) extensions << glob;
368 kDebug() << "EXTS: " << extensions;
369 QString packageFileName = KStandardDirs::locateLocal("xdgdata-mime", "packages/" + mimefile + ".xml");
370 kDebug() << "INSTALLING NEW MIME TO: " << packageFileName;
371 QFile packageFile(packageFileName);
372 if (!packageFile.open(QIODevice::WriteOnly)) {
373 kError() << "Couldn't open" << packageFileName << "for writing";
376 QXmlStreamWriter writer(&packageFile);
377 writer.setAutoFormatting(true);
378 writer.writeStartDocument();
380 const QString nsUri = "http://www.freedesktop.org/standards/shared-mime-info";
381 writer.writeDefaultNamespace(nsUri);
382 writer.writeStartElement("mime-info");
383 writer.writeStartElement(nsUri, "mime-type");
384 writer.writeAttribute("type", baseName);
386 if (!comment.isEmpty()) {
387 writer.writeStartElement(nsUri, "comment");
388 writer.writeCharacters(comment);
389 writer.writeEndElement(); // comment
392 foreach(const QString& pattern, extensions) {
393 writer.writeStartElement(nsUri, "glob");
394 writer.writeAttribute("pattern", pattern);
395 writer.writeEndElement(); // glob
398 writer.writeEndElement(); // mime-info
399 writer.writeEndElement(); // mime-type
400 writer.writeEndDocument();
404 void Wizard::runUpdateMimeDatabase()
406 const QString localPackageDir = KStandardDirs::locateLocal("xdgdata-mime", QString());
407 //Q_ASSERT(!localPackageDir.isEmpty());
409 proc << "update-mime-database";
410 proc << localPackageDir;
411 const int exitCode = proc.execute();
413 kWarning() << proc.program() << "exited with error code" << exitCode;
417 void Wizard::slotCheckThumbs()
419 QString pixname = "timeline_vthumbs.png";
420 if (!m_extra.audiothumbs->isChecked() && !m_extra.videothumbs->isChecked()) {
421 pixname = "timeline_nothumbs.png";
422 } else if (m_extra.audiothumbs->isChecked()) {
423 if (m_extra.videothumbs->isChecked())
424 pixname = "timeline_avthumbs.png";
425 else pixname = "timeline_athumbs.png";
428 m_extra.timeline_preview->setPixmap(QPixmap(KStandardDirs::locate("appdata", pixname)));
431 void Wizard::slotCheckStandard()
433 m_standard.profiles_list->clear();
434 QStringList profiles;
435 if (!m_standard.button_hdv->isChecked()) {
437 QMapIterator<QString, QString> i(m_dvProfiles);
438 while (i.hasNext()) {
440 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
441 item->setData(Qt::UserRole, i.value());
444 if (!m_standard.button_dv->isChecked()) {
446 QMapIterator<QString, QString> i(m_hdvProfiles);
447 while (i.hasNext()) {
449 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
450 item->setData(Qt::UserRole, i.value());
453 if (m_standard.button_all->isChecked()) {
454 QMapIterator<QString, QString> i(m_otherProfiles);
455 while (i.hasNext()) {
457 QListWidgetItem *item = new QListWidgetItem(i.key(), m_standard.profiles_list);
458 item->setData(Qt::UserRole, i.value());
460 //m_standard.profiles_list->sortItems();
463 for (int i = 0; i < m_standard.profiles_list->count(); i++) {
464 QListWidgetItem *item = m_standard.profiles_list->item(i);
466 QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(item->data(Qt::UserRole).toString());
467 const QString infoString = ("<strong>" + i18n("Frame size:") + " </strong>%1x%2<br /><strong>" + i18n("Frame rate:") + " </strong>%3/%4<br /><strong>" + i18n("Pixel aspect ratio:") + "</strong>%5/%6<br /><strong>" + i18n("Display aspect ratio:") + " </strong>%7/%8").arg(values.value("width"), values.value("height"), values.value("frame_rate_num"), values.value("frame_rate_den"), values.value("sample_aspect_num"), values.value("sample_aspect_den"), values.value("display_aspect_num"), values.value("display_aspect_den"));
468 item->setToolTip(infoString);
471 m_standard.profiles_list->setSortingEnabled(true);
472 m_standard.profiles_list->setCurrentRow(0);
475 void Wizard::slotCheckSelectedItem()
477 // Make sure we always have an item highlighted
478 m_standard.profiles_list->setCurrentRow(m_standard.profiles_list->currentRow());
482 void Wizard::adjustSettings()
484 if (m_extra.installmimes->isChecked()) {
486 globs << "*.mts" << "*.m2t" << "*.mod" << "*.ts" << "*.m2ts";
487 installExtraMimes("video/mpeg", globs);
490 installExtraMimes("video/dv", globs);
491 runUpdateMimeDatabase();
493 KdenliveSettings::setAudiothumbnails(m_extra.audiothumbs->isChecked());
494 KdenliveSettings::setVideothumbnails(m_extra.videothumbs->isChecked());
495 KdenliveSettings::setCrashrecovery(m_extra.autosave->isChecked());
496 if (m_standard.profiles_list->currentItem()) {
497 QString selectedProfile = m_standard.profiles_list->currentItem()->data(Qt::UserRole).toString();
498 if (selectedProfile.isEmpty()) selectedProfile = "dv_pal";
499 KdenliveSettings::setDefault_profile(selectedProfile);
501 QString path = m_extra.projectfolder->url().path();
502 if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
503 KdenliveSettings::setDefaultprojectfolder(path);
507 void Wizard::slotCheckMlt()
509 QString errorMessage;
510 if (KdenliveSettings::rendererpath().isEmpty()) {
511 errorMessage.append(i18n("Your MLT installation cannot be found. Install MLT and restart Kdenlive.\n"));
513 /*QProcess checkProcess;
514 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
515 if (!checkProcess.waitForStarted())
516 errorMessage.append(i18n("Error starting MLT's command line player (melt)") + ".\n");
518 checkProcess.waitForFinished();
520 QByteArray result = checkProcess.readAllStandardError();
521 if (!result.contains("- avformat")) errorMessage.append(i18n("MLT's avformat (FFMPEG) module not found. Please check your FFMPEG and MLT install. Kdenlive will not work until this issue is fixed.") + "\n");*/
523 QProcess checkProcess2;
524 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "consumer");
525 if (!checkProcess2.waitForStarted())
526 errorMessage.append(i18n("Error starting MLT's command line player (melt).") + '\n');
528 checkProcess2.waitForFinished();
530 QByteArray result = checkProcess2.readAllStandardError();
531 if (!result.contains("sdl") || !result.contains("sdl_preview")) errorMessage.append(i18n("MLT's SDL module not found. Please check your MLT install. Kdenlive will not work until this issue is fixed.") + '\n');
533 if (!errorMessage.isEmpty()) {
534 errorMessage.prepend(QString("<b>%1</b><br>").arg(i18n("Fatal Error")));
535 QLabel *pix = new QLabel();
536 pix->setPixmap(KIcon("dialog-error").pixmap(30));
537 QLabel *label = new QLabel(errorMessage);
538 label->setWordWrap(true);
539 m_startLayout->addSpacing(40);
540 m_startLayout->addWidget(pix);
541 m_startLayout->addWidget(label);
542 m_systemCheckIsOk = false;
543 button(QWizard::NextButton)->setEnabled(false);
544 } else m_systemCheckIsOk = true;
546 if (m_systemCheckIsOk) checkMltComponents();
550 bool Wizard::isOk() const
552 return m_systemCheckIsOk;
555 bool Wizard::slotShowWebInfos()
557 KRun::runUrl(KUrl("http://kdenlive.org/discover/" + QString(version).section(' ', 0, 0)), "text/html", this);
560 #include "wizard.moc"