File indexing completed on 2022-11-22 14:07:17

0001 /*
0002     SPDX-FileCopyrightText: 2008 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 
0006 #pragma once
0007 
0008 #include <QVBoxLayout>
0009 #include <QWizard>
0010 #include <QWizardPage>
0011 
0012 class KMessageWidget;
0013 
0014 class MyWizardPage : public QWizardPage
0015 {
0016 public:
0017     explicit MyWizardPage(QWidget *parent = nullptr);
0018     void setComplete(bool complete);
0019     bool isComplete() const override;
0020     bool m_isComplete{false};
0021 };
0022 
0023 class Wizard : public QWizard
0024 {
0025     Q_OBJECT
0026 public:
0027     explicit Wizard(bool autoClose, QWidget *parent = nullptr);
0028     void installExtraMimes(const QString &baseName, const QStringList &globs);
0029     void runUpdateMimeDatabase();
0030     void adjustSettings();
0031     bool isOk() const;
0032     static void testHwEncoders();
0033     static void slotCheckPrograms(QString &infos, QString &warnings);
0034 
0035 private:
0036     QVBoxLayout *m_startLayout;
0037     MyWizardPage *m_page;
0038     KMessageWidget *m_errorWidget;
0039     bool m_systemCheckIsOk;
0040     bool m_brokenModule;
0041     QString m_errors;
0042     QString m_warnings;
0043     QString m_infos;
0044     void checkMltComponents();
0045     void checkMissingCodecs();
0046     void updateHwStatus();
0047 
0048 private slots:
0049     void slotCheckMlt();
0050     void slotOpenManual();
0051 };