Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef QMITK_STRINGPROPERTYONDEMANDDEDITOR_H_INCLUDED
13 #define QMITK_STRINGPROPERTYONDEMANDDEDITOR_H_INCLUDED
14 
16 #include <QLabel>
17 #include <QLayout>
18 #include <mitkPropertyObserver.h>
19 #include <mitkStringProperty.h>
20 
22 {
23  Q_OBJECT
24 
25 signals:
26  void clicked();
27 
28 public:
29  QClickableLabel2(QWidget *parent, Qt::WindowFlags f = nullptr) : QLabel(parent, f) {}
30  void mouseReleaseEvent(QMouseEvent *) override { emit clicked(); }
31 };
32 
35 {
36  Q_OBJECT
37 
38 public:
41 
42 protected:
43  void PropertyChanged() override;
44  void PropertyRemoved() override;
45 
47 
48  QHBoxLayout *m_layout;
49  QLabel *m_label;
51 
52 protected slots:
53 
54  void onToolButtonClicked();
55 };
56 
57 #endif
virtual void PropertyRemoved()=0
#define MITKQTWIDGETSEXT_EXPORT
QClickableLabel2(QWidget *parent, Qt::WindowFlags f=nullptr)
virtual void PropertyChanged()=0
void mouseReleaseEvent(QMouseEvent *) override
Property for strings.