comparison Framework/Radiography/RadiographyWidget.h @ 1066:b537002f83a9 broker

removing broker from deprecated classes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Oct 2019 15:39:39 +0200
parents c35e98d22764
children 1a73f852810a
comparison
equal deleted inserted replaced
1065:9d42f89b8c3c 1066:b537002f83a9
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "../Deprecated/Widgets/WorldSceneWidget.h" 24 #include "../Deprecated/Widgets/WorldSceneWidget.h"
25 #include "../Messages/ObserverBase.h"
25 #include "RadiographyScene.h" 26 #include "RadiographyScene.h"
26 27
27 28
28 namespace OrthancStone 29 namespace OrthancStone
29 { 30 {
30 class RadiographyMaskLayer; 31 class RadiographyMaskLayer;
31 32
32 class RadiographyWidget : 33 class RadiographyWidget :
33 public Deprecated::WorldSceneWidget, 34 public Deprecated::WorldSceneWidget,
34 public IObserver 35 public ObserverBase<RadiographyWidget>
35 { 36 {
36 private: 37 private:
37 boost::shared_ptr<RadiographyScene> scene_; 38 boost::shared_ptr<RadiographyScene> scene_;
38 std::auto_ptr<Orthanc::ImageAccessor> floatBuffer_; 39 std::auto_ptr<Orthanc::ImageAccessor> floatBuffer_;
39 std::auto_ptr<CairoSurface> cairoBuffer_; 40 std::auto_ptr<CairoSurface> cairoBuffer_;
58 virtual void RenderBackground(Orthanc::ImageAccessor& image, float minValue, float maxValue); 59 virtual void RenderBackground(Orthanc::ImageAccessor& image, float minValue, float maxValue);
59 60
60 bool IsInvertedInternal() const; 61 bool IsInvertedInternal() const;
61 62
62 public: 63 public:
63 RadiographyWidget(MessageBroker& broker, 64 RadiographyWidget(boost::shared_ptr<RadiographyScene> scene, // TODO: check how we can avoid boost::shared_ptr here since we don't want them in the public API (app is keeping a boost::shared_ptr to this right now)
64 boost::shared_ptr<RadiographyScene> scene, // TODO: check how we can avoid boost::shared_ptr here since we don't want them in the public API (app is keeping a boost::shared_ptr to this right now)
65 const std::string& name); 65 const std::string& name);
66 66
67 RadiographyScene& GetScene() const 67 RadiographyScene& GetScene() const
68 { 68 {
69 return *scene_; 69 return *scene_;