You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mainwindow.h 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QUdpSocket>
  5. namespace Ui {
  6. class MainWindow;
  7. }
  8. class MainWindow : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit MainWindow(QWidget *parent = nullptr);
  13. ~MainWindow();
  14. private slots:
  15. void applyButton();
  16. void readPCSocketData();
  17. void setLogBCIData(const bool log);
  18. void clearLog();
  19. void pushTac1();
  20. void pushTac2();
  21. void pushTac3();
  22. void pushTac4();
  23. void pushTac5();
  24. void pushTac6();
  25. private:
  26. Ui::MainWindow *ui;
  27. int PCIP_1, PCIP_2, PCIP_3, PCIP_4;
  28. QHostAddress PCIP_full;
  29. quint16 PCPort;
  30. int FeatherIP_1, FeatherIP_2, FeatherIP_3, FeatherIP_4;
  31. QHostAddress FeatherIP_full;
  32. quint16 FeatherPort;
  33. void log(QString logtext);
  34. QString getCurrentTime();
  35. void setupSignalsAndSlots();
  36. QString buildPCIP();
  37. QString buildFeatherIP();
  38. QString stylesheet_tac_marked, stylesheet_tac_unmarked;
  39. QString lastBufferStr;
  40. QUdpSocket *udpSocket_PC, *udpSocket_Feather;
  41. void markDirectionTactile(const QString direction);
  42. void bindPC();
  43. void setupFeather();
  44. bool logBCIData;
  45. bool checkPort(const quint16 port);
  46. };
  47. #endif // MAINWINDOW_H