Mercurial > hg > orthanc-stone
annotate Framework/Scene2DViewport/EditAngleMeasureTracker.h @ 1113:3924ddbbadda
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 04 Nov 2019 12:47:13 +0100 |
parents | ac88989817e3 |
children | e713f1a99861 2d8ab34c8c91 |
rev | line source |
---|---|
866
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
6 * |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
16 * |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
19 **/ |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 #pragma once |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 #include "MeasureTrackers.h" |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
24 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
25 namespace OrthancStone |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
26 { |
1020
ac88989817e3
TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
Benjamin Golinvaux <bgo@osimis.io>
parents:
866
diff
changeset
|
27 class EditAngleMeasureCommand; |
ac88989817e3
TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
Benjamin Golinvaux <bgo@osimis.io>
parents:
866
diff
changeset
|
28 |
866
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
29 class EditAngleMeasureTracker : public EditMeasureTracker |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
30 { |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 public: |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 /** |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 When you create this tracker, you need to supply it with the undo stack |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 where it will store the commands that perform the actual measure tool |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 creation and modification. |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 In turn, a container for these commands to store the actual measuring |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 must be supplied, too |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 */ |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 EditAngleMeasureTracker( |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 boost::shared_ptr<AngleMeasureTool> measureTool, |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 MessageBroker& broker, |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 boost::weak_ptr<ViewportController> controllerW, |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 const PointerEvent& e); |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 ~EditAngleMeasureTracker(); |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 virtual void PointerMove(const PointerEvent& e) ORTHANC_OVERRIDE; |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 virtual void PointerUp(const PointerEvent& e) ORTHANC_OVERRIDE; |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
49 virtual void PointerDown(const PointerEvent& e) ORTHANC_OVERRIDE; |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
51 private: |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
52 AngleMeasureTool::AngleHighlightArea modifiedZone_; |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
53 |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
54 boost::shared_ptr<EditAngleMeasureCommand> GetCommand(); |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
55 }; |
c71ef52602a0
Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
56 } |