Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
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 QmitkPropertyListPopuph_included_dingeling
14 #define QmitkPropertyListPopuph_included_dingeling
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
#define MITKQTWIDGETSEXT_EXPORT
Key-value list holding instances of BaseProperty.
std::vector< mitk::BoolProperty::Pointer > m_BoolProperties
mitk::PropertyList::Pointer m_PropertyList
mitk::FloatProperty::Pointer m_OriginalOpacity