Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkStringPropertyOnDemandEdit.h
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 #ifndef QMITK_STRINGPROPERTYONDEMANDDEDITOR_H_INCLUDED
17 #define QMITK_STRINGPROPERTYONDEMANDDEDITOR_H_INCLUDED
18 
20 #include <QLabel>
21 #include <QLayout>
22 #include <mitkPropertyObserver.h>
23 #include <mitkStringProperty.h>
24 
26 {
27  Q_OBJECT
28 
29 signals:
30  void clicked();
31 
32 public:
33  QClickableLabel2(QWidget *parent, Qt::WindowFlags f = nullptr) : QLabel(parent, f) {}
34  virtual void mouseReleaseEvent(QMouseEvent *) override { emit clicked(); }
35 };
36 
39 {
40  Q_OBJECT
41 
42 public:
45 
46 protected:
47  virtual void PropertyChanged() override;
48  virtual void PropertyRemoved() override;
49 
51 
52  QHBoxLayout *m_layout;
53  QLabel *m_label;
55 
56 protected slots:
57 
58  void onToolButtonClicked();
59 };
60 
61 #endif
virtual void PropertyRemoved()=0
virtual void mouseReleaseEvent(QMouseEvent *) override
#define MITKQTWIDGETSEXT_EXPORT
QClickableLabel2(QWidget *parent, Qt::WindowFlags f=nullptr)
virtual void PropertyChanged()=0
Property for strings.