NorMIT-nav  22.09
An IGT application
cxTrackPadWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXTRACKPADWIDGET_H_
13 #define CXTRACKPADWIDGET_H_
14 
15 #include "cxGuiExport.h"
16 
17 #include "cxBaseWidget.h"
18 
19 #include <vector>
20 #include <QtWidgets>
21 
22 #include <QGraphicsView>
23 #include "cxVector3D.h"
24 #include "cxDoubleWidgets.h"
25 #include "cxForwardDeclarations.h"
26 #include "vtkForwardDeclarations.h"
27 #include "cxMousePadWidget.h"
28 
29 namespace cx
30 {
31 
44 class cxGui_EXPORT TrackPadWidget : public BaseWidget
45 {
46  Q_OBJECT
47 
48 public:
49  TrackPadWidget(ViewServicePtr viewService, QWidget* parent);
50  virtual ~TrackPadWidget();
51 
52 signals:
53 
54 protected slots:
55  void dollySlot(QPointF delta);
56  void panXZSlot(QPointF delta);
57  void rotateYSlot(QPointF delta);
58  void rotateXZSlot(QPointF delta);
59 
60 protected:
61  virtual void showEvent(QShowEvent* event);
62  virtual void hideEvent(QCloseEvent* event);
63 
64 private:
65  CameraControlPtr mCameraControl;
66  QVBoxLayout* mTopLayout;
67  QSize mMinPadSize;
68  QSize mMinBarSize;
69  ViewServicePtr mViewService;
70 
71  vtkCameraPtr getCamera() const;
72  void defineRotateLayout();
73  void definePanLayout();
74 
75  void createStandard3DViewActions();
76 };
77 
78 }//end namespace cx
79 
80 
81 
82 #endif /* CXTRACKPADWIDGET_H_ */
cxBaseWidget.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::BaseWidget
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
cxForwardDeclarations.h
cxVector3D.h
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
vtkForwardDeclarations.h
vtkCameraPtr
vtkSmartPointer< class vtkCamera > vtkCameraPtr
Definition: vtkForwardDeclarations.h:39
cxMousePadWidget.h
cx::CameraControlPtr
boost::shared_ptr< class CameraControl > CameraControlPtr
Definition: cxForwardDeclarations.h:150
cx::TrackPadWidget
Widget for controlling the camera in the 3D view.
Definition: cxTrackPadWidget.h:44
cxDoubleWidgets.h