File indexing completed on 2022-09-27 16:37:10

0001 /*
0002     SPDX-FileCopyrightText: 2010 Daniel Nicoletti <dantti12@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef PAGE_CHOOSE_PPD_H
0008 #define PAGE_CHOOSE_PPD_H
0009 
0010 #include "GenericPage.h"
0011 
0012 #include <QStackedLayout>
0013 
0014 #include <KIO/Job>
0015 
0016 namespace Ui {
0017     class PageChoosePPD;
0018 }
0019 
0020 class SelectMakeModel;
0021 class PageChoosePPD : public GenericPage
0022 {
0023     Q_OBJECT
0024 public:
0025     explicit PageChoosePPD(const QVariantHash &args = QVariantHash(), QWidget *parent = nullptr);
0026     ~PageChoosePPD() override;
0027 
0028     bool canProceed() const override;
0029     void setValues(const QVariantHash &args) override;
0030     QVariantHash values() const override;
0031     bool isValid() const override;
0032 
0033 private slots:
0034     void checkSelected();
0035     void selectDefault();
0036     void resultJob(KJob *job);
0037 
0038 private:
0039     void removeTempPPD();
0040 
0041     Ui::PageChoosePPD *ui;
0042     bool m_isValid = false;
0043     SelectMakeModel *m_selectMM;
0044     QStackedLayout *m_layout;
0045     QString m_ppdFile;
0046 };
0047 
0048 #endif