相关资料:
https://download.csdn.net/download/zhujianqiangqq/47534759 代码包下载
udpsend.h
1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QDateTime> 6 7 QT_BEGIN_NAMESPACE 8 namespace Ui { class MainWindow; } 9 QT_END_NAMESPACE 10 11 struct WeaponInfo 12 { 13 unsigned int type; 14 unsigned int quantity; 15 }; 16 struct PlaneInfo 17 { 18 double longitude; 19 double latitude; 20 double height; 21 WeaponInfo weapons[10]; 22 }; 23 struct PlaneInfos 24 { 25 unsigned int planeNumber; 26 PlaneInfo info [8]; 27 }; 28 29 30 class MainWindow : public QMainWindow 31 { 32 Q_OBJECT 33 34 public: 35 MainWindow(QWidget *parent = nullptr); 36 ~MainWindow(); 37 38 private slots: 39 void on_pushButton_clicked(); 40 void on_Timer(); 41 void on_pushButton_2_clicked(); 42 43 private: 44 Ui::MainWindow *ui; 45 QTimer *m_pTimer = NULL; 46 }; 47 #endif // MAINWINDOW_H