HACK: 1. try to match RowsetProperties
[wireshark-wip.git] / ui / qt / print_dialog.h
blob0f4591f0d00be85f842621e18f67fac6ca11700d
1 /* print_dialog.h
3 * $Id$
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
27 #include "config.h"
29 #include <glib.h>
31 #include "file.h"
33 #include <QDialog>
34 #include <QPrinter>
35 #include <QPrintPreviewWidget>
36 #include <QPushButton>
38 namespace Ui {
39 class PrintDialog;
42 class PrintDialog : public QDialog
44 Q_OBJECT
46 public:
47 explicit PrintDialog(QWidget *parent = 0, capture_file *cf = NULL);
48 ~PrintDialog();
49 gboolean printHeader();
50 gboolean printLine(int indent, const char *line);
52 protected:
53 void keyPressEvent(QKeyEvent *event);
55 private:
56 void printPackets(QPrinter *printer = NULL, bool in_preview = false);
58 Ui::PrintDialog *pd_ui_;
60 QPrinter printer_;
61 QPrinter *cur_printer_;
62 QPainter *cur_painter_;
63 QPrintPreviewWidget *preview_;
64 QPushButton *print_bt_;
65 QFont header_font_;
66 QFont packet_font_;
67 capture_file *cap_file_;
68 print_args_t print_args_;
69 print_stream_ops_t stream_ops_;
70 print_stream_t stream_;
71 int page_pos_;
72 bool in_preview_;
74 private slots:
75 void paintPreview(QPrinter *printer);
76 void checkValidity();
77 void on_buttonBox_helpRequested();
78 void on_buttonBox_clicked(QAbstractButton *button);
82 #endif // PRINT_DIALOG_H
85 * Editor modelines
87 * Local Variables:
88 * c-basic-offset: 4
89 * tab-width: 8
90 * indent-tabs-mode: nil
91 * End:
93 * ex: set shiftwidth=4 tabstop=8 expandtab:
94 * :indentSize=4:tabSize=8:noTabs=true: