CustusX  22.04-rc5
An IGT application
cxSyncedValue.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 
12 #include "cxSyncedValue.h"
13 
14 namespace cx
15 {
16 
17 SyncedValue::SyncedValue(QVariant val) :
18  mValue(val)
19 {
20 }
22 {
23  return SyncedValuePtr(new SyncedValue(val));
24 }
25 void SyncedValue::set(QVariant val)
26 {
27  if (mValue == val)
28  return;
29  mValue = val;
30  emit changed();
31 }
32 QVariant SyncedValue::get() const
33 {
34  return mValue;
35 }
36 
37 
38 } //namespace cx
QVariant get() const
void set(QVariant val)
SyncedValue(QVariant val=QVariant())
static SyncedValuePtr create(QVariant val=QVariant())
boost::shared_ptr< class SyncedValue > SyncedValuePtr
Definition: cxViewGroup.h:30
Namespace for all CustusX production code.