]> git.sesse.net Git - kdenlive/blob - src/wizard.cpp
Detect MLT version and don't query for available codecs if version < 0.3.5. Workaroun...
[kdenlive] / src / wizard.cpp
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
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.                                   *
8  *                                                                         *
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.                          *
13  *                                                                         *
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  ***************************************************************************/
19
20 #include <QLabel>
21 #include <QFile>
22 #include <QXmlStreamWriter>
23 #include <QApplication>
24 #include <QTimer>
25
26 #include <KStandardDirs>
27 #include <KLocale>
28 #include <KProcess>
29 #include <kmimetype.h>
30
31 #include "kdenlivesettings.h"
32 #include "profilesdialog.h"
33 #include "wizard.h"
34
35 Wizard::Wizard(QWidget *parent): QWizard(parent) {
36     setPixmap(QWizard::WatermarkPixmap, QPixmap(KStandardDirs::locate("appdata", "banner.png")));
37
38     QWizardPage *page1 = new QWizardPage;
39     page1->setTitle(i18n("Welcome"));
40     QLabel *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..."));
41     label->setWordWrap(true);
42     m_startLayout = new QVBoxLayout;
43     m_startLayout->addWidget(label);
44     page1->setLayout(m_startLayout);
45     addPage(page1);
46
47     QWizardPage *page4 = new QWizardPage;
48     page4->setTitle(i18n("Checking MLT engine"));
49     m_mltCheck.setupUi(page4);
50     addPage(page4);
51
52     WizardDelegate *listViewDelegate = new WizardDelegate(m_mltCheck.programList);
53     m_mltCheck.programList->setItemDelegate(listViewDelegate);
54
55     QWizardPage *page2 = new QWizardPage;
56     page2->setTitle(i18n("Video Standard"));
57     m_standard.setupUi(page2);
58
59     // build profiles lists
60     m_profilesInfo = ProfilesDialog::getProfilesInfo();
61     QMap<QString, QString>::const_iterator i = m_profilesInfo.constBegin();
62     while (i != m_profilesInfo.constEnd()) {
63         QMap< QString, QString > profileData = ProfilesDialog::getSettingsFromFile(i.value());
64         if (profileData.value("width") == "720") m_dvProfiles.append(i.key());
65         else if (profileData.value("width").toInt() >= 1080) m_hdvProfiles.append(i.key());
66         else m_otherProfiles.append(i.key());
67         ++i;
68     }
69
70     connect(m_standard.button_all, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
71     connect(m_standard.button_hdv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
72     connect(m_standard.button_dv, SIGNAL(toggled(bool)), this, SLOT(slotCheckStandard()));
73     m_standard.button_all->setChecked(true);
74     connect(m_standard.profiles_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckSelectedItem()));
75
76     // select default profile
77     QList<QListWidgetItem *> profiles = m_standard.profiles_list->findItems(ProfilesDialog::getProfileDescription(KdenliveSettings::default_profile()), Qt::MatchExactly);
78     if (profiles.count() > 0) m_standard.profiles_list->setCurrentItem(profiles.at(0));
79     addPage(page2);
80
81     QWizardPage *page3 = new QWizardPage;
82     page3->setTitle(i18n("Additional Settings"));
83     m_extra.setupUi(page3);
84     m_extra.projectfolder->setMode(KFile::Directory);
85     m_extra.projectfolder->setPath(QDir::homePath() + "/kdenlive");
86     m_extra.videothumbs->setChecked(KdenliveSettings::videothumbnails());
87     m_extra.audiothumbs->setChecked(KdenliveSettings::audiothumbnails());
88     m_extra.autosave->setChecked(KdenliveSettings::crashrecovery());
89     connect(m_extra.videothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
90     connect(m_extra.audiothumbs, SIGNAL(stateChanged(int)), this, SLOT(slotCheckThumbs()));
91     slotCheckThumbs();
92     addPage(page3);
93
94
95     QWizardPage *page5 = new QWizardPage;
96     page5->setTitle(i18n("Checking system"));
97     m_check.setupUi(page5);
98     slotCheckPrograms();
99     addPage(page5);
100
101     listViewDelegate = new WizardDelegate(m_check.programList);
102     m_check.programList->setItemDelegate(listViewDelegate);
103
104     QTimer::singleShot(500, this, SLOT(slotCheckMlt()));
105 }
106
107
108 void Wizard::checkMltComponents() {
109     m_mltCheck.programList->setColumnCount(2);
110     m_mltCheck.programList->setRootIsDecorated(false);
111     m_mltCheck.programList->setHeaderHidden(true);
112     QSize itemSize(20, this->fontMetrics().height() * 2.5);
113     KIcon okIcon("dialog-ok");
114     KIcon missingIcon("dialog-close");
115     m_mltCheck.programList->setColumnWidth(0, 30);
116     m_mltCheck.programList->setIconSize(QSize(24, 24));
117
118
119     QTreeWidgetItem *item = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Inigo") + " (" + KdenliveSettings::rendererpath() + ')');
120     item->setData(1, Qt::UserRole, i18n("Required for rendering (part of MLT package)"));
121     item->setSizeHint(0, itemSize);
122     item->setIcon(0, okIcon);
123
124     // Check MLT's installed producers
125     QProcess checkProcess;
126     checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
127     if (!checkProcess.waitForStarted()) {
128         item->setIcon(0, missingIcon);
129         item->setData(1, Qt::UserRole, i18n("Error starting MLT's command line player (inigo)"));
130         button(QWizard::NextButton)->setEnabled(false);
131     } else {
132         checkProcess.waitForFinished();
133         QByteArray result = checkProcess.readAllStandardError();
134
135         // Check MLT avformat module
136         QTreeWidgetItem *avformatItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Avformat module (FFmpeg)"));
137         avformatItem->setData(1, Qt::UserRole, i18n("Required to work with various video formats (hdv, mpeg, flash, ...)"));
138         avformatItem->setSizeHint(0, itemSize);
139         if (!result.contains("- avformat")) {
140             avformatItem->setIcon(0, missingIcon);
141             m_mltCheck.tabWidget->setTabEnabled(1, false);
142         } else {
143             avformatItem->setIcon(0, okIcon);
144             // Make sure we have MLT > 0.3.4
145             bool recentMlt = false;
146             QString exepath = KStandardDirs::findExe("pkg-config");
147             if (!exepath.isEmpty()) {
148                 checkProcess.start(exepath, QStringList() << "--variable=version" << "mlt-framework");
149                 if (!checkProcess.waitForStarted()) {
150                     kDebug() << "// Error querying MLT's version";
151                 } else {
152                     checkProcess.waitForFinished();
153                     QString mltVersion = checkProcess.readAllStandardOutput();
154                     int version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
155                     kDebug() << "// FOUND MLT's pkgconfig version: " << version;
156                     if (version > 34) recentMlt = true;
157                 }
158             } else {
159                 checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "--version");
160                 if (!checkProcess.waitForStarted()) {
161                     kDebug() << "// Error querying MLT's version";
162                 } else {
163                     checkProcess.waitForFinished();
164                     QString mltVersion = checkProcess.readAllStandardError();
165                     mltVersion = mltVersion.section("\n", 0, 0).simplified();
166                     mltVersion = mltVersion.section(' ', -1).simplified();
167                     int version = 100 * mltVersion.section('.', 0, 0).toInt() + 10 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt();
168                     kDebug() << "// FOUND MLT version: " << version;
169                     if (version > 34) recentMlt = true;
170                 }
171             }
172
173             if (recentMlt) {
174                 // Check installed audio codecs
175                 QProcess checkProcess2;
176                 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "acodec=list");
177                 if (!checkProcess2.waitForStarted()) {
178                     m_mltCheck.tabWidget->setTabEnabled(1, false);
179                     kDebug() << "// Error parsing MLT's avformat codecs";
180                 } else {
181                     checkProcess2.waitForFinished();
182                     QByteArray codecList = checkProcess2.readAllStandardError();
183                     QString acodecList(codecList);
184                     QStringList result;
185                     QStringList alist = acodecList.split("\n", QString::SkipEmptyParts);
186                     for (int i = 0; i < alist.count(); i++) {
187                         if (alist.at(i).contains("- ")) result.append(alist.at(i).section("- ", 1).simplified().toLower());
188                     }
189                     m_mltCheck.acodecs_list->addItems(result);
190                     KdenliveSettings::setAudiocodecs(result);
191                     //kDebug()<<"// FOUND LIST:\n\n"<<m_audioCodecs<<"\n\n++++++++++++++++++++";
192                 }
193                 // Check video codecs
194                 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "vcodec=list");
195                 if (!checkProcess2.waitForStarted()) {
196                     kDebug() << "// Error parsing MLT's avformat codecs";
197                 } else {
198                     checkProcess2.waitForFinished();
199                     QByteArray codecList = checkProcess2.readAllStandardError();
200                     QString vcodecList(codecList);
201                     QStringList result;
202                     QStringList vlist = vcodecList.split("\n", QString::SkipEmptyParts);
203                     for (int i = 0; i < vlist.count(); i++) {
204                         if (vlist.at(i).contains("- ")) result.append(vlist.at(i).section("- ", 1).simplified().toLower());
205                     }
206                     m_mltCheck.vcodecs_list->addItems(result);
207                     KdenliveSettings::setVideocodecs(result);
208                     //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
209                 }
210                 // Check formats
211                 checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "noise:" << "-consumer" << "avformat" << "f=list");
212                 if (!checkProcess2.waitForStarted()) {
213                     kDebug() << "// Error parsing MLT's avformat codecs";
214                 } else {
215                     checkProcess2.waitForFinished();
216                     QByteArray codecList = checkProcess2.readAllStandardError();
217                     QString vcodecList(codecList);
218                     QStringList result;
219                     QStringList vlist = vcodecList.split("\n", QString::SkipEmptyParts);
220                     for (int i = 0; i < vlist.count(); i++) {
221                         if (vlist.at(i).contains("- ")) {
222                             QString format = vlist.at(i).section("- ", 1).simplified().toLower();
223                             if (format.contains(',')) {
224                                 QStringList sub = format.split(',', QString::SkipEmptyParts);
225                                 for (int j = 0; j < sub.count(); j++)
226                                     result.append(sub.at(j));
227                             } else result.append(format);
228                         }
229                     }
230                     m_mltCheck.formats_list->addItems(result);
231                     KdenliveSettings::setSupportedformats(result);
232                     //kDebug()<<"// FOUND LIST:\n\n"<<m_videoCodecs<<"\n\n++++++++++++++++++++";
233                 }
234             }
235
236         }
237
238         // Check MLT dv module
239         QTreeWidgetItem *dvItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("DV module (libdv)"));
240         dvItem->setData(1, Qt::UserRole, i18n("Required to work with dv files if avformat module is not installed"));
241         dvItem->setSizeHint(0, itemSize);
242         if (!result.contains("- libdv")) {
243             dvItem->setIcon(0, missingIcon);
244         } else {
245             dvItem->setIcon(0, okIcon);
246         }
247
248         // Check MLT image format module
249         QTreeWidgetItem *imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("QImage module"));
250         imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
251         imageItem->setSizeHint(0, itemSize);
252         if (!result.contains("- qimage")) {
253             imageItem->setIcon(0, missingIcon);
254             imageItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Pixbuf module"));
255             imageItem->setData(1, Qt::UserRole, i18n("Required to work with images"));
256             imageItem->setSizeHint(0, itemSize);
257             if (!result.contains("- pixbuf")) imageItem->setIcon(0, missingIcon);
258             else imageItem->setIcon(0, okIcon);
259         } else {
260             imageItem->setIcon(0, okIcon);
261         }
262     }
263 }
264
265 void Wizard::slotCheckPrograms() {
266     m_check.programList->setColumnCount(2);
267     m_check.programList->setRootIsDecorated(false);
268     m_check.programList->setHeaderHidden(true);
269     QSize itemSize(20, this->fontMetrics().height() * 2.5);
270     KIcon okIcon("dialog-ok");
271     KIcon missingIcon("dialog-close");
272     m_check.programList->setColumnWidth(0, 30);
273     m_check.programList->setIconSize(QSize(24, 24));
274
275     QTreeWidgetItem *item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("FFmpeg & ffplay"));
276     item->setData(1, Qt::UserRole, i18n("Required for webcam capture"));
277     item->setSizeHint(0, itemSize);
278     QString exepath = KStandardDirs::findExe("ffmpeg");
279     if (exepath.isEmpty()) item->setIcon(0, missingIcon);
280     else if (KStandardDirs::findExe("ffplay").isEmpty()) item->setIcon(0, missingIcon);
281     else item->setIcon(0, okIcon);
282
283     item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Recordmydesktop"));
284     item->setData(1, Qt::UserRole, i18n("Required for screen capture"));
285     item->setSizeHint(0, itemSize);
286     if (KStandardDirs::findExe("recordmydesktop").isEmpty()) item->setIcon(0, missingIcon);
287     else item->setIcon(0, okIcon);
288
289     item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvgrab"));
290     item->setData(1, Qt::UserRole, i18n("Required for firewire capture"));
291     item->setSizeHint(0, itemSize);
292     if (KStandardDirs::findExe("dvgrab").isEmpty()) item->setIcon(0, missingIcon);
293     else item->setIcon(0, okIcon);
294
295     item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvdauthor"));
296     item->setData(1, Qt::UserRole, i18n("Required for creation of DVD"));
297     item->setSizeHint(0, itemSize);
298     if (KStandardDirs::findExe("dvdauthor").isEmpty()) item->setIcon(0, missingIcon);
299     else item->setIcon(0, okIcon);
300
301     item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Mkisofs"));
302     item->setData(1, Qt::UserRole, i18n("Required for creation of DVD iso images"));
303     item->setSizeHint(0, itemSize);
304     if (KStandardDirs::findExe("mkisofs").isEmpty()) item->setIcon(0, missingIcon);
305     else item->setIcon(0, okIcon);
306
307 }
308
309 void Wizard::installExtraMimes(QString baseName, QStringList globs) {
310     QString mimefile = baseName;
311     mimefile.replace('/', '-');
312     KMimeType::Ptr mime = KMimeType::mimeType(baseName);
313     if (!mime) {
314         kDebug() << "KMimeTypeTrader: mimeType " << baseName << " not found";
315     } else {
316         QStringList extensions = mime->patterns();
317         QString comment = mime->comment();
318         foreach(const QString &glob, globs) {
319             if (!extensions.contains(glob)) extensions << glob;
320         }
321         kDebug() << "EXTS: " << extensions;
322         QString packageFileName = KStandardDirs::locateLocal("xdgdata-mime", "packages/" + mimefile + ".xml");
323         kDebug() << "INSTALLING NEW MIME TO: " << packageFileName;
324         QFile packageFile(packageFileName);
325         if (!packageFile.open(QIODevice::WriteOnly)) {
326             kError() << "Couldn't open" << packageFileName << "for writing";
327             return;
328         }
329         QXmlStreamWriter writer(&packageFile);
330         writer.setAutoFormatting(true);
331         writer.writeStartDocument();
332
333         const QString nsUri = "http://www.freedesktop.org/standards/shared-mime-info";
334         writer.writeDefaultNamespace(nsUri);
335         writer.writeStartElement("mime-info");
336         writer.writeStartElement(nsUri, "mime-type");
337         writer.writeAttribute("type", baseName);
338
339         if (!comment.isEmpty()) {
340             writer.writeStartElement(nsUri, "comment");
341             writer.writeCharacters(comment);
342             writer.writeEndElement(); // comment
343         }
344
345         foreach(const QString& pattern, extensions) {
346             writer.writeStartElement(nsUri, "glob");
347             writer.writeAttribute("pattern", pattern);
348             writer.writeEndElement(); // glob
349         }
350
351         writer.writeEndElement(); // mime-info
352         writer.writeEndElement(); // mime-type
353         writer.writeEndDocument();
354     }
355 }
356
357 void Wizard::runUpdateMimeDatabase() {
358     const QString localPackageDir = KStandardDirs::locateLocal("xdgdata-mime", QString());
359     //Q_ASSERT(!localPackageDir.isEmpty());
360     KProcess proc;
361     proc << "update-mime-database";
362     proc << localPackageDir;
363     const int exitCode = proc.execute();
364     if (exitCode) {
365         kWarning() << proc.program() << "exited with error code" << exitCode;
366     }
367 }
368
369 void Wizard::slotCheckThumbs() {
370     QString pixname = "timeline_vthumbs.png";
371     if (!m_extra.audiothumbs->isChecked() && !m_extra.videothumbs->isChecked()) {
372         pixname = "timeline_nothumbs.png";
373     } else if (m_extra.audiothumbs->isChecked()) {
374         if (m_extra.videothumbs->isChecked())
375             pixname = "timeline_avthumbs.png";
376         else pixname = "timeline_athumbs.png";
377     }
378
379     m_extra.timeline_preview->setPixmap(QPixmap(KStandardDirs::locate("appdata", pixname)));
380 }
381
382 void Wizard::slotCheckStandard() {
383     m_standard.profiles_list->clear();
384     QStringList profiles;
385     if (m_standard.button_dv->isChecked()) {
386         // DV standard
387         m_standard.profiles_list->addItems(m_dvProfiles);
388     } else if (m_standard.button_hdv->isChecked()) {
389         // HDV standard
390         m_standard.profiles_list->addItems(m_hdvProfiles);
391     } else {
392         m_standard.profiles_list->addItems(m_dvProfiles);
393         m_standard.profiles_list->addItems(m_hdvProfiles);
394         m_standard.profiles_list->addItems(m_otherProfiles);
395         //m_standard.profiles_list->sortItems();
396     }
397
398     for (int i = 0; i < m_standard.profiles_list->count(); i++) {
399         QListWidgetItem *item = m_standard.profiles_list->item(i);
400         MltVideoProfile prof = ProfilesDialog::getVideoProfile(m_profilesInfo.value(item->text()));
401         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(QString::number(prof.width), QString::number(prof.height), QString::number(prof.frame_rate_num), QString::number(prof.frame_rate_den), QString::number(prof.sample_aspect_num), QString::number(prof.sample_aspect_den), QString::number(prof.display_aspect_num), QString::number(prof.display_aspect_den));
402         item->setToolTip(infoString);
403     }
404
405     m_standard.profiles_list->setSortingEnabled(true);
406     m_standard.profiles_list->setCurrentRow(0);
407 }
408
409 void Wizard::slotCheckSelectedItem() {
410     // Make sure we always have an item highlighted
411     m_standard.profiles_list->setCurrentRow(m_standard.profiles_list->currentRow());
412 }
413
414
415 void Wizard::adjustSettings() {
416     if (m_extra.installmimes->isChecked()) {
417         QStringList globs;
418         globs << "*.mts" << "*.m2t" << "*.mod" << "*.ts";
419         installExtraMimes("video/mpeg", globs);
420         globs.clear();
421         globs << "*.dv";
422         installExtraMimes("video/dv", globs);
423         runUpdateMimeDatabase();
424     }
425     KdenliveSettings::setAudiothumbnails(m_extra.audiothumbs->isChecked());
426     KdenliveSettings::setVideothumbnails(m_extra.videothumbs->isChecked());
427     KdenliveSettings::setCrashrecovery(m_extra.autosave->isChecked());
428     if (m_standard.profiles_list->currentItem()) {
429         QString selectedProfile = m_profilesInfo.value(m_standard.profiles_list->currentItem()->text());
430         if (selectedProfile.isEmpty()) selectedProfile = "dv_pal";
431         KdenliveSettings::setDefault_profile(selectedProfile);
432     }
433     QString path = m_extra.projectfolder->url().path();
434     if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
435     KdenliveSettings::setDefaultprojectfolder(path);
436
437 }
438
439 void Wizard::slotCheckMlt() {
440     QString errorMessage;
441     if (KdenliveSettings::rendererpath().isEmpty()) {
442         errorMessage.append(i18n("your MLT installation cannot be found. Install MLT and restart Kdenlive.\n"));
443     }
444     /*QProcess checkProcess;
445     checkProcess.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "producer");
446     if (!checkProcess.waitForStarted())
447         errorMessage.append(i18n("Error starting MLT's command line player (inigo)") + ".\n");
448
449     checkProcess.waitForFinished();
450
451     QByteArray result = checkProcess.readAllStandardError();
452     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");*/
453
454     QProcess checkProcess2;
455     checkProcess2.start(KdenliveSettings::rendererpath(), QStringList() << "-query" << "consumer");
456     if (!checkProcess2.waitForStarted())
457         errorMessage.append(i18n("Error starting MLT's command line player (inigo).") + "\n");
458
459     checkProcess2.waitForFinished();
460
461     QByteArray result = checkProcess2.readAllStandardError();
462     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");
463
464     if (!errorMessage.isEmpty()) {
465         errorMessage.prepend(QString("<b>%1</b><br>").arg(i18n("Fatal Error")));
466         QLabel *pix = new QLabel();
467         pix->setPixmap(KIcon("dialog-error").pixmap(30));
468         QLabel *label = new QLabel(errorMessage);
469         label->setWordWrap(true);
470         m_startLayout->addSpacing(40);
471         m_startLayout->addWidget(pix);
472         m_startLayout->addWidget(label);
473         m_systemCheckIsOk = false;
474         button(QWizard::NextButton)->setEnabled(false);
475     } else m_systemCheckIsOk = true;
476
477     if (m_systemCheckIsOk) checkMltComponents();
478 }
479
480 bool Wizard::isOk() const {
481     return m_systemCheckIsOk;
482 }
483
484 #include "wizard.moc"