Class use to render a GlMainWidget on GraphicsView.
More...
#include <GlMainWidgetItem.h>
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
Protected Member Functions
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 |
( |
| ) |
|
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 |
|
) |
| |
void tlp::GlMainWidgetItem::setBorderWidth |
( |
float |
borderWidth | ) |
|
void tlp::GlMainWidgetItem::setDecoration |
( |
bool |
enabled | ) |
|
void tlp::GlMainWidgetItem::setRedrawNeeded |
( |
bool |
redrawNeeded | ) |
[inline] |
void tlp::GlMainWidgetItem::wheelEvent |
( |
QGraphicsSceneWheelEvent * |
event | ) |
[protected] |