17 #ifndef __qmlMitkSliderLevelWindowItem_h
18 #define __qmlMitkSliderLevelWindowItem_h
25 #include <QQuickPaintedItem>
31 Q_PROPERTY(QColor color READ color WRITE setColor)
32 Q_PROPERTY(QColor fontColor READ fontColor WRITE setFontColor)
33 Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
34 Q_PROPERTY(
int fontSize READ fontSize WRITE setFontSize)
35 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
36 Q_PROPERTY(
int level READ getLevel WRITE setLevel NOTIFY levelChanged)
37 Q_PROPERTY(
int window READ getWindow WRITE setWindow NOTIFY windowChanged)
43 void OnPropertyModified(const
itk::EventObject& e);
55 mitk::LevelWindow m_LevelWindow;
64 void setLevelWindowManager(
mitk::LevelWindowManager* levelWindowManager);
65 void setDataStorage(
mitk::DataStorage* ds);
67 mitk::LevelWindowManager* GetManager();
70 void setColor(const QColor &color);
72 QColor fontColor() const;
73 void setFontColor(const QColor &color);
75 QColor borderColor() const;
76 void setBorderColor(const QColor &color);
79 void setLevel(
int level);
82 void setWindow(
int window);
85 void setFontSize(const
int &fontSize);
88 void setEnabled(
bool enable);
90 static
void create(QQmlEngine &engine,
mitk::DataStorage::
Pointer storage);
109 unsigned long m_ObserverTag;
110 bool m_IsObserverTagSet;
112 void paint(QPainter* painter) override;
114 void mouseMoveEvent(QMouseEvent* mouseEvent ) override;
115 void mousePressEvent(QMouseEvent* mouseEvent ) override;
116 void mouseReleaseEvent(QMouseEvent* mouseEvent ) override;
118 void hoverMoveEvent(QHoverEvent* event) override;
119 void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry) override;
121 virtual
void update( );
128 void enabledChanged();
130 void windowChanged();
itk::SmartPointer< Self > Pointer
#define MITKQMLITEMS_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.