5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef PRINT_DIALOG_H
25 #define PRINT_DIALOG_H
35 #include <QPrintPreviewWidget>
36 #include <QPushButton>
42 class PrintDialog
: public QDialog
47 explicit PrintDialog(QWidget
*parent
= 0, capture_file
*cf
= NULL
);
49 gboolean
printHeader();
50 gboolean
printLine(int indent
, const char *line
);
53 void keyPressEvent(QKeyEvent
*event
);
56 void printPackets(QPrinter
*printer
= NULL
, bool in_preview
= false);
58 Ui::PrintDialog
*pd_ui_
;
61 QPrinter
*cur_printer_
;
62 QPainter
*cur_painter_
;
63 QPrintPreviewWidget
*preview_
;
64 QPushButton
*print_bt_
;
67 capture_file
*cap_file_
;
68 print_args_t print_args_
;
69 print_stream_ops_t stream_ops_
;
70 print_stream_t stream_
;
75 void paintPreview(QPrinter
*printer
);
77 void on_buttonBox_helpRequested();
78 void on_buttonBox_clicked(QAbstractButton
*button
);
82 #endif // PRINT_DIALOG_H
90 * indent-tabs-mode: nil
93 * ex: set shiftwidth=4 tabstop=8 expandtab:
94 * :indentSize=4:tabSize=8:noTabs=true: