10#ifndef TAP_PARAMETER_DIALOG_H
11#define TAP_PARAMETER_DIALOG_H
36class TapParameterDialog;
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 *);
202 void setHint(
const QString &hint);
215 Ui::TapParameterDialog *
getUI(
void)
239 Ui::TapParameterDialog *ui;
241 QList<QAction *> filter_actions_;
243 static const QString action_name_;
251 virtual const QString filterExpression() {
return QString(); }
259 virtual QList<QVariant> treeItemData(QTreeWidgetItem *)
const;
273 virtual void fillTree() = 0;
278 void on_applyFilterButton_clicked();
283 void on_actionCopyToClipboard_triggered();
288 void on_actionSaveAs_triggered();
293 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
static const QString & actionName()
Returns the action name string used to identify this dialog type in menus.
Definition tap_parameter_dialog.h:79
void contextMenuEvent(QContextMenuEvent *event) override
Shows the context menu with filter and tree collapse/expand actions.
Definition tap_parameter_dialog.cpp:240
void addFilterActions()
Populates the context menu with filter actions for the selected tree item.
Definition tap_parameter_dialog.cpp:251
Ui::TapParameterDialog * getUI(void)
Retrieves the UI object.
Definition tap_parameter_dialog.h:215
void addTreeCollapseAllActions()
Adds "Collapse All" and "Expand All" actions to the context menu.
Definition tap_parameter_dialog.cpp:263
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:100
QHBoxLayout * filterLayout()
Returns the filter bar horizontal layout for use by subclasses.
Definition tap_parameter_dialog.cpp:150
void filterActionTriggered()
Applies the filter action associated with the triggered context menu action.
Definition tap_parameter_dialog.cpp:181
void collapseAllActionTriggered()
Collapses all items in the statistics tree.
Definition tap_parameter_dialog.cpp:193
void drawTreeItems()
Triggers a full redraw of all tree items, typically called after the tap has finished accumulating da...
Definition tap_parameter_dialog.cpp:221
QString displayFilter()
Returns the current display filter string from the filter line edit.
Definition tap_parameter_dialog.cpp:155
void setDisplayFilter(const QString &filter)
Sets the display filter line edit to the given expression.
Definition tap_parameter_dialog.cpp:162
QLineEdit * displayFilterLineEdit()
Returns the display filter line edit widget for use by subclasses.
Definition tap_parameter_dialog.cpp:135
void goToPacket(int packet_num)
Emitted to navigate the packet list to a given frame.
void updateFilter(QString filter)
Emitted to push a new display filter to the main window filter bar.
void updateWidgets() override
Refreshes the enabled/disabled state of UI widgets based on current capture and filter state.
Definition tap_parameter_dialog.cpp:276
void setHint(const QString &hint)
Sets the hint text shown below the tree widget.
Definition tap_parameter_dialog.cpp:167
TapParameterDialog(QWidget &parent, CaptureFile &cf, int help_topic=0)
Constructs the tap parameter dialog and registers it for retapping.
Definition tap_parameter_dialog.cpp:55
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:173
~TapParameterDialog()
Destroys the dialog, deregisters the tap, and releases UI resources.
Definition tap_parameter_dialog.cpp:93
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:196
QPushButton * applyFilterButton()
Returns the Apply Filter button for use by subclasses.
Definition tap_parameter_dialog.cpp:140
QVBoxLayout * verticalLayout()
Returns the main vertical layout for use by subclasses that need to insert additional widgets.
Definition tap_parameter_dialog.cpp:145
QTreeWidget * statsTreeWidget()
Returns the statistics results tree widget for use by subclasses.
Definition tap_parameter_dialog.cpp:130
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:121
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30
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