![]() |
OpenWalnut
1.5.0dev
|
A control point for the color function. More...
#include <WTransferFunctionColorPoint.h>
Inheritance diagram for WTransferFunctionColorPoint:
Collaboration diagram for WTransferFunctionColorPoint:Public Types | |
| typedef QGraphicsObject | BaseClass |
| type of our base class More... | |
Public Slots | |
| void | colorSelected (const QColor &color) |
| Called by the color dialog every time the user changes the color. More... | |
Public Member Functions | |
| WTransferFunctionColorPoint (WTransferFunctionWidget *parent=0x0) | |
| Default constructor. More... | |
| virtual | ~WTransferFunctionColorPoint () |
| Default destructor. More... | |
| WTransferFunctionColorPoint * | getLeft () const |
| Returns the item left of the this item. More... | |
| WTransferFunctionColorPoint * | getRight () const |
| Returns the item right of this item. More... | |
| void | setLeft (WTransferFunctionColorPoint *left) |
| Set the item left of us. More... | |
| void | setRight (WTransferFunctionColorPoint *right) |
| Set the item right of us. More... | |
| QRectF | boundingRect () const |
| The bounding rectangle used for paint and click events. More... | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0x0) |
| Paint the handle and additional item hints. More... | |
| QColor | getColor () const |
| virtual void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
| Drag enter implementation for items that contain a color. More... | |
| virtual void | dropEvent (QGraphicsSceneDragDropEvent *event) |
| Drop implementation for items that contain a color. More... | |
| void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| Handler for context menu envents. More... | |
Protected Member Functions | |
| void | clampToRectangle (const QRectF &rectangle) |
| Helper for item changed. More... | |
| void | clampToLeftAndRight () |
| Helper for item changed. More... | |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
| Handles change notifications. More... | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| Handles mouse move events. More... | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Handles press move events. More... | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Handles mouse move events. More... | |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
| Handles mouse double click events by opening a color selector if the item is clicked. More... | |
| void | showColorPicker () |
| Show the color picker dialog. More... | |
Private Attributes | |
| double | radius |
| the radius used for paining of the handle More... | |
| WTransferFunctionColorPoint * | left |
| the entry left of this entry More... | |
| WTransferFunctionColorPoint * | right |
| the entry to the right of our entry More... | |
| WTransferFunctionWidget * | _parent |
| the parent widget More... | |
| QColor | color |
| the color entry More... | |
A control point for the color function.
Internals: The point has links to its left and right neighbors (double-linked list).
Definition at line 41 of file WTransferFunctionColorPoint.h.
type of our base class
Definition at line 47 of file WTransferFunctionColorPoint.h.
|
explicit |
Default constructor.
| parent | the parent widget |
Definition at line 38 of file WTransferFunctionColorPoint.cpp.
|
virtual |
Default destructor.
Definition at line 58 of file WTransferFunctionColorPoint.cpp.
| QRectF WTransferFunctionColorPoint::boundingRect | ( | ) | const |
The bounding rectangle used for paint and click events.
Definition at line 82 of file WTransferFunctionColorPoint.cpp.
References radius.
|
protected |
Helper for item changed.
Definition at line 243 of file WTransferFunctionColorPoint.cpp.
Referenced by mouseMoveEvent().
Here is the caller graph for this function:
|
protected |
Helper for item changed.
| rectangle | a rectangle |
Definition at line 261 of file WTransferFunctionColorPoint.cpp.
Referenced by mouseMoveEvent().
Here is the caller graph for this function:
|
slot |
Called by the color dialog every time the user changes the color.
| color | the new color |
Definition at line 189 of file WTransferFunctionColorPoint.cpp.
References _parent, color, and WTransferFunctionWidget::dataChanged().
Referenced by WTransferFunctionWidget::insertColor(), and showColorPicker().
Here is the call graph for this function:
Here is the caller graph for this function:| void WTransferFunctionColorPoint::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
Handler for context menu envents.
Currently disabled because it conflicts with other mouse interactions.
| event | the event to hanlde |
Definition at line 305 of file WTransferFunctionColorPoint.cpp.
References showColorPicker().
Here is the call graph for this function:
|
virtual |
Drag enter implementation for items that contain a color.
| event | the event to handle |
Definition at line 285 of file WTransferFunctionColorPoint.cpp.
|
virtual |
Drop implementation for items that contain a color.
| event | the event to handle |
Definition at line 293 of file WTransferFunctionColorPoint.cpp.
References _parent, color, and WTransferFunctionWidget::dataChanged().
Here is the call graph for this function:| QColor WTransferFunctionColorPoint::getColor | ( | ) | const |
Definition at line 280 of file WTransferFunctionColorPoint.cpp.
References color.
Referenced by WTransferFunctionWidget::insertColor(), WTransferFunctionWidget::sample1DTransferFunction(), WTransferFunctionWidget::sample1DTransferFunctionForDisplay(), and WTransferFunctionWidget::updateTransferFunction().
Here is the caller graph for this function:| WTransferFunctionColorPoint * WTransferFunctionColorPoint::getLeft | ( | ) | const |
Returns the item left of the this item.
Definition at line 67 of file WTransferFunctionColorPoint.cpp.
References left.
Referenced by WTransferFunctionWidget::keyPressEvent().
Here is the caller graph for this function:| WTransferFunctionColorPoint * WTransferFunctionColorPoint::getRight | ( | ) | const |
Returns the item right of this item.
Definition at line 77 of file WTransferFunctionColorPoint.cpp.
References right.
Referenced by WTransferFunctionWidget::clearTransferFunction(), WTransferFunctionWidget::insertColor(), WTransferFunctionWidget::keyPressEvent(), WTransferFunctionWidget::sample1DTransferFunction(), WTransferFunctionWidget::sample1DTransferFunctionForDisplay(), and WTransferFunctionWidget::updateTransferFunction().
Here is the caller graph for this function:
|
protected |
Handles change notifications.
| change | the requrested change |
| value | the requested value |
Definition at line 140 of file WTransferFunctionColorPoint.cpp.
References _parent, color, and WTransferFunctionWidget::dataChanged().
Here is the call graph for this function:
|
protected |
Handles mouse double click events by opening a color selector if the item is clicked.
| event | the event |
Definition at line 182 of file WTransferFunctionColorPoint.cpp.
References showColorPicker().
Here is the call graph for this function:
|
protected |
Handles mouse move events.
| event | the event |
Definition at line 200 of file WTransferFunctionColorPoint.cpp.
References clampToLeftAndRight(), clampToRectangle(), left, and right.
Here is the call graph for this function:
|
protected |
Handles press move events.
| event | the event |
Definition at line 230 of file WTransferFunctionColorPoint.cpp.
References _parent, and WTransferFunctionWidget::setCurrentColor().
Here is the call graph for this function:
|
protected |
Handles mouse move events.
| event | the event |
Definition at line 237 of file WTransferFunctionColorPoint.cpp.
|
virtual |
| void WTransferFunctionColorPoint::setLeft | ( | WTransferFunctionColorPoint * | left | ) |
Set the item left of us.
| left | the item left of us |
Definition at line 62 of file WTransferFunctionColorPoint.cpp.
References left.
Referenced by WTransferFunctionWidget::insertColor(), and WTransferFunctionWidget::keyPressEvent().
Here is the caller graph for this function:| void WTransferFunctionColorPoint::setRight | ( | WTransferFunctionColorPoint * | right | ) |
Set the item right of us.
| right | the item right of us |
Definition at line 72 of file WTransferFunctionColorPoint.cpp.
References right.
Referenced by WTransferFunctionWidget::insertColor(), and WTransferFunctionWidget::keyPressEvent().
Here is the caller graph for this function:
|
protected |
Show the color picker dialog.
Definition at line 330 of file WTransferFunctionColorPoint.cpp.
References color, and colorSelected().
Referenced by contextMenuEvent(), and mouseDoubleClickEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
the parent widget
Definition at line 204 of file WTransferFunctionColorPoint.h.
Referenced by colorSelected(), dropEvent(), itemChange(), and mousePressEvent().
|
private |
the color entry
Definition at line 207 of file WTransferFunctionColorPoint.h.
Referenced by colorSelected(), dropEvent(), getColor(), itemChange(), paint(), and showColorPicker().
|
private |
the entry left of this entry
Definition at line 198 of file WTransferFunctionColorPoint.h.
Referenced by clampToLeftAndRight(), getLeft(), mouseMoveEvent(), paint(), and setLeft().
|
private |
the radius used for paining of the handle
Definition at line 195 of file WTransferFunctionColorPoint.h.
Referenced by boundingRect(), and paint().
|
private |
the entry to the right of our entry
Definition at line 201 of file WTransferFunctionColorPoint.h.
Referenced by clampToLeftAndRight(), getRight(), mouseMoveEvent(), paint(), and setRight().