Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
interface_frame.h
Go to the documentation of this file.
1
12
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
33class QResizeEvent;
34
38class InterfaceFrame : public QFrame
39{
40 Q_OBJECT
41public:
46 explicit InterfaceFrame(QWidget *parent = 0);
47
52
57 int interfacesHidden();
58
63 QMenu * getSelectionMenu();
64
70
75
76Q_SIGNALS:
82 void showExtcapOptions(QString device_name, bool startCaptureOnClose);
83
88 void startCapture(QStringList interfaces);
89
94
99
100public slots:
105
110
115
116#ifdef HAVE_PCAP_REMOTE
120 void toggleRemoteInterfaces();
121#endif
122
126 void showRunOnFile();
127
132 void showContextMenu(QPoint pos);
133
134protected:
140 void changeEvent(QEvent *evt) override;
141
148 void resizeEvent(QResizeEvent *evt) override;
149
150private:
151
159 void saveHiddenInterfaces();
160
164 void resetInterfaceTreeDisplay();
165
169 void resizeInterfaceColumns();
170
175 bool haveLocalCapturePermissions() const;
176
178 Ui::InterfaceFrame *ui;
179
181 InterfaceSortFilterModel proxy_model_;
182
184 InterfaceTreeModel source_model_;
185
187 InfoProxyModel info_model_;
188
190 QMap<int, QString> ifTypeDescription;
191
192private slots:
198 void interfaceTreeSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
199
204 void on_interfaceTree_doubleClicked(const QModelIndex &index);
205
206#ifdef HAVE_LIBPCAP
211 void on_interfaceTree_clicked(const QModelIndex &index);
212#endif
213
218 void actionButton_toggled(bool checked);
219
223 void triggeredIfTypeButton();
224
228 void hideInterfacesOfType();
229
234 void on_warningLabel_linkActivated(const QString &link);
235};
236
237#endif // INTERFACE_FRAME_H
Proxy model that appends additional information rows to a source model.
Definition info_proxy_model.h:24
void startCapture(QStringList interfaces)
Signal emitted to initiate a capture session.
void changeEvent(QEvent *evt) override
Handles change events; re-fits the interface tree columns when the widget is re-polished (works aroun...
Definition interface_frame.cpp:438
~InterfaceFrame()
Destroys the InterfaceFrame.
Definition interface_frame.cpp:160
void ensureSelectedInterface()
Ensures at least one interface is selected, if possible.
Definition interface_frame.cpp:234
void showContextMenu(QPoint pos)
Shows the context menu for the interface list.
Definition interface_frame.cpp:579
void toggleHiddenInterfaces()
Toggles the visibility of hidden interfaces in the list.
Definition interface_frame.cpp:288
InterfaceFrame(QWidget *parent=0)
Constructs a new InterfaceFrame.
Definition interface_frame.cpp:66
int interfacesHidden()
Gets the number of currently hidden interfaces.
Definition interface_frame.cpp:224
int interfacesPresent()
Gets the total number of interfaces present.
Definition interface_frame.cpp:229
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:181
void resizeEvent(QResizeEvent *evt) override
Handles resize events; re-fits the interface tree columns so the name column cap (and the room left f...
Definition interface_frame.cpp:451
void interfaceListChanged()
Handles updates when the global interface list changes.
Definition interface_frame.cpp:273
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:481
void showRunOnFile()
Triggers the action to run wireshark/tshark on a file.
Definition interface_frame.cpp:574
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:69