Mercurial > hg > orthanc-stone
comparison Samples/Common/MeasureTools.h @ 644:f939f449482c
Ongoing tracker work.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 10 May 2019 16:15:55 +0200 |
parents | 500c3f70b6c2 |
children | 1e9ed656318e |
comparison
equal
deleted
inserted
replaced
634:6a144a45b2d8 | 644:f939f449482c |
---|---|
23 #include <Framework/Scene2D/ScenePoint2D.h> | 23 #include <Framework/Scene2D/ScenePoint2D.h> |
24 #include <Framework/Scene2D/PolylineSceneLayer.h> | 24 #include <Framework/Scene2D/PolylineSceneLayer.h> |
25 #include <Framework/Scene2D/TextSceneLayer.h> | 25 #include <Framework/Scene2D/TextSceneLayer.h> |
26 | 26 |
27 #include <boost/shared_ptr.hpp> | 27 #include <boost/shared_ptr.hpp> |
28 #include <boost/weak_ptr.hpp> | |
28 | 29 |
29 #include <vector> | 30 #include <vector> |
30 #include <cmath> | 31 #include <cmath> |
31 | 32 |
32 namespace OrthancStone | 33 namespace OrthancStone |
48 command object but is disabled so that it can be redone later on easily) | 49 command object but is disabled so that it can be redone later on easily) |
49 */ | 50 */ |
50 void Disable(); | 51 void Disable(); |
51 | 52 |
52 protected: | 53 protected: |
53 MeasureTool(Scene2D& scene) | 54 MeasureTool(Scene2D& scene) |
54 : scene_(scene) | 55 : scene_(scene) |
55 , enabled_(true) | 56 , enabled_(true) |
56 { | 57 { |
57 } | 58 } |
58 | 59 |
62 This is the meat of the tool: this method must [create (if needed) and] | 63 This is the meat of the tool: this method must [create (if needed) and] |
63 update the layers and their data according to the measure tool kind and | 64 update the layers and their data according to the measure tool kind and |
64 current state. This is repeatedly called during user interaction | 65 current state. This is repeatedly called during user interaction |
65 */ | 66 */ |
66 virtual void RefreshScene() = 0; | 67 virtual void RefreshScene() = 0; |
67 | |
68 | 68 |
69 Scene2D& GetScene() | 69 Scene2D& GetScene() |
70 { | 70 { |
71 return scene_; | 71 return scene_; |
72 } | 72 } |