File indexing completed on 2024-05-19 04:35:33
0001 /* 0002 SPDX-FileCopyrightText: 2007 John Layt <john@layt.net> 0003 0004 FilePrinterPreview based on KPrintPreview (originally LGPL) 0005 SPDX-FileCopyrightText: 2007 Alex Merry <huntedhacker@tiscali.co.uk> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef FILEPRINTERPREVIEW_H 0011 #define FILEPRINTERPREVIEW_H 0012 0013 #include <QDialog> 0014 0015 namespace Okular 0016 { 0017 // This code copied from KPrintPreview by Alex Merry, adapted to do PS files instead of PDF 0018 0019 class FilePrinterPreviewPrivate; 0020 0021 class FilePrinterPreview : public QDialog 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 /** 0027 * Create a Print Preview dialog for a given file. 0028 * 0029 * @param filename file to print preview 0030 * @param parent pointer to the parent widget for the dialog 0031 */ 0032 explicit FilePrinterPreview(const QString &filename, QWidget *parent = nullptr); 0033 ~FilePrinterPreview() override; 0034 0035 QSize sizeHint() const override; 0036 0037 protected: 0038 void showEvent(QShowEvent *event) override; 0039 0040 private: 0041 FilePrinterPreviewPrivate *const d; 0042 }; 0043 0044 } 0045 0046 #endif // FILEPRINTER_H