OpenWalnut
1.5.0dev
|
The scene for our visualization of the transfer function. More...
#include <WTransferFunctionScene.h>
Public Types | |
typedef QGraphicsScene | BaseClass |
type of base class for cleaner programming More... | |
Public Member Functions | |
WTransferFunctionScene (QObject *parent=0) | |
Default constructor. More... | |
virtual | ~WTransferFunctionScene () |
Default destructor. More... | |
Protected Member Functions | |
virtual void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) |
Checks whether the drag is inside the main rectangle of the scene and whether the dragged object is of type QColor or similar. More... | |
virtual void | dropEvent (QGraphicsSceneDragDropEvent *event) |
Allows drop of QColor-alike objects and creates new color control points in the scene. More... | |
Private Attributes | |
WTransferFunctionWidget * | myparent |
storage of the widget as this currently manages the data More... | |
The scene for our visualization of the transfer function.
It differs from the QT implementation because it overloads the Drag&drop methods to allow users to drop colors onto the graph, which adds new nodes in the color representation.
This has to be done here according to the QT documentation as we cannot drop something in a location where no object exists.
Definition at line 42 of file WTransferFunctionScene.h.
type of base class for cleaner programming
Definition at line 46 of file WTransferFunctionScene.h.
|
explicit |
Default constructor.
parent | the parent QObject, typically the QWidget |
Definition at line 35 of file WTransferFunctionScene.cpp.
|
virtual |
Default destructor.
Definition at line 42 of file WTransferFunctionScene.cpp.
|
protectedvirtual |
Checks whether the drag is inside the main rectangle of the scene and whether the dragged object is of type QColor or similar.
event | the event to handle |
Definition at line 46 of file WTransferFunctionScene.cpp.
References myparent.
|
protectedvirtual |
Allows drop of QColor-alike objects and creates new color control points in the scene.
event | the event to handle |
Definition at line 158 of file WTransferFunctionScene.cpp.
References WTransferFunction::createFromRGBA(), WTransferFunctionWidget::insertColor(), and myparent.
|
private |
storage of the widget as this currently manages the data
Definition at line 79 of file WTransferFunctionScene.h.
Referenced by dragMoveEvent(), and dropEvent().