-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathControllerDataExporter.h
More file actions
67 lines (57 loc) · 1.81 KB
/
ControllerDataExporter.h
File metadata and controls
67 lines (57 loc) · 1.81 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
66
67
#pragma once
#include "IControllerCfg.h"
#include "Interfaces/IBioTrackerPlugin.h"
#include "Interfaces/IModel/IModelTrackedComponentFactory.h"
#include "QPointer"
#include "QThread"
#include "Model/MediaPlayer.h"
// POD class to bundle some infos
struct SourceVideoMetadata
{
std::string name;
std::string fps;
};
class ControllerDataExporter : public IControllerCfg
{
Q_OBJECT
public:
ControllerDataExporter(
QObject* parent = 0,
IBioTrackerContext* context = 0,
ENUMS::CONTROLLERTYPE ctr = ENUMS::CONTROLLERTYPE::NO_CTR);
~ControllerDataExporter();
void cleanup();
// IController interface
public:
void connectControllerToController() override;
void setDataStructure(IModel* exp);
void setComponentFactory(IModelTrackedComponentFactory* exp);
IModelTrackedComponentFactory* getComponentFactory()
{
return _factory;
};
SourceVideoMetadata getSourceMetadata();
int getNumber(bool trial);
QString generateBasename(bool temporaryFile);
void loadFile(std::string file);
void saveFile(std::string file);
Q_SIGNALS:
void emitResetUndoStack();
void emitViewUpdate();
public Q_SLOTS:
void receiveReset();
void receiveTrackingDone(uint frame);
void receiveFinalizeExperiment();
void receiveFileWritten(QFileInfo fname);
void receiveTrialStarted(bool started);
protected:
void createModel() override;
void createView() override;
void connectModelToController() override;
private Q_SLOTS:
void rcvPlayerParameters(
std::shared_ptr<const playerParameters> parameters);
private:
IModelTrackedComponentFactory* _factory;
bool _trialStarted = false;
};