Medical Imaging Interaction Toolkit  2023.12.99-29da53b2
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 QmitkStringPropertyOnDemandEdit_h
13 #define QmitkStringPropertyOnDemandEdit_h
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 = {}) : 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
MITKQTWIDGETSEXT_EXPORT
#define MITKQTWIDGETSEXT_EXPORT
Definition: MitkQtWidgetsExtExports.h:15
QClickableLabel2::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *) override
Definition: QmitkStringPropertyOnDemandEdit.h:30
mitk::StringProperty
Property for strings.
Definition: mitkStringProperty.h:34
mitk::PropertyObserver::PropertyChanged
virtual void PropertyChanged()=0
mitk::PropertyObserver::PropertyRemoved
virtual void PropertyRemoved()=0
QmitkStringPropertyOnDemandEdit::m_label
QLabel * m_label
Definition: QmitkStringPropertyOnDemandEdit.h:49
QmitkStringPropertyOnDemandEdit::m_layout
QHBoxLayout * m_layout
Definition: QmitkStringPropertyOnDemandEdit.h:48
mitkStringProperty.h
QClickableLabel2::QClickableLabel2
QClickableLabel2(QWidget *parent, Qt::WindowFlags f={})
Definition: QmitkStringPropertyOnDemandEdit.h:29
QmitkStringPropertyOnDemandEdit::m_StringProperty
mitk::StringProperty * m_StringProperty
Definition: QmitkStringPropertyOnDemandEdit.h:46
mitk::PropertyEditor
Definition: mitkPropertyObserver.h:67
QmitkStringPropertyOnDemandEdit::m_toolbutton
QClickableLabel2 * m_toolbutton
Definition: QmitkStringPropertyOnDemandEdit.h:50
mitkPropertyObserver.h
MitkQtWidgetsExtExports.h
QmitkStringPropertyOnDemandEdit
Definition: QmitkStringPropertyOnDemandEdit.h:34
QClickableLabel2
Definition: QmitkStringPropertyOnDemandEdit.h:21