|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #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 pushTac1(const bool checked);
- void pushTac2(const bool checked);
- void pushTac3(const bool state);
- void pushTac4(const bool state);
- void pushTac5(const bool state);
- void pushTac6(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 tac1ON, tac2ON, tac3ON, tac4ON, tac5ON, tac6ON;
- void pushDirection();
- bool checkPort(const quint16 port);
- };
-
- #endif // MAINWINDOW_H
|