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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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(const bool checked);
  20. void pushTac2(const bool checked);
  21. void pushTac3(const bool state);
  22. void pushTac4(const bool state);
  23. void pushTac5(const bool state);
  24. void pushTac6(const bool state);
  25. void allLOW();
  26. void allHIGH();
  27. private:
  28. Ui::MainWindow *ui;
  29. int PCIP_1, PCIP_2, PCIP_3, PCIP_4;
  30. QHostAddress PCIP_full;
  31. quint16 PCPort;
  32. int FeatherIP_1, FeatherIP_2, FeatherIP_3, FeatherIP_4;
  33. QHostAddress FeatherIP_full;
  34. quint16 FeatherPort;
  35. void log(QString logtext);
  36. QString getCurrentTime();
  37. void setupSignalsAndSlots();
  38. QString buildPCIP();
  39. QString buildFeatherIP();
  40. QString stylesheet_tac_marked, stylesheet_tac_unmarked;
  41. QString lastBufferStr;
  42. QUdpSocket *udpSocket_PC, *udpSocket_Feather;
  43. void markDirectionTactile(const QString direction);
  44. void bindPC();
  45. void setupFeather();
  46. bool logBCIData;
  47. bool tac1ON, tac2ON, tac3ON, tac4ON, tac5ON, tac6ON;
  48. void pushDirection();
  49. bool checkPort(const quint16 port);
  50. };
  51. #endif // MAINWINDOW_H