File indexing completed on 2024-04-28 16:26:18

0001 /*************************************************************************************
0002   Copyright (C) 2004 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
0003                 2012-2019 by Michel Ludwig (michel.ludwig@kdemail.net)
0004  *************************************************************************************/
0005 
0006 /***************************************************************************
0007  *                                                                         *
0008  *   This program is free software; you can redistribute it and/or modify  *
0009  *   it under the terms of the GNU General Public License as published by  *
0010  *   the Free Software Foundation; either version 2 of the License, or     *
0011  *   (at your option) any later version.                                   *
0012  *                                                                         *
0013  ***************************************************************************/
0014 
0015 #ifndef CONFIGCHECKERDIALOG_H
0016 #define CONFIGCHECKERDIALOG_H
0017 
0018 #include <KAssistantDialog>
0019 
0020 #include <QCheckBox>
0021 #include <QLabel>
0022 #include <QList>
0023 #include <QListWidget>
0024 #include <QProgressBar>
0025 
0026 #include "configtester.h"
0027 
0028 class KileInfo;
0029 
0030 namespace KileDialog
0031 {
0032 class ResultItem : public QListWidgetItem
0033 {
0034 public:
0035     ResultItem(QListWidget *listWidget, const QString &toolGroup, int status, bool isCritical, const QList<ConfigTest*> &tests);
0036 };
0037 
0038 class ConfigChecker : public KAssistantDialog
0039 {
0040     Q_OBJECT
0041 
0042 public:
0043     explicit ConfigChecker(KileInfo *kileInfo, QWidget* parent = Q_NULLPTR);
0044     ~ConfigChecker();
0045 
0046 public Q_SLOTS:
0047     void run();
0048     void started();
0049     void finished(bool);
0050     void setPercentageDone(int);
0051     void slotCancel();
0052 
0053     void next() override;
0054 
0055 protected Q_SLOTS:
0056     void assistantFinished();
0057 
0058 private:
0059     KileInfo *m_ki;
0060     Tester    *m_tester;
0061     QProgressBar *m_progressBar;
0062     QListWidget *m_listWidget;
0063     QLabel *m_overallResultLabel;
0064     KPageWidgetItem *m_introPageWidgetItem, *m_runningTestsPageWidgetItem, *m_testResultsPageWidgetItem;
0065     QCheckBox *m_useEmbeddedViewerCheckBox, *m_useModernConfigurationForLaTeXCheckBox, *m_useModernConfigurationForPDFLaTeX;
0066 };
0067 }
0068 #endif