-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.h
67 lines (55 loc) · 1.8 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "capturethread.h"
#include "analysethread.h"
#include "packetprintthread.h"
#include "interfacesdialog.h"
#include "offlinecapturethread.h"
#include "detailprintthread.h"
#include "rawprintthread.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
// void PrintDetaildata(int);
// void PrintRawdata();
void InitPacketModel();
private slots:
void on_actionQuit_triggered();
void on_actionAbout_mSniffer_triggered();
void on_actionRefresh_Interfaces_triggered();
void on_actionStart_triggered();
void on_actionStop_triggered();
void on_actionRestart_triggered();
void on_actionPause_triggered();
// void StartOrStopThread();
void UpdatePacketView();
void UpdateDetailView();
void UpdateRawView();
void StopPrint();
void StopAnalyze();
void on_tableView_packet_clicked(const QModelIndex &index);
void on_actionOpen_triggered();
void on_actionSave_triggered();
private:
Ui::MainWindow *ui;
int selnum;//选中的数据包编号
volatile bool startFlag;//开始抓包标志
volatile bool rawdataFlag;//正在输出Rawdata标志
InterfacesDialog *chosedialog;//选择网卡对话框
CaptureThread capThread;//捕获数据包线程
AnalyseThread anaThread;//分析数据包线程
PrintThread packetpriThread;//实时打印数据包信息线程
OfflineCaptureThread offThread;
DetailPrintThread detailpriThread;
RawPrintThread rawpriThread;
int comboindex;//选择过滤方式下拉表框
// MyGraph *Piegraph;//输出统计饼图窗口
};
#endif // MAINWINDOW_H