File indexing completed on 2024-04-21 14:55:51

0001 /*
0002  *  This file is part of the KDE libraries
0003  *  Copyright (c) 2007 Alex Merry <alex.merry@kdemail.net>
0004  *
0005  *  This library is free software; you can redistribute it and/or
0006  *  modify it under the terms of the GNU Library General Public
0007  *  License as published by the Free Software Foundation; either
0008  *  version 2 of the License, or (at your option) any later version.
0009  *
0010  *  This library is distributed in the hope that it will be useful,
0011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  *  Library General Public License for more details.
0014  *
0015  *  You should have received a copy of the GNU Library General Public License
0016  *  along with this library; see the file COPYING.LIB.  If not, write to
0017  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0018  *  Boston, MA 02110-1301, USA.
0019  **/
0020 
0021 #ifndef KDEPRINTDIALOG_H
0022 #define KDEPRINTDIALOG_H
0023 
0024 #include <kdelibs4support_export.h>
0025 
0026 #include <QList>
0027 
0028 class QPrintDialog;
0029 class QPrinter;
0030 class QWidget;
0031 
0032 /**
0033  * Namespace for the KDE printing system
0034  */
0035 namespace KdePrint
0036 {
0037 
0038 /**
0039  * Creates a printer dialog for a QPrinter with the given custom widgets.
0040  *
0041  * Note that the custom widgets are only supported on *nix systems
0042  * and will @b not be shown on Qt versions prior to 4.3.2.
0043  * On other systems it is preferred to provide the widgets
0044  * within configuration dialog of the application.
0045  *
0046  * Setting the widgets will transfer their ownership to the print dialog
0047  * on all systems.
0048  *
0049  * The caller takes ownership of the dialog and is responsible
0050  * for deleting it.
0051  *
0052  * @param printer the QPrinter to apply settings to
0053  * @param parent the parent for the dialog
0054  * @param customTabs a list of custom widgets to show as tabs, the name printed on the tab will
0055  *                   be taken from the widgets windowTitle().
0056  * @deprecated since 5.0, use QPrintDialog::setOptionTabs (only supported on X11)
0057  */
0058 KDELIBS4SUPPORT_EXPORT QPrintDialog *createPrintDialog(QPrinter *printer, const QList<QWidget *> &customTabs,
0059                                                    QWidget *parent = nullptr);
0060 
0061 /**
0062  * Creates a printer dialog for a QPrinter.
0063  *
0064  * The caller takes ownership of the dialog and is responsible
0065  * for deleting it.
0066  *
0067  * @param printer the QPrinter to apply settings to
0068  * @param parent the parent for the dialog
0069  */
0070 KDELIBS4SUPPORT_EXPORT QPrintDialog *createPrintDialog(QPrinter *printer, QWidget *parent = nullptr);
0071 }
0072 
0073 #endif // KDEPRINTDIALOG_H
0074