CustusX  22.04-rc2
An IGT application
cxSoundSpeedConversionWidget.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 CXSOUNDSPEEDCONVERSIONWIDGET_H_
13 #define CXSOUNDSPEEDCONVERSIONWIDGET_H_
14 
15 #include "org_custusx_acquisition_Export.h"
16 
17 #include "cxBaseWidget.h"
18 #include "cxTool.h"
19 
20 class QPushButton;
21 class QDoubleSpinBox;
22 
23 namespace cx
24 {
39 class org_custusx_acquisition_EXPORT SoundSpeedConverterWidget : public BaseWidget
40 {
41  Q_OBJECT
42 
43 public:
44  SoundSpeedConverterWidget(TrackingServicePtr trackingService, QWidget* parent=NULL);
46 
47 public slots:
48  void applySoundSpeedCompensationFactorSlot();
49 
50 private slots:
51  void waterSoundSpeedChangedSlot();
52  void waterDegreeChangedSlot();
53  void resetSlot();
54  void setToolSlot(const QString& uid);
55 
56 private:
57  void setSoundSpeed(double soundspeed);
58  void setWaterDegree(double degree);
59  void updateButtons();
60 
61  double getSoundSpeedCompensationFactor();
62  double getWaterSoundSpeed();
63  void setProbe(ProbePtr probe);
64 
65  const double mScannerSoundSpeed; //m/s
66  double mToSoundSpeed; //m/s
67 
68  ProbePtr mProbe;
69  TrackingServicePtr mTrackingService;
70 
71  QPushButton* mApplyButton;
72  QPushButton* mResetButton;
73  QDoubleSpinBox* mSoundSpeedSpinBox; //m/s
74  QDoubleSpinBox* mWaterDegreeSpinBox; //celsius
75 };
76 
77 
81 }
82 
83 #endif /* CXSOUNDSPEEDCONVERSIONWIDGET_H_ */
boost::shared_ptr< class TrackingService > TrackingServicePtr
boost::shared_ptr< Probe > ProbePtr
Definition: cxProbe.h:72
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.