CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxStringPropertySelectPointMetric.cpp
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 
13 #include "cxPatientModelService.h"
14 #include "cxPointMetric.h"
15 #include "cxLogger.h"
16 
17 namespace cx {
18 
20  SelectDataStringPropertyBase(patientModelService, PointMetric::getTypeName())
21 {
22  mValueName = "Select point metric";
23  mHelp = "Select a point metric";
24 }
25 
27 {
28  if (value==mPointMetricUid)
29  return false;
30  mPointMetricUid = value;
31  emit changed();
32  emit dataChanged(mPointMetricUid);
33  return true;
34 }
35 
37 {
38  return mPointMetricUid;
39 }
40 
42 {
43  PointMetricPtr retval = mPatientModelService->getData<PointMetric>(mPointMetricUid);
44  return retval;
45 }
46 
47 } //namespace cx
StringPropertySelectPointMetric(PatientModelServicePtr patientModelService)
virtual QString getValue() const
get the data value.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
void changed()
emit when the underlying data value is changed: The user interface will be updated.
Data class that represents a single point.
Definition: cxPointMetric.h:42
virtual bool setValue(const QString &value)
set the data value.
Namespace for all CustusX production code.
boost::shared_ptr< class PointMetric > PointMetricPtr