Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkPropertyListPopup.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 
13 #ifndef QmitkPropertyListPopup_h
14 #define QmitkPropertyListPopup_h
15 
17 #include <QMenu>
18 
19 #include "mitkProperties.h"
20 #include "mitkPropertyList.h"
21 
22 class QmitkMaterialEditor;
23 
39 {
40  Q_OBJECT
41 
42 public:
44  QObject *parent = 0,
45  bool disableBoolProperties = false,
46  bool fillMenuImmediatelty = true,
47  const char *name = 0);
48 
49  virtual ~QmitkPropertyListPopup();
50 
51  void popup(const QPoint &pos, QAction *action = 0);
52 
53  void fillPopup();
54 
55 signals:
56 
57  void propertyListChangesDone();
58 
59 protected slots:
60 
61  void onNameClicked();
62  void onVisibleClicked();
63  void onColorClicked();
64  void onBoolPropertyClicked(int);
65  virtual void MaterialEditorChangesAccepted(QmitkMaterialEditor *ed);
66  virtual void popupAboutToHide();
67  void popupMenuItemHovered(QAction *action);
68 
69 protected:
70  virtual bool AddMaterialPopup();
71  virtual void UpdateNodeMaterialOnPopupHiding(bool &changes);
72  QIcon createColorIcon(QColor color);
73  QMenu *m_PopupMenu;
74 
76  std::vector<mitk::BoolProperty::Pointer> m_BoolProperties;
77  QMenu *m_InfoPopup;
78 
79  QAction *m_NameMenuAction;
84 
86 
88 
90 };
91 
92 #endif
QmitkPropertyListPopup::m_PopupMenu
QMenu * m_PopupMenu
Definition: QmitkPropertyListPopup.h:73
QmitkPropertyListPopup::m_DisableBoolProperties
bool m_DisableBoolProperties
Definition: QmitkPropertyListPopup.h:89
MITKQTWIDGETSEXT_EXPORT
#define MITKQTWIDGETSEXT_EXPORT
Definition: MitkQtWidgetsExtExports.h:15
QmitkPropertyListPopup::m_OpacityMenuAction
QAction * m_OpacityMenuAction
Definition: QmitkPropertyListPopup.h:83
QmitkPropertyListPopup::m_ColorMenuAction
QAction * m_ColorMenuAction
Definition: QmitkPropertyListPopup.h:81
QmitkPropertyListPopup::m_VisibleMenuAction
QAction * m_VisibleMenuAction
Definition: QmitkPropertyListPopup.h:80
QmitkPropertyListPopup::m_BoolProperties
std::vector< mitk::BoolProperty::Pointer > m_BoolProperties
Definition: QmitkPropertyListPopup.h:76
itk::SmartPointer< Self >
QmitkPropertyListPopup::m_AcceptOnHide
bool m_AcceptOnHide
Definition: QmitkPropertyListPopup.h:85
QmitkPropertyListPopup::m_PropertyList
mitk::PropertyList::Pointer m_PropertyList
Definition: QmitkPropertyListPopup.h:75
QmitkPropertyListPopup::m_OriginalOpacity
mitk::FloatProperty::Pointer m_OriginalOpacity
Definition: QmitkPropertyListPopup.h:87
mitkPropertyList.h
QmitkPropertyListPopup::m_InfoPopup
QMenu * m_InfoPopup
Definition: QmitkPropertyListPopup.h:77
QmitkPropertyListPopup
Definition: QmitkPropertyListPopup.h:38
QmitkPropertyListPopup::m_MaterialMenuAction
QAction * m_MaterialMenuAction
Definition: QmitkPropertyListPopup.h:82
mitk::PropertyList
Key-value list holding instances of BaseProperty.
Definition: mitkPropertyList.h:56
QmitkPropertyListPopup::m_NameMenuAction
QAction * m_NameMenuAction
Definition: QmitkPropertyListPopup.h:79
MitkQtWidgetsExtExports.h
mitkProperties.h