| 1 | #ifndef MAINWINDOW_H |
| 2 | #define MAINWINDOW_H |
| 3 | |
| 4 | #include <QMainWindow> |
| 5 | #include <QTimer> |
| 6 | #include <QHostInfo> |
| 7 | #include <QVector> |
| 8 | #include <QSettings> |
| 9 | |
| 10 | #include "cNetStat.h" |
| 11 | #include "setupUtiliteKill.h" |
| 12 | |
| 13 | namespace Ui { |
| 14 | class MainWindow; |
| 15 | } |
| 16 | |
| 17 | class MainWindow : public QMainWindow{ |
| 18 | Q_OBJECT |
| 19 | |
| 20 | public: |
| 21 | explicit MainWindow(QWidget *parent = nullptr); |
| 22 | ~MainWindow(); |
| 23 | |
| 24 | private: |
| 25 | Ui::MainWindow *ui; |
| 26 | |
| 27 | void initPopupMenu(); |
| 28 | QString resolve(QString ipaddr, const QString &prot); |
| 29 | |
| 30 | QTimer *timerUpdate; |
| 31 | cNetStat *netstat; |
| 32 | QMenu *menu; |
| 33 | |
| 34 | QAction *actionPropertiesProcess; |
| 35 | QAction *actionKillProcess; |
| 36 | QAction *actionCloseConnection; |
| 37 | |
| 38 | QSettings *conf; |
| 39 | |
| 40 | int sortcol; |
| 41 | |
| 42 | QMap<QString,QString> DNSCache; |
| 43 | QMap<QString,QString> ServicesCache; |
| 44 | |
| 45 | |
| 46 | private slots: |
| 47 | void popupCustomMenu( const QPoint &pos ); |
| 48 | void killProcess(); |
| 49 | void PropertiesProcess(); |
| 50 | void closeConnection(); |
| 51 | |
| 52 | void timerUpdate_timeout(); |
| 53 | void drawTable(QVector<sNetStat> newNetStat); |
| 54 | |
| 55 | void CopyToClipboard(); |
| 56 | void CopyToFile(); |
| 57 | void restartAsRoot(); |
| 58 | |
| 59 | void tableWidget_sectionClicked(int col); |
| 60 | |
| 61 | void Resolve_Addresses(); |
| 62 | void lookedUp(const QHostInfo &host); |
| 63 | |
| 64 | void timer_speed1(); |
| 65 | void timer_speed3(); |
| 66 | void timer_speed5(); |
| 67 | void timer_pause(); |
| 68 | |
| 69 | void showAbout(); |
| 70 | void showSetupKill(); |
| 71 | }; |
| 72 | |
| 73 | #endif // MAINWINDOW_H |