Wireshark  4.3.0
The Wireshark network protocol analyzer
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 
18 #include <glib.h>
19 
23 
24 #include <QFrame>
25 #include <QHBoxLayout>
26 #include <QAbstractButton>
27 #include <QTimer>
28 #include <QMenu>
29 #include <QPushButton>
30 
31 namespace Ui {
32 class InterfaceFrame;
33 }
34 
35 class InterfaceFrame : public QFrame
36 {
37  Q_OBJECT
38 public:
39  explicit InterfaceFrame(QWidget *parent = 0);
40  ~InterfaceFrame();
41 
42  int interfacesHidden();
43 
44  QMenu * getSelectionMenu();
45  int interfacesPresent();
46  void ensureSelectedInterface();
47 
48 Q_SIGNALS:
49  void showExtcapOptions(QString device_name, bool startCaptureOnClose);
50  void startCapture(QStringList);
51  void itemSelectionChanged();
52  void typeSelectionChanged();
53 
54 public slots:
55  void updateSelectedInterfaces();
56  void interfaceListChanged();
57  void toggleHiddenInterfaces();
58 #ifdef HAVE_PCAP_REMOTE
59  void toggleRemoteInterfaces();
60 #endif
61  void showRunOnFile();
62  void showContextMenu(QPoint pos);
63 
64 protected:
65  void hideEvent(QHideEvent *evt);
66  void showEvent(QShowEvent *evt);
67 
68 private:
69 
70  void resetInterfaceTreeDisplay();
71  bool haveLocalCapturePermissions() const;
72 
73  Ui::InterfaceFrame *ui;
74 
75  InterfaceSortFilterModel proxy_model_;
76  InterfaceTreeModel source_model_;
77  InfoProxyModel info_model_;
78 
79  QMap<int, QString> ifTypeDescription;
80 
81 #ifdef HAVE_LIBPCAP
82  QTimer *stat_timer_;
83 #endif // HAVE_LIBPCAP
84 
85 private slots:
86  void interfaceTreeSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
87 
88  void on_interfaceTree_doubleClicked(const QModelIndex &index);
89 #ifdef HAVE_LIBPCAP
90  void on_interfaceTree_clicked(const QModelIndex &index);
91 #endif
92 
93  void updateStatistics(void);
94  void actionButton_toggled(bool checked);
95  void triggeredIfTypeButton();
96  void on_warningLabel_linkActivated(const QString &link);
97 };
98 
99 #endif // INTERFACE_FRAME_H
Definition: info_proxy_model.h:21
Definition: interface_frame.h:36
Definition: interface_sort_filter_model.h:24
Definition: interface_tree_model.h:57