annotate Framework/Radiography/RadiographyLayerMoveTracker.h @ 414:f7616c010056

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 12 Nov 2018 18:00:48 +0100
parents
children b70e9be013e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
414
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "../Toolbox/UndoRedoStack.h"
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "../Widgets/IWorldSceneMouseTracker.h"
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "RadiographyScene.h"
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 namespace OrthancStone
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 {
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 class RadiographyLayerMoveTracker : public IWorldSceneMouseTracker
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 private:
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 class UndoRedoCommand;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 UndoRedoStack& undoRedoStack_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 RadiographyScene::LayerAccessor accessor_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 double clickX_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 double clickY_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 double panX_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 double panY_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 bool oneAxis_;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 public:
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 RadiographyLayerMoveTracker(UndoRedoStack& undoRedoStack,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 RadiographyScene& scene,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 size_t layer,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 double x,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 double y,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 bool oneAxis);
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 virtual bool HasRender() const
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 {
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 return false;
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 }
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 virtual void Render(CairoContext& context,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 double zoom);
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 virtual void MouseUp();
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 virtual void MouseMove(int displayX,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 int displayY,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 double sceneX,
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 double sceneY);
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 };
f7616c010056 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }