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 ADDPRINTER_H
0008 #define ADDPRINTER_H
0009 
0010 #include <QApplication>
0011 
0012 class AddPrinterInterface;
0013 class AddPrinter : public QApplication
0014 {
0015     Q_OBJECT
0016 public:
0017     AddPrinter(int &argc, char **argv);
0018     ~AddPrinter() override;
0019 
0020     /**
0021      * This method allows to browse discovered printers and add them
0022      */
0023     void addPrinter(qulonglong wid);
0024 
0025     /**
0026      * This method allows to browse printers and create a class
0027      */
0028     void addClass(qulonglong wid);
0029 
0030     /**
0031      * This method allows to change the PPD of an existing printer
0032      */
0033     void changePPD(qulonglong wid, const QString &name);
0034 
0035     /**
0036      * This method allows to browse the PPD list,
0037      * and adding the printer described by device_id
0038      */
0039     void newPrinterFromDevice(qulonglong wid, const QString &name, const QString &device_id);
0040 
0041 private:
0042     void show(QWidget *widget, qulonglong wid) const;
0043 
0044     AddPrinterInterface *m_pqInterface {nullptr};
0045 };
0046 
0047 #endif //ADDPRINTER_H