10#ifndef TAP_PARAMETER_DIALOG_H
11#define TAP_PARAMETER_DIALOG_H
79 static const QString &
actionName() {
return action_name_; }
90 static void registerDialog(
const QString title,
const char *cfg_abbr,
104 const QString cfg_str,
105 const QString arg,
void *);
196 void setHint(
const QString &hint);
224 Ui::TapParameterDialog *ui;
226 QList<QAction *> filter_actions_;
228 static const QString action_name_;
236 virtual const QString filterExpression() {
return QString(); }
244 QString itemDataToPlain(QVariant var,
int width = 0);
252 virtual QList<QVariant> treeItemData(QTreeWidgetItem *)
const;
266 virtual void fillTree() = 0;
271 void on_applyFilterButton_clicked();
276 void on_actionCopyToClipboard_triggered();
281 void on_actionSaveAs_triggered();
286 void on_buttonBox_helpRequested();
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
Action
Defines an action to be taken with a filter.
Definition filter_action.h:30
ActionType
Defines how the new filter should be combined with the existing one.
Definition filter_action.h:43
Base class for statistics dialogs driven by a tap and an optional display filter, presenting results ...
Definition tap_parameter_dialog.h:58
void updateWidgets()
Refreshes the enabled/disabled state of UI widgets based on current capture and filter state.
Definition tap_parameter_dialog.cpp:505
static const QString & actionName()
Returns the action name string used to identify this dialog type in menus.
Definition tap_parameter_dialog.h:79
void addFilterActions()
Populates the context menu with filter actions for the selected tree item.
Definition tap_parameter_dialog.cpp:445
void addTreeCollapseAllActions()
Adds "Collapse All" and "Expand All" actions to the context menu.
Definition tap_parameter_dialog.cpp:492
static void registerDialog(const QString title, const char *cfg_abbr, register_stat_group_t group, stat_tap_init_cb tap_init_cb, tpdCreator creator)
Registers a TapParameterDialog subclass so it can be opened via the statistics menu or the "-z" comma...
Definition tap_parameter_dialog.cpp:114
QHBoxLayout * filterLayout()
Returns the filter bar horizontal layout for use by subclasses.
Definition tap_parameter_dialog.cpp:164
void filterActionTriggered()
Applies the filter action associated with the triggered context menu action.
Definition tap_parameter_dialog.cpp:195
void collapseAllActionTriggered()
Collapses all items in the statistics tree.
Definition tap_parameter_dialog.cpp:207
void drawTreeItems()
Triggers a full redraw of all tree items, typically called after the tap has finished accumulating da...
Definition tap_parameter_dialog.cpp:415
QString displayFilter()
Returns the current display filter string from the filter line edit.
Definition tap_parameter_dialog.cpp:169
void contextMenuEvent(QContextMenuEvent *event)
Shows the context menu with filter and tree collapse/expand actions.
Definition tap_parameter_dialog.cpp:434
void setDisplayFilter(const QString &filter)
Sets the display filter line edit to the given expression.
Definition tap_parameter_dialog.cpp:176
QLineEdit * displayFilterLineEdit()
Returns the display filter line edit widget for use by subclasses.
Definition tap_parameter_dialog.cpp:149
void updateFilter(QString filter)
Emitted to push a new display filter to the main window filter bar.
void setHint(const QString &hint)
Sets the hint text shown below the tree widget.
Definition tap_parameter_dialog.cpp:181
void setRetapOnShow(bool retap)
Controls whether packets are retapped when the dialog is first shown. RPC statistics dialogs should d...
Definition tap_parameter_dialog.cpp:187
~TapParameterDialog()
Destroys the dialog, deregisters the tap, and releases UI resources.
Definition tap_parameter_dialog.cpp:107
void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type)
Emitted when the user triggers a filter action from the context menu.
void expandAllActionTriggered()
Expands all items in the statistics tree.
Definition tap_parameter_dialog.cpp:210
QPushButton * applyFilterButton()
Returns the Apply Filter button for use by subclasses.
Definition tap_parameter_dialog.cpp:154
QVBoxLayout * verticalLayout()
Returns the main vertical layout for use by subclasses that need to insert additional widgets.
Definition tap_parameter_dialog.cpp:159
QTreeWidget * statsTreeWidget()
Returns the statistics results tree widget for use by subclasses.
Definition tap_parameter_dialog.cpp:144
static TapParameterDialog * showTapParameterStatistics(QWidget &parent, CaptureFile &cf, const QString cfg_str, const QString arg, void *)
Finds or creates and shows the tap statistics dialog matching cfg_str.
Definition tap_parameter_dialog.cpp:135
Base class for Wireshark specific dialogs that require interaction with a CaptureFile.
Definition wireshark_dialog.h:38
enum _st_format_type st_format_type
Output format used when saving statistics tree data via "Save As...".
enum register_stat_group_e register_stat_group_t
bool(* stat_tap_init_cb)(const char *opt_arg, void *userdata)
Callback invoked to initialize a tap statistic with its CLI argument string.
Definition stat_tap_ui.h:53
TapParameterDialog *(* tpdCreator)(QWidget &parent, const QString cfg_str, const QString arg, CaptureFile &cf)
Factory function signature for creating TapParameterDialog subclass instances.
Definition tap_parameter_dialog.h:48