Medical Imaging Interaction Toolkit  2016.11.0
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,
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 
17 #ifndef QmitkPropertyListPopuph_included_dingeling
18 #define QmitkPropertyListPopuph_included_dingeling
19 
21 #include <QMenu>
22 
23 #include "mitkProperties.h"
24 #include "mitkPropertyList.h"
25 
26 class QmitkMaterialEditor;
27 
43 {
44  Q_OBJECT
45 
46 public:
48  QObject *parent = 0,
49  bool disableBoolProperties = false,
50  bool fillMenuImmediatelty = true,
51  const char *name = 0);
52 
53  virtual ~QmitkPropertyListPopup();
54 
55  void popup(const QPoint &pos, QAction *action = 0);
56 
57  void fillPopup();
58 
59 signals:
60 
61  void propertyListChangesDone();
62 
63 protected slots:
64 
65  void onNameClicked();
66  void onVisibleClicked();
67  void onColorClicked();
68  void onBoolPropertyClicked(int);
69  virtual void MaterialEditorChangesAccepted(QmitkMaterialEditor *ed);
70  virtual void popupAboutToHide();
71  void popupMenuItemHovered(QAction *action);
72 
73 protected:
74  virtual bool AddMaterialPopup();
75  virtual void UpdateNodeMaterialOnPopupHiding(bool &changes);
76  QIcon createColorIcon(QColor color);
77  QMenu *m_PopupMenu;
78 
80  std::vector<mitk::BoolProperty::Pointer> m_BoolProperties;
81  QMenu *m_InfoPopup;
82 
83  QAction *m_NameMenuAction;
88 
90 
92 
94 };
95 
96 #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