File indexing completed on 2024-05-26 05:56:35

0001 /*
0002     This file is part of the Okteta Kasten module, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2019 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #include "printdialog.hpp"
0010 // Qt
0011 #include <QPrinter>
0012 
0013 namespace Kasten {
0014 
0015 PrintDialog::PrintDialog(QPrinter* printer, QWidget* parent)
0016     : QPrintDialog(printer, parent)
0017 {
0018     setAttribute(Qt::WA_DeleteOnClose, true);
0019 }
0020 
0021 PrintDialog::~PrintDialog()
0022 {
0023     if (result() != QDialog::Accepted) {
0024         delete printer();
0025     }
0026 }
0027 
0028 }
0029 
0030 #include "moc_printdialog.cpp"