-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathControllerTrackedComponentCore.h
More file actions
123 lines (98 loc) · 3.86 KB
/
ControllerTrackedComponentCore.h
File metadata and controls
123 lines (98 loc) · 3.86 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#ifndef CONTROLLERTRACKEDCOMPONENTCORE_H
#define CONTROLLERTRACKEDCOMPONENTCORE_H
#include "IControllerCfg.h"
#include "Interfaces/IModel/IModelTrackedTrajectory.h"
/**
* The ControllerTrackedComponentCore class controls the component for
* visualizing TrackedComponents. It is basically a forwarder for permissions,
* user interaction signals (including tracking data manipulation).
*/
class ControllerTrackedComponentCore : public IControllerCfg
{
Q_OBJECT
public:
ControllerTrackedComponentCore(
QObject* parent = 0,
IBioTrackerContext* context = 0,
ENUMS::CONTROLLERTYPE ctr =
ENUMS::CONTROLLERTYPE::TRACKEDCOMPONENTCORE);
/**
* Hook for the view to put in in the mainwindow's media panel each time a
* plugin is loaded
*/
IView* getTrackingElementsWidgetCore();
/**
* The model is actually the tracking data from the tracking plugin. This
* component only reads this data. Is called when a new tracking plugin is
* loaded.
*/
void addModel(IModel* model);
/**
* Hook for the view to get the core parameters to set up new
* componentshapes with default settings
*/
IModel* getCoreParameter();
/*
* SIGNALS
*/
signals:
/// signal to ctrcommands to remove trajectory
void emitRemoveTrajectory(IModelTrackedTrajectory* trajectory);
/// signal to ctrcommands to remove entity
void emitRemoveTrackEntity(IModelTrackedTrajectory* trajectory,
uint frameNumber);
/// signal to ctrcommands to add trajectory
void emitAddTrajectory(QPoint pos, int id);
/// signal to ctrcommands to move entity
void emitMoveElement(IModelTrackedTrajectory* trajectory,
QPoint oldPos,
QPoint newPos,
uint frameNumber,
int toMove);
/// signal to ctrcommands to swap track id's
void emitSwapIds(IModelTrackedTrajectory* trajectory0,
IModelTrackedTrajectory* trajectory1);
/// signal to ctrcommands fix or unfix a traj
void emitToggleFixTrack(IModelTrackedTrajectory* trajectory, bool toggle);
/// signal to ctrcommands rotate entity
void emitEntityRotation(IModelTrackedTrajectory*,
double oldAngleDeg,
double newAngleDeg,
uint frameNumber);
/// signal to ctrCoreParameter to show number of valid trrajectories
void emitTrackNumber(int number);
/// signal to view to update its dimensions
void emitDimensionUpdate(int x, int y);
// forward left-toolbar actions to view
void emitAddTrack();
void emitDeleteSelectedTracks();
void emitSwapIdsToView();
void emitSelectAll();
void emitChangeColorBorder();
void emitChangeColorFill();
void emitGoToFrame(int frame);
/*
* SLOTS
*/
public Q_SLOTS:
/// A (different) plugin has been loaded. Here, the controller needs to
/// inform the view
void receiveOnPluginLoaded();
/// this slot gets triggered when the core-view needs to update with the
/// current frame
void receiveVisualizeTrackingModel(uint framenumber);
/// gets triggered when plugin sends permissions and forwards it to the
/// view
void setCorePermission(std::pair<ENUMS::COREPERMISSIONS, bool> permission);
/// gets triggered when a the view needs an update
void receiveUpdateView();
// IController interface
protected:
void createModel() override;
void createView() override;
void connectModelToController() override;
void connectControllerToController() override;
// IView* m_parameterView;
// IModel* m_coreParameterModel;
};
#endif // CONTROLLERTRACKEDCOMPONENTCORE_H