-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathControllerGraphicScene.h
More file actions
66 lines (56 loc) · 2 KB
/
ControllerGraphicScene.h
File metadata and controls
66 lines (56 loc) · 2 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
/****************************************************************************
**
** This file is part of the BioTracker Framework
** by Andreas Jörg
**
****************************************************************************/
#ifndef CONTROLLERGRAPHICSCENE_H
#define CONTROLLERGRAPHICSCENE_H
#include "IControllerCfg.h"
#include "QGraphicsObject"
#include "QPointer"
/**
* The ControllerGraphicScene class controlls the component for rendering
* TextureObjects and TrackedComponents on a GraphhicsView. Each PixmapItem
* represents a cv::Mat. The cv::Mat comes from the TextureObjects-Component of
* BioTracker. The GraphicsItem represents the compositum structure of
* IViewTrackedComponent classes. These structure comes from the
* ControllerTrackedComponentCore or the Plugin and handed over by the
* PluginController of the MainApplication.
*
*/
class ControllerGraphicScene : public IControllerCfg
{
Q_OBJECT
public:
ControllerGraphicScene(
QObject* parent = 0,
IBioTrackerContext* context = 0,
ENUMS::CONTROLLERTYPE ctr = ENUMS::CONTROLLERTYPE::NO_CTR);
/**
* This methode add a the root node of the compositum structure of
* IViewTrackedComponent classes to the GraphicsView canvas. All child
* nodes will be rendered on a GraphicsView canvas as well.
*/
void addGraphicsItem(QGraphicsItem* item);
/**
* This methode adds a IViewGraphicsPixmapItem to the GraphicsView canvas
* for rendering.
*/
void addTextureObject(QGraphicsItem* item);
signals:
void signalToggleAntialiasingFull(bool toggle);
public slots:
void receiveToggleAntialiasingFull(bool toggle);
// IController interface
protected:
void createModel() override;
void createView() override;
void connectModelToController() override;
void connectControllerToController() override;
private:
IView* m_GraphicsView;
IModel* m_Element;
QPointer<IModel> m_NullModel;
};
#endif // CONTROLLERGRAPHICSCENE_H