Go to the documentation of this file.00001 #ifndef TRANSFORMWIDGET_HPP_
00002 #define TRANSFORMWIDGET_HPP_
00003
00004 #include <QGraphicsView>
00005 #include <QGraphicsScene>
00006 #include <QPainterPath>
00007 #include <QList>
00008
00009 #include "TransferPoint.hpp"
00010
00016 class TransferWidget : public QGraphicsView
00017 {
00018 Q_OBJECT
00019
00020 public:
00021
00027 TransferWidget(QWidget *parent);
00028
00033 void redrawScene();
00034
00040 float *getTransferValues();
00041
00046 float *getTransferControlValues();
00047
00052 int getNumPoints();
00053
00057 void clear();
00058
00067 void setNewRGBXY(float _red, float _green, float _blue, float _x, float _y);
00068
00074 void resizeEvent(QResizeEvent *event);
00075
00076 signals:
00077 void transferChanged();
00078
00079 private:
00080 QGraphicsScene *scene;
00081 QGraphicsPathItem *background;
00082 QList<QGraphicsLineItem *> lines;
00083 QList<TransferPoint *> points;
00084
00088 void fillBackground();
00089
00095 void mousePressEvent(QMouseEvent *event);
00096
00102 void mouseMoveEvent(QMouseEvent *event);
00103 };
00104
00105 #endif