forked from KDE/okular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfileprinterpreview.h
49 lines (37 loc) · 1.6 KB
/
fileprinterpreview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/***************************************************************************
* Copyright (C) 2007 by John Layt <[email protected]> *
* *
* FilePrinterPreview based on KPrintPreview (originally LGPL) *
* Copyright (c) 2007 Alex Merry <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef FILEPRINTERPREVIEW_H
#define FILEPRINTERPREVIEW_H
#include <QDialog>
namespace Okular {
// This code copied from KPrintPreview by Alex Merry, adapted to do PS files instead of PDF
class FilePrinterPreviewPrivate;
class FilePrinterPreview : public QDialog
{
Q_OBJECT
public:
/**
* Create a Print Preview dialog for a given file.
*
* @param filename file to print preview
* @param parent pointer to the parent widget for the dialog
*/
explicit FilePrinterPreview( const QString &filename, QWidget *parent = nullptr );
virtual ~FilePrinterPreview();
QSize sizeHint() const override;
protected:
void showEvent( QShowEvent *event ) override;
private:
FilePrinterPreviewPrivate * const d;
};
}
#endif // FILEPRINTER_H