update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / print_dialog.h
blobeabb0b0807d0ef6cc65c0b5605103cf3fe3a4465
1 /** @file
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
8 */
10 #ifndef PRINT_DIALOG_H
11 #define PRINT_DIALOG_H
13 #include <config.h>
15 #include "file.h"
17 #include <QDialog>
18 #include <QPrinter>
19 #include <QPrintPreviewWidget>
20 #include <QPushButton>
22 namespace Ui {
23 class PrintDialog;
26 class PrintDialog : public QDialog
28 Q_OBJECT
30 public:
31 explicit PrintDialog(QWidget *parent = 0, capture_file *cf = NULL, QString selRange = QString());
32 ~PrintDialog();
34 bool printHeader();
35 bool printLine(int indent, const char *line);
37 protected:
38 virtual void keyPressEvent(QKeyEvent *event) override;
40 private:
41 Ui::PrintDialog *pd_ui_;
43 QPrinter printer_;
44 QPrinter *cur_printer_;
45 QPainter *cur_painter_;
46 QPrintPreviewWidget *preview_;
47 QPushButton *print_bt_;
48 QFont header_font_;
49 QFont packet_font_;
50 public:
51 capture_file *cap_file_;
52 private:
53 print_args_t print_args_;
54 print_stream_ops_t stream_ops_;
55 print_stream_t stream_;
56 int page_pos_;
57 bool in_preview_;
59 void printPackets(QPrinter *printer = NULL, bool in_preview = false);
61 private slots:
62 void paintPreview(QPrinter *printer);
63 void checkValidity();
64 void on_buttonBox_helpRequested();
65 void on_buttonBox_clicked(QAbstractButton *button);
69 #endif // PRINT_DIALOG_H