mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtGui>
#include <iostream>
#include <fstream>
#include <QComboBox>
#include <QMenuBar>
#include <QLabel>
#include <QTableWidget>
#include <QCheckBox>
#include <QLineEdit>
#include <QFileDialog>
#include <QMessageBox>
#include <QApplication>
#include "packet.h"
using namespace std;
namespace Ui {
class MainWindow;
}
bool ReadFile(string, vector<Packet> &) ;
bool SaveFile(string, vector<Packet>) ;
void FilterBySrcAddr(vector<Packet> &, string );
void FilterByDstAddr(vector<Packet> &, string );
void FilterBySrcPort(vector<Packet> &, int) ;
void FilterByDstPort(vector<Packet> &, int) ;
void SortBySrcAddr(vector<Packet> &) ;
void SortByDstAddr(vector<Packet> &) ;
void SortBySrcPort(vector<Packet> &) ;
void SortByDstPort(vector<Packet> &) ;
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
int numPackets, numOctects;
int filterMethod;
vector< Packet > netdata; // Used to store the data from the network file
QTableWidgetItem *item; //This pointer is used to create table entries and add them to the table
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_Filter_Box_currentIndexChanged(int index); //
void on_actionLoad_Network_Data_triggered(); //
void on_actionAbout_triggered(); //
void on_actionExit_triggered();
void FillTable();
void on_runFilter_clicked();
void on_sortButton_clicked();
void on_openFile_clicked();
void on_saveFile_clicked();
void on_clearButton_clicked();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
Ui
Definition: mainwindow.h:21
FilterBySrcPort
void FilterBySrcPort(vector< Packet > &netdata, int port)
Definition: Filter.cpp:49
std
SaveFile
bool SaveFile(string fname, vector< Packet > netdata)
Function that saves a file to the computer. It returns true when the file was succesfully saved and f...
Definition: File.cpp:62
FilterByDstPort
void FilterByDstPort(vector< Packet > &netdata, int port)
Definition: Filter.cpp:65
SortBySrcAddr
void SortBySrcAddr(vector< Packet > &netdata)
Function that sorts by source address the packets in the netflow file using the Bubble sort algorithm...
Definition: Sort.cpp:17
FilterByDstAddr
void FilterByDstAddr(vector< Packet > &netdata, string address)
Definition: Filter.cpp:33
ReadFile
bool ReadFile(string fname, vector< Packet > &netdata)
Function that reads a file and return a boolean that determines if the file was succesfully opened an...
Definition: File.cpp:23
FilterBySrcAddr
void FilterBySrcAddr(vector< Packet > &netdata, string address)
Definition: Filter.cpp:15
SortByDstPort
void SortByDstPort(vector< Packet > &netdata)
Function that sorts by destination port the packets in the netflow file using the Bubble sort algorit...
Definition: Sort.cpp:105
SortByDstAddr
void SortByDstAddr(vector< Packet > &netdata)
Function that sorts by destination address the packets in the netflow file using the Selection sort a...
Definition: Sort.cpp:48
SortBySrcPort
void SortBySrcPort(vector< Packet > &netdata)
Function that sorts by source port the packets in the netflow file using the Bubble sort algorithm...
Definition: Sort.cpp:77
MainWindow
Definition: mainwindow.h:145