-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
70 lines (54 loc) · 1.45 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
68
69
70
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "sniffer.h"
#include "qcustomplot.h"
#include <QTimer>
#define MAX_COUNT_PACKET_IN_LOG 128
#define MAX_COUNT_PACKET_IN_GRAPH 128
#define COUNT_GRAPH 3
namespace Ui {
class MainWindow;
}
struct CGraphData
{
quint8 graph_number;
quint32 size;
quint64 time;
CGraphData():graph_number(COUNT_GRAPH - 1),size(0),time(0){}
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
CQTSniffer *QSniff;
void set_graphplot_setting(); //настройка графического полотна
QTimer* timer;
quint64 Time_zero_plot; //время запуска программы
//QVector<CGraphData> Graph_Data;
QString Log_Date;
quint16 counter_log;
void data_graph_overwriting();
void data_log_overwriting();
public slots:
void on_StartSniff_clicked();
void add_String_to_Listen(QString new_string);
void graph_replot();
void add_graph_data(quint8 protocol, quint32 size, quint64 time);
void device_ready(bool flag);
signals:
void run_sniff();
void set_filter(QString filter);
void graph_ready(bool flag);
void log_ready(bool flag);
private slots:
void on_buttonAll_clicked();
void on_buttonTCP_clicked();
void on_buttonUDP_clicked();
void on_buttonIGMP_clicked();
};
#endif // MAINWINDOW_H