12 #ifndef CXTRANSFERFUNCTIONCOLORWIDGET_H_
13 #define CXTRANSFERFUNCTIONCOLORWIDGET_H_
15 #include "cxGuiExport.h"
48 void activeImageTransferFunctionsChangedSlot();
51 void removeColorSlot();
53 void setColorSlotDelayed();
60 ColorPoint() : intensity(-1000000), value(255, 255, 255) {}
64 value = QColor(255, 255, 255);
68 if(intensity != -1000000)
87 std::pair<int,int> findAllowedMoveRangeAroundColorPoint(
int selectedPointIntensity);
88 void paintColorPointsAndGenerateCache(QPainter& painter);
89 void paintColorBar(QPainter& painter);
90 void updateTooltip(QPoint pos);
97 bool isEndpoint(
int intensity)
const;
99 void contextMenuEvent(QContextMenuEvent *event);
102 QPoint getPlotPoint(
int iScalar);
106 void moveSelectedPointTo(
ColorPoint newPoint);
108 virtual void enterEvent(QEvent* event);
109 virtual void leaveEvent(QEvent* event);
110 virtual void mousePressEvent(QMouseEvent* event);
111 virtual void mouseReleaseEvent(QMouseEvent* event);
112 virtual void mouseMoveEvent(QMouseEvent* event);
113 virtual void keyPressEvent(QKeyEvent* event);
114 virtual void resizeEvent(QResizeEvent* evt);
115 virtual void paintEvent(QPaintEvent* event);
117 virtual QSize
sizeHint ()
const {
return QSize(100, 30);};
119 int screenX2imageIntensity(
int screenX);
120 int imageIntensity2screenX(
int intensity);