| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
funnel_text_dialog.h
Go to the documentation of this file.
1
9
10#ifndef FUNNEL_TEXT_DIALOG_H
11#define FUNNEL_TEXT_DIALOG_H
12
13#include "epan/funnel.h"
14#include "geometry_state_dialog.h"
15
16#include <QDialog>
17
18 namespace Ui {
19 class FunnelTextDialog;
20}
21
22 class FunnelTextDialog;
23 struct _funnel_text_window_t {
24 FunnelTextDialog* funnel_text_dialog;
25};
26
33 class FunnelTextDialog : public GeometryStateDialog
34{
35 Q_OBJECT
36
37 public:
41 explicit FunnelTextDialog(QWidget *parent, const QString &title = QString());
42
44 ~FunnelTextDialog();
45
49 void reject() override;
50
51 // Funnel ops
56 static struct _funnel_text_window_t *textWindowNew(QWidget *parent, const QString title);
57
60 void setText(const QString text);
61
64 void appendText(const QString text);
65
68 void prependText(const QString text);
69
73 void clearText();
74
77 const char *getText();
78
82 void setCloseCallback(text_win_close_cb_t close_cb, void* close_cb_data);
83
86 void setTextEditable(bool editable);
87
91 void addButton(funnel_bt_t *button_cb, QString label);
92
93 private slots:
97 void buttonClicked();
98
101 void on_findLineEdit_textChanged(const QString &pattern);
102
103
104 private:
105 Ui::FunnelTextDialog *ui;
106
107 struct _funnel_text_window_t funnel_text_window_;
108 text_win_close_cb_t close_cb_;
109 void *close_cb_data_;
110};
111
112 extern "C" {
113
120 void text_window_set_text(funnel_text_window_t* ftw, const char* text);
121
128 void text_window_append(funnel_text_window_t *ftw, const char* text);
135 void text_window_prepend(funnel_text_window_t* ftw, const char* text);
136
142 void text_window_clear(funnel_text_window_t *ftw);
143
150 const char *text_window_get_text(funnel_text_window_t* ftw);
151
159 void text_window_set_close_cb(funnel_text_window_t *ftw, text_win_close_cb_t close_cb, void* close_cb_data);
160
167 void text_window_set_editable(funnel_text_window_t* ftw, bool editable);
168
174 void text_window_destroy(funnel_text_window_t* ftw);
175
183 void text_window_add_button(funnel_text_window_t* ftw, funnel_bt_t* funnel_button, const char* label);
184}
185
186
187#endif // FUNNEL_TEXT_DIALOG_H
FunnelTextDialog
A dialog displaying text output from a Lua funnel script.
Definition funnel_text_dialog.h:34
FunnelTextDialog::reject
void reject() override
Handle dialog rejection, invoking the close callback if set.
Definition funnel_text_dialog.cpp:53
FunnelTextDialog::setText
void setText(const QString text)
Replace the dialog's text content.
Definition funnel_text_dialog.cpp:84
FunnelTextDialog::setTextEditable
void setTextEditable(bool editable)
Set whether the text area is editable by the user.
Definition funnel_text_dialog.cpp:117
FunnelTextDialog::~FunnelTextDialog
~FunnelTextDialog()
Destroy the FunnelTextDialog.
Definition funnel_text_dialog.cpp:48
FunnelTextDialog::clearText
void clearText()
Clear all text from the dialog.
Definition funnel_text_dialog.cpp:101
FunnelTextDialog::textWindowNew
static struct _funnel_text_window_t * textWindowNew(QWidget *parent, const QString title)
Create a new funnel text window.
Definition funnel_text_dialog.cpp:77
FunnelTextDialog::FunnelTextDialog
FunnelTextDialog(QWidget *parent, const QString &title=QString())
Construct a FunnelTextDialog.
Definition funnel_text_dialog.cpp:29
FunnelTextDialog::prependText
void prependText(const QString text)
Prepend text to the beginning of the dialog's content.
Definition funnel_text_dialog.cpp:95
FunnelTextDialog::getText
const char * getText()
Return the current text content as a C string.
Definition funnel_text_dialog.cpp:106
FunnelTextDialog::addButton
void addButton(funnel_bt_t *button_cb, QString label)
Add a script-defined button to the dialog.
Definition funnel_text_dialog.cpp:122
FunnelTextDialog::appendText
void appendText(const QString text)
Append text to the end of the dialog's content.
Definition funnel_text_dialog.cpp:89
FunnelTextDialog::setCloseCallback
void setCloseCallback(text_win_close_cb_t close_cb, void *close_cb_data)
Set the callback to invoke when the dialog is closed.
Definition funnel_text_dialog.cpp:111
GeometryStateDialog::GeometryStateDialog
GeometryStateDialog(QWidget *parent, Qt::WindowFlags f=Qt::Window)
Constructs a new GeometryStateDialog with the specified parent and window flags.
Definition geometry_state_dialog.h:91
funnel.h
funnel_bt_t
struct _funnel_bt_t funnel_bt_t
Represents a button attached to a funnel text window, bundling its callback, data,...
text_window_clear
void text_window_clear(funnel_text_window_t *ftw)
Clears the text in the funnel text window.
Definition funnel_text_dialog.cpp:196
text_window_append
void text_window_append(funnel_text_window_t *ftw, const char *text)
Append text to a funnel text window.
Definition funnel_text_dialog.cpp:182
text_window_set_editable
void text_window_set_editable(funnel_text_window_t *ftw, bool editable)
Set the editable state of the text window.
Definition funnel_text_dialog.cpp:218
text_window_prepend
void text_window_prepend(funnel_text_window_t *ftw, const char *text)
Prepend text to a funnel text window.
Definition funnel_text_dialog.cpp:189
text_window_set_close_cb
void text_window_set_close_cb(funnel_text_window_t *ftw, text_win_close_cb_t close_cb, void *close_cb_data)
Set the close callback for a funnel text window.
Definition funnel_text_dialog.cpp:211
text_window_set_text
void text_window_set_text(funnel_text_window_t *ftw, const char *text)
Set the text in a funnel text window.
Definition funnel_text_dialog.cpp:175
text_window_add_button
void text_window_add_button(funnel_text_window_t *ftw, funnel_bt_t *funnel_button, const char *label)
Adds a button to the text window.
Definition funnel_text_dialog.cpp:232
text_window_destroy
void text_window_destroy(funnel_text_window_t *ftw)
Destroys a funnel text window.
Definition funnel_text_dialog.cpp:225
text_window_get_text
const char * text_window_get_text(funnel_text_window_t *ftw)
Gets the text from a funnel text window.
Definition funnel_text_dialog.cpp:203
geometry_state_dialog.h
_funnel_text_window_t
Definition tap-funnel.c:21