File indexing completed on 2025-01-19 05:06:21

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