3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef PRINT_DIALOG_H
11 #define PRINT_DIALOG_H
19 #include <QPrintPreviewWidget>
20 #include <QPushButton>
26 class PrintDialog
: public QDialog
31 explicit PrintDialog(QWidget
*parent
= 0, capture_file
*cf
= NULL
, QString selRange
= QString());
35 bool printLine(int indent
, const char *line
);
38 virtual void keyPressEvent(QKeyEvent
*event
) override
;
41 Ui::PrintDialog
*pd_ui_
;
44 QPrinter
*cur_printer_
;
45 QPainter
*cur_painter_
;
46 QPrintPreviewWidget
*preview_
;
47 QPushButton
*print_bt_
;
51 capture_file
*cap_file_
;
53 print_args_t print_args_
;
54 print_stream_ops_t stream_ops_
;
55 print_stream_t stream_
;
59 void printPackets(QPrinter
*printer
= NULL
, bool in_preview
= false);
62 void paintPreview(QPrinter
*printer
);
64 void on_buttonBox_helpRequested();
65 void on_buttonBox_clicked(QAbstractButton
*button
);
69 #endif // PRINT_DIALOG_H