123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef MAINWINDOW_H
- #define MAINWINDOW_H
-
- #include <QMainWindow>
- #include <QUdpSocket>
-
- namespace Ui {
- class MainWindow;
- }
-
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
-
- public:
- explicit MainWindow(QWidget *parent = nullptr);
- ~MainWindow();
-
- private slots:
- void applyButton();
- void readPCSocketData();
- void setLogBCIData(const bool log);
- void clearLog();
- void pushLeft(const bool checked);
- void pushRight(const bool checked);
- void pushForward(const bool state);
- void pushBack(const bool state);
- void allLOW();
- void allHIGH();
- private:
- Ui::MainWindow *ui;
-
- int PCIP_1, PCIP_2, PCIP_3, PCIP_4;
- QHostAddress PCIP_full;
- quint16 PCPort;
- int FeatherIP_1, FeatherIP_2, FeatherIP_3, FeatherIP_4;
- QHostAddress FeatherIP_full;
- quint16 FeatherPort;
- void log(QString logtext);
- QString getCurrentTime();
- void setupSignalsAndSlots();
- QString buildPCIP();
- QString buildFeatherIP();
- QString stylesheet_tac_marked, stylesheet_tac_unmarked;
- QString lastBufferStr;
-
-
- QUdpSocket *udpSocket_PC, *udpSocket_Feather;
- void markDirectionTactile(const QString direction);
- void bindPC();
- void setupFeather();
-
- bool logBCIData;
-
- bool leftON, rightON, forwardON, backON;
- void pushDirection();
- bool checkPort(const quint16 port);
- };
-
- #endif // MAINWINDOW_H
|