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

0001 /*
0002     SPDX-FileCopyrightText: 2010 Daniel Nicoletti <dantti12@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef ADD_PRINTER_ASSISTANT_H
0008 #define ADD_PRINTER_ASSISTANT_H
0009 
0010 #include <KAssistantDialog>
0011 
0012 #include <KPixmapSequenceOverlayPainter>
0013 
0014 class AddPrinterAssistant : public KAssistantDialog
0015 {
0016     Q_OBJECT
0017 public:
0018     AddPrinterAssistant();
0019     ~AddPrinterAssistant() override;
0020 
0021     void initAddPrinter(const QString &printer = QString(), const QString &deviceId = QString());
0022     void initAddClass();
0023     void initChangePPD(const QString &printer, const QString &deviceUri, const QString &makeAndModel);
0024 
0025 public slots:
0026     void back() override;
0027     void next() override;
0028     void enableNextButton(bool enable);
0029     void enableFinishButton(bool enable);
0030     void slotFinishButtonClicked();
0031 
0032 private:
0033     void next(KPageWidgetItem *currentPage);
0034     void setCurrentPage(KPageWidgetItem *page);
0035     void showEvent(QShowEvent * event) override;
0036 
0037     KPageWidgetItem *m_devicesPage = nullptr;
0038     KPageWidgetItem *m_chooseClassPage = nullptr;
0039     KPageWidgetItem *m_choosePPDPage = nullptr;
0040     KPageWidgetItem *m_addPrinterPage = nullptr;
0041     KPixmapSequenceOverlayPainter *m_busySeq;
0042 };
0043 
0044 #endif