Overview | Modules | Class Hierarchy | Classes | Members

# tlp::GlMainWidgetItem Class Reference

`#include <GlMainWidgetItem.h>`

Collaboration diagram for tlp::GlMainWidgetItem:

[legend]
List of all members.

## 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

## Public Member Functions

- GlMainWidgetItem (GlMainWidgetGraphicsView *parent, GlMainWidget *glMainWidget, int width, int height, QGraphicsItem *parentItem=NULL, bool decorate=false)
    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 setWidth (int width)
- void setHeight (int height)
- void setRedrawNeed (bool redrawNeed)

## 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)

## Constructor & Destructor Documentation

tlp::GlMainWidgetItem::GlMainWidgetItem | ( | GlMainWidgetGraphicsView * | parent,
|  | GlMainWidget * | glMainWidget,
|  | int | width,
|  | int | height,
|  | QGraphicsItem * | parentItem = `NULL`,
|  | bool | decorate = `false`
| ) |

Main constructor.

Parameters:

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

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

| Default destructor.

## Member Function Documentation

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

| Return the boundingRect of this item

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::setHeight | ( | int | height | ) | `[inline]`

| Set height of this item

void tlp::GlMainWidgetItem::setRedrawNeed | ( | bool | redrawNeed | ) | `[inline]`

| Set if during repaint we have to render GlMainWidget

void tlp::GlMainWidgetItem::setWidth | ( | int | width | ) | `[inline]`

| Set width of this item

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

Tulip Software by LaBRI Visualization Team 2001 - 2010