OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
WTransferFunctionScene Class Reference

The scene for our visualization of the transfer function. More...

#include <WTransferFunctionScene.h>

+ Inheritance diagram for WTransferFunctionScene:
+ Collaboration diagram for WTransferFunctionScene:

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

WTransferFunctionWidgetmyparent
 storage of the widget as this currently manages the data More...
 

Detailed Description

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.

Member Typedef Documentation

◆ BaseClass

type of base class for cleaner programming

Definition at line 46 of file WTransferFunctionScene.h.

Constructor & Destructor Documentation

◆ WTransferFunctionScene()

WTransferFunctionScene::WTransferFunctionScene ( QObject parent = 0)
explicit

Default constructor.

Parameters
parentthe parent QObject, typically the QWidget

Definition at line 35 of file WTransferFunctionScene.cpp.

◆ ~WTransferFunctionScene()

WTransferFunctionScene::~WTransferFunctionScene ( )
virtual

Default destructor.

Definition at line 42 of file WTransferFunctionScene.cpp.

Member Function Documentation

◆ dragMoveEvent()

void WTransferFunctionScene::dragMoveEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Checks whether the drag is inside the main rectangle of the scene and whether the dragged object is of type QColor or similar.

Parameters
eventthe event to handle

Definition at line 46 of file WTransferFunctionScene.cpp.

References myparent.

◆ dropEvent()

void WTransferFunctionScene::dropEvent ( QGraphicsSceneDragDropEvent *  event)
protectedvirtual

Allows drop of QColor-alike objects and creates new color control points in the scene.

Parameters
eventthe event to handle

Definition at line 158 of file WTransferFunctionScene.cpp.

References WTransferFunction::createFromRGBA(), WTransferFunctionWidget::insertColor(), and myparent.

+ Here is the call graph for this function:

Member Data Documentation

◆ myparent

WTransferFunctionWidget* WTransferFunctionScene::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().


The documentation for this class was generated from the following files: