forked from labstreaminglayer/App-LabRecorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
68 lines (49 loc) · 1.28 KB
/
mainwindow.h
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
66
67
68
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
// Qt
#include "ui_mainwindow.h"
#include <QCloseEvent>
#include <QListWidget>
#include <QMainWindow>
#include <QStringList>
#include <QTimer>
#include <memory>
// LSL
#include <lsl_cpp.h>
class recording;
class RecorderItem {
public:
QListWidgetItem listItem;
std::string uid;
};
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent, const char *config_file);
~MainWindow() noexcept override;
private slots:
void statusUpdate(void) const;
void closeEvent(QCloseEvent *ev) override;
void blockSelected(const QString &block);
std::vector<lsl::stream_info> refreshStreams(void);
void startRecording(void);
void stopRecording(void);
void selectAllStreams();
void selectNoStreams();
private:
QSet<QString> getCheckedStreams() const;
std::unique_ptr<recording> currentRecording;
int startTime;
std::unique_ptr<QTimer> timer;
int currentTrial;
QString currentBlock;
QStringList requiredStreams;
std::map<std::string, int> syncOptionsByStreamName;
QSet<QString> missingStreams;
QString recFilename;
// function for loading config file
void load_config(QString filename);
void save_config(QString filename);
std::unique_ptr<Ui::MainWindow> ui; // window pointer
};
#endif // MAINWINDOW_H