Overview | Modules | Class Hierarchy | Classes | Members

Public Member Functions | Protected Slots | Protected Member Functions
tlp::GlMainWidgetItem Class Reference

Class use to render a GlMainWidget on GraphicsView. More...

`#include <GlMainWidgetItem.h>`

Collaboration diagram for tlp::GlMainWidgetItem:
[legend]

List of all members.

## Public Member Functions

- GlMainWidgetItem (GlMainWidget *glMainWidget, int width, int height, bool decorate=false, const QColor &frameColor=QColor(191, 191, 191), float borderWidth=18.f)
    Main constructor.
- ~GlMainWidgetItem ()
    Default destructor.
- void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
    Function use to render this item Function use to render this item. You don't have to call this function, QGraphicsView do this for you.
- QRectF boundingRect () const
- void resize (int width, int height)
- void setRedrawNeeded (bool redrawNeeded)
- GlMainWidget * getGlMainWidget ()
- bool eventFilter (QObject *, QEvent *evt)
- void setDecoration (bool enabled)
- void setBorderWidth (float borderWidth)
- void allowUnlocking (bool allow)

## Protected Slots

- void glMainWidgetDraw (GlMainWidget *, bool)
- void glMainWidgetRedraw (GlMainWidget *)

## Protected Member Functions

- void wheelEvent (QGraphicsSceneWheelEvent *event)
- void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
- void mousePressEvent (QGraphicsSceneMouseEvent *event)
- void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
- void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
- void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
- void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)

## Detailed Description

Class use to render a GlMainWidget on GraphicsView.

Use this class if you want to add a GlMainWidget in the form of QGraphicsItem

## Constructor & Destructor Documentation

tlp::GlMainWidgetItem::GlMainWidgetItem | ( | GlMainWidget * | glMainWidget,
|  | int | width,
|  | int | height,
|  | bool | decorate = `false`,
|  | const QColor & | frameColor = `QColor(191, 191, 191)`,
|  | float | borderWidth = `18.f`
| ) |  |

Main constructor.

Parameters:

  parent | GraphicsView parent class
  glMainWidgte | glMainWidget use by this item
  width | size on scene
  height | size of scene
  decorate | true if you want an item with border

tlp::GlMainWidgetItem::~GlMainWidgetItem | ( |  | ) |

Default destructor.

## Member Function Documentation

void tlp::GlMainWidgetItem::allowUnlocking | ( | bool | allow | ) |

QRectF tlp::GlMainWidgetItem::boundingRect | ( |  | ) | const

Return the boundingRect of this item

void tlp::GlMainWidgetItem::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) | `[protected]`

bool tlp::GlMainWidgetItem::eventFilter | ( | QObject * | ,
|  | QEvent * | evt
| ) |  |

GlMainWidget* tlp::GlMainWidgetItem::getGlMainWidget | ( |  | ) | `[inline]`

void tlp::GlMainWidgetItem::glMainWidgetDraw | ( | GlMainWidget * | ,
|  | bool |
| ) |  | `[protected, slot]`

void tlp::GlMainWidgetItem::glMainWidgetRedraw | ( | GlMainWidget * |  | ) | `[protected, slot]`

void tlp::GlMainWidgetItem::hoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected]`

void tlp::GlMainWidgetItem::mouseDoubleClickEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected]`

void tlp::GlMainWidgetItem::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected]`

void tlp::GlMainWidgetItem::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected]`

void tlp::GlMainWidgetItem::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected]`

void tlp::GlMainWidgetItem::paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget
| ) |  |

Function use to render this item Function use to render this item. You don't have to call this function, QGraphicsView do this for you.

void tlp::GlMainWidgetItem::resize | ( | int | width,
|  | int | height
| ) |  |

Resize the GlMainWidget item

void tlp::GlMainWidgetItem::setBorderWidth | ( | float | borderWidth | ) |

void tlp::GlMainWidgetItem::setDecoration | ( | bool | enabled | ) |

void tlp::GlMainWidgetItem::setRedrawNeeded | ( | bool | redrawNeeded | ) | `[inline]`

Set if during repaint we have to render GlMainWidget

void tlp::GlMainWidgetItem::wheelEvent | ( | QGraphicsSceneWheelEvent * | event | ) | `[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2012