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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 pushLeft(const bool checked);
  20. void pushRight(const bool checked);
  21. void pushForward(const bool state);
  22. void pushBack(const bool state);
  23. void allLOW();
  24. void allHIGH();
  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 leftON, rightON, forwardON, backON;
  46. void pushDirection();
  47. bool checkPort(const quint16 port);
  48. };
  49. #endif // MAINWINDOW_H