Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkBasePropertyView.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #include "QmitkBasePropertyView.h"
17 
19  : QLabel(parent), PropertyView(property)
20 {
22 }
23 
25 {
26 }
27 
29 {
30  if (m_Property)
31  setText(m_Property->GetValueAsString().c_str());
32 }
33 
35 {
36  m_Property = nullptr;
37  setText("n/a");
38 }
virtual void PropertyChanged() override
Abstract base class for properties.
virtual std::string GetValueAsString() const
const mitk::BaseProperty * m_Property
QmitkBasePropertyView(const mitk::BaseProperty *, QWidget *parent)
virtual void PropertyRemoved() override