Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
print_dialog.h
Go to the documentation of this file.
1
9
10#ifndef PRINT_DIALOG_H
11#define PRINT_DIALOG_H
12
13#include <config.h>
14
15#include "file.h"
16
17#include <QDialog>
18#include <QPrinter>
19#include <QPrintPreviewWidget>
20#include <QPushButton>
21
22namespace Ui {
23 class PrintDialog;
24}
25
30class PrintDialog : public QDialog
31{
32 Q_OBJECT
33
34public:
41 explicit PrintDialog(QWidget *parent = 0, capture_file *cf = NULL, QString selRange = QString());
42
47
52 bool printHeader();
53
60 bool printLine(int indent, const char *line);
61
62protected:
67 virtual void keyPressEvent(QKeyEvent *event) override;
68
69private:
70 Ui::PrintDialog *pd_ui_;
71
72 QPrinter printer_;
73 QPrinter *cur_printer_;
74 QPainter *cur_painter_;
75 QPrintPreviewWidget *preview_;
76 QPushButton *print_bt_;
77 QFont header_font_;
78 QFont packet_font_;
79
80public:
82
83private:
84 print_args_t print_args_;
85 print_stream_ops_t stream_ops_;
86 print_stream_t stream_;
87 int page_pos_;
88 bool in_preview_;
89
95 void printPackets(QPrinter *printer = NULL, bool in_preview = false);
96
97private slots:
102 void paintPreview(QPrinter *printer);
103
108 void checkValidity();
109
111 void on_buttonBox_helpRequested();
112
117 void on_buttonBox_clicked(QAbstractButton *button);
118};
119
120
121#endif // PRINT_DIALOG_H
struct _capture_file capture_file
Represents a capture file and its associated metadata.
bool printHeader()
Prints the page header for the current print job.
Definition print_dialog.cpp:140
bool printLine(int indent, const char *line)
Prints a single line of packet data at the given indentation level.
Definition print_dialog.cpp:169
capture_file * cap_file_
Definition print_dialog.h:81
~PrintDialog()
Destroys the Print dialog and releases all associated resources.
Definition print_dialog.cpp:134
virtual void keyPressEvent(QKeyEvent *event) override
Intercepts key press events, e.g. to suppress closing the dialog on Enter.
Definition print_dialog.cpp:211
PrintDialog(QWidget *parent=0, capture_file *cf=NULL, QString selRange=QString())
Constructs the Print dialog.
Definition print_dialog.cpp:68
struct print_stream_ops print_stream_ops_t
Vtable of operations implementing a print stream backend for rendering dissection output.
struct print_stream print_stream_t
Represents an abstract print stream, pairing a backend operations vtable with instance-specific state...
Aggregates all options controlling a single print or export operation.
Definition file.h:476