File indexing completed on 2025-03-09 05:06:32

0001 /*
0002     SPDX-FileCopyrightText: 2010 Daniel Nicoletti <dantti12@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef CONFIGURE_DIALOG_H
0008 #define CONFIGURE_DIALOG_H
0009 
0010 #include <KPageDialog>
0011 
0012 class PrinterPage;
0013 class ModifyPrinter;
0014 class PrinterOptions;
0015 class QAbstractButton;
0016 class QCloseEvent;
0017 
0018 class Q_DECL_EXPORT ConfigureDialog : public KPageDialog
0019 {
0020     Q_OBJECT
0021 public:
0022     explicit ConfigureDialog(const QString &destName, bool isClass, QWidget *parent = nullptr);
0023     ~ConfigureDialog() override;
0024 
0025 private:
0026     void currentPageChangedSlot(KPageWidgetItem *current, KPageWidgetItem *before);
0027     void enableButtonApply(bool enable);
0028     void slotButtonClicked(QAbstractButton *pressedButton);
0029     void ppdChanged();
0030 
0031     ModifyPrinter *modifyPrinter = nullptr;
0032     PrinterOptions *printerOptions = nullptr;
0033     void closeEvent(QCloseEvent *event) override;
0034     // return false if the dialog was canceled
0035     bool savePage(PrinterPage *page);
0036 };
0037 
0038 #endif