Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
interface_frame.h
Go to the documentation of this file.
1
13#ifndef INTERFACE_FRAME_H
14#define INTERFACE_FRAME_H
15
16#include <config.h>
17
21
22#include <QFrame>
23#include <QHBoxLayout>
24#include <QAbstractButton>
25#include <QTimer>
26#include <QMenu>
27#include <QPushButton>
28
29namespace Ui {
30class InterfaceFrame;
31}
32
36class InterfaceFrame : public QFrame
37{
38 Q_OBJECT
39public:
44 explicit InterfaceFrame(QWidget *parent = 0);
45
50
55 int interfacesHidden();
56
61 QMenu * getSelectionMenu();
62
68
73
74Q_SIGNALS:
80 void showExtcapOptions(QString device_name, bool startCaptureOnClose);
81
86 void startCapture(QStringList interfaces);
87
92
97
98public slots:
99#ifdef HAVE_LIBPCAP
104 void scanLocalInterfaces(GList *filter_list = nullptr);
105#endif
106
111
116
121
122#ifdef HAVE_PCAP_REMOTE
126 void toggleRemoteInterfaces();
127#endif
128
132 void showRunOnFile();
133
138 void showContextMenu(QPoint pos);
139
140protected:
145 void hideEvent(QHideEvent *evt);
146
151 void showEvent(QShowEvent *evt);
152
158 void changeEvent(QEvent *evt);
159
160private:
161
165 void resetInterfaceTreeDisplay();
166
170 void resizeInterfaceColumns();
171
176 bool haveLocalCapturePermissions() const;
177
179 Ui::InterfaceFrame *ui;
180
182 InterfaceSortFilterModel proxy_model_;
183
185 InterfaceTreeModel source_model_;
186
188 InfoProxyModel info_model_;
189
191 QMap<int, QString> ifTypeDescription;
192
193#ifdef HAVE_LIBPCAP
195 QTimer *stat_timer_;
196#endif // HAVE_LIBPCAP
197
198private slots:
204 void interfaceTreeSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
205
210 void on_interfaceTree_doubleClicked(const QModelIndex &index);
211
212#ifdef HAVE_LIBPCAP
217 void on_interfaceTree_clicked(const QModelIndex &index);
218#endif
219
223 void updateStatistics(void);
224
229 void actionButton_toggled(bool checked);
230
234 void triggeredIfTypeButton();
235
240 void on_warningLabel_linkActivated(const QString &link);
241};
242
243#endif // INTERFACE_FRAME_H
Proxy model that appends additional information rows to a source model.
Definition info_proxy_model.h:24
A frame containing the list of interfaces available for capture, along with status and controls.
Definition interface_frame.h:37
void startCapture(QStringList interfaces)
Signal emitted to initiate a capture session.
~InterfaceFrame()
Destroys the InterfaceFrame.
Definition interface_frame.cpp:133
void showEvent(QShowEvent *evt)
Handles show events for the frame, resuming updates if necessary.
Definition interface_frame.cpp:213
void ensureSelectedInterface()
Ensures at least one interface is selected, if possible.
Definition interface_frame.cpp:191
void showContextMenu(QPoint pos)
Shows the context menu for the interface list.
Definition interface_frame.cpp:570
void toggleHiddenInterfaces()
Toggles the visibility of hidden interfaces in the list.
Definition interface_frame.cpp:286
int interfacesHidden()
Gets the number of currently hidden interfaces.
Definition interface_frame.cpp:181
void hideEvent(QHideEvent *evt)
Handles hide events for the frame, stopping updates if necessary.
Definition interface_frame.cpp:205
int interfacesPresent()
Gets the total number of interfaces present.
Definition interface_frame.cpp:186
void showExtcapOptions(QString device_name, bool startCaptureOnClose)
Signal emitted to show the extended capture (extcap) options dialog for a device.
QMenu * getSelectionMenu()
Retrieves the selection menu associated with the interface list.
Definition interface_frame.cpp:138
void interfaceListChanged()
Handles updates when the global interface list changes.
Definition interface_frame.cpp:266
void typeSelectionChanged()
Signal emitted when the selected interface type filter changes.
void itemSelectionChanged()
Signal emitted when the item selection in the interface list changes.
void updateSelectedInterfaces()
Updates the UI state based on currently selected interfaces.
Definition interface_frame.cpp:454
void changeEvent(QEvent *evt)
Handles change events; re-fits the interface tree columns when the widget is re-polished (works aroun...
Definition interface_frame.cpp:420
void showRunOnFile()
Triggers the action to run wireshark/tshark on a file.
Definition interface_frame.cpp:565
A proxy model that provides custom sorting and filtering for the list of interfaces.
Definition interface_sort_filter_model.h:25
A table model representing the system's available capture interfaces.
Definition interface_tree_model.h:67