This repository was archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
65 lines (49 loc) · 1.4 KB
/
mainwindow.h
File metadata and controls
65 lines (49 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QCloseEvent>
#include <QFileDialog>
#include <QMessageBox>
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <string>
#include <vector>
// Tobii API
#include "tet.h"
#include "ttime.h"
#pragma comment (lib,"tet.lib")
#pragma comment (lib,"ttime.lib")
// LSL API
#include <lsl_cpp.h>
using namespace boost::asio;
using boost::asio::ip::udp;
typedef boost::shared_ptr<udp::socket> udp_socket_p;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent, const std::string &config_file);
~MainWindow();
private slots:
// config file dialog ops (from main menu)
void load_config_dialog();
void save_config_dialog();
// start the Tobii connection
void link_tobii();
// close event (potentially disabled)
void closeEvent(QCloseEvent *ev);
private:
// packet handling callback
static void __stdcall callback(ETet_CallbackReason reason, void *pData, void *pApplicationData);
void handle_packet(ETet_CallbackReason reason, void *pData);
// raw config file IO
void load_config(const std::string &filename);
void save_config(const std::string &filename);
boost::shared_ptr<lsl::stream_outlet> outlet; // our stream outlet
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H