12 #ifndef CXTRANSFERFUNCTIONALPHAWIDGET_H_
13 #define CXTRANSFERFUNCTIONALPHAWIDGET_H_
15 #include "cxGuiExport.h"
41 void clearBackground(QPainter &painter);
47 void setReadOnly(
bool readOnly);
50 void activeImageTransferFunctionsChangedSlot();
72 if(position != INT_MIN)
78 virtual void enterEvent(QEvent* event);
79 virtual void leaveEvent(QEvent* event);
80 virtual void mousePressEvent(QMouseEvent* event);
81 virtual void mouseReleaseEvent(QMouseEvent* event);
82 virtual void mouseMoveEvent(QMouseEvent* event);
83 virtual void keyPressEvent(QKeyEvent* event);
85 virtual void paintEvent(QPaintEvent* event);
86 virtual void resizeEvent(QResizeEvent* evt);
88 AlphaPoint selectPoint(QPoint pos);
89 AlphaPoint getCurrentAlphaPoint(QPoint pos);
90 void toggleSelectedPoint(QPoint pos);
91 void moveCurrentAlphaPoint(AlphaPoint newAlphaPoint);
92 QPoint alpha2screen(AlphaPoint pt)
const;
93 void updateTooltip(QPoint pos);
94 void updateTooltip(AlphaPoint point);
96 bool isEndpoint(
int intensity)
const;
97 void paintHistogram(QPainter& painter);
98 void paintOpacityGraph(QPainter& painter);
99 std::pair<int,int> findAllowedMoveRangeAroundAlphaPoint(
int selectedPointIntensity);
114 virtual QSize
sizeHint ()
const {
return QSize(200, 100);};