mainwindow.h 538 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include "myserver.h"
  5. #include <QUdpSocket>
  6. namespace Ui {
  7. class MainWindow;
  8. }
  9. class MainWindow : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit MainWindow(QWidget *parent = nullptr);
  14. ~MainWindow();
  15. private slots:
  16. void on_pushButton_clicked();
  17. void on_upd_received();
  18. private:
  19. Ui::MainWindow *ui;
  20. MyServer server;
  21. int started=0;
  22. QUdpSocket *udpSocket;
  23. QString getHostIp();
  24. QString getHostName();
  25. };
  26. #endif // MAINWINDOW_H