annotate Samples/Qt/Scene2DInteractor.h @ 1307:8a28a9bf8876 broker

ViewportController now gets a ref to its parent viewport for proper lock usage
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 04 Mar 2020 10:07:37 +0100
parents aad5ccf1be10
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
879
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 #pragma once
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
884
aad5ccf1be10 cleanup
Alain Mazy <alain@mazy.be>
parents: 883
diff changeset
3 #include "../../Applications/Generic/Scene2DInteractor.h"
881
Alain Mazy <alain@mazy.be>
parents: 879
diff changeset
4 #include "../../Framework/Scene2DViewport/IFlexiblePointerTracker.h"
883
30268a0cafca basic scene Qt sample working
Alain Mazy <alain@mazy.be>
parents: 881
diff changeset
5
30268a0cafca basic scene Qt sample working
Alain Mazy <alain@mazy.be>
parents: 881
diff changeset
6
879
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7 class BasicScene2DInteractor : public OrthancStone::Scene2DInteractor
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8 {
884
aad5ccf1be10 cleanup
Alain Mazy <alain@mazy.be>
parents: 883
diff changeset
9 boost::shared_ptr<OrthancStone::IFlexiblePointerTracker> currentTracker_;
879
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10 public:
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11 BasicScene2DInteractor(boost::shared_ptr<OrthancStone::ViewportController> viewportController) :
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
12 Scene2DInteractor(viewportController)
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
13 {}
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
14
883
30268a0cafca basic scene Qt sample working
Alain Mazy <alain@mazy.be>
parents: 881
diff changeset
15 virtual bool OnMouseEvent(const OrthancStone::GuiAdapterMouseEvent& event, const OrthancStone::PointerEvent& pointerEvent) override;
30268a0cafca basic scene Qt sample working
Alain Mazy <alain@mazy.be>
parents: 881
diff changeset
16 virtual bool OnKeyboardEvent(const OrthancStone::GuiAdapterKeyboardEvent& guiEvent);
30268a0cafca basic scene Qt sample working
Alain Mazy <alain@mazy.be>
parents: 881
diff changeset
17 virtual bool OnWheelEvent(const OrthancStone::GuiAdapterWheelEvent& guiEvent);
879
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
18 };
12b591d5d63c some Qt integration (wip)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
19