FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Friends | List of all members
occ::QtView Class Reference

Qt wrapper around the V3d_View class. More...

#include <occtools/qt_view.h>

Inheritance diagram for occ::QtView:

Public Types

typedef std::function< void()> PaintCallback
 

Public Slots

void redraw ()
 Force a redraw of the view. More...
 
void fitAll ()
 

Public Member Functions

 QtView (const Handle_AIS_InteractiveContext &context3d, QWidget *parent=NULL)
 
 ~QtView ()
 
Handle_AIS_InteractiveContext context () const
 
Handle_V3d_View internalView () const
 
int addPaintCallback (const PaintCallback &callback)
 
void removePaintCallback (int callbackId)
 
Aspect_GraphicCallbackStruct * paintCallbackData () const
 
QPaintEngine * paintEngine () const override
 Hack for Qt 4.5.x. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Reimplemented from QWidget::paintEvent() More...
 
void resizeEvent (QResizeEvent *event) override
 Reimplemented from QWidget::resizeEvent() Called when the widget needs to resize itself, but seeing as a paint event always follows a resize event, we'll move the work into the paint event. More...
 

Friends

int occ_QtView_paintCallBack (Aspect_Drawable, void *, Aspect_GraphicCallbackStruct *)
 Callback executed each time a paint is requested (on paintEvent()) More...
 

Detailed Description

Qt wrapper around the V3d_View class.

QtView widgets are explicitely bound to a context ie an AIS_InteractiveContext. The context can be retrieved with context().

QtView does not handle input devices interaction like keyboard and mouse.

Member Typedef Documentation

typedef std::function<void()> occ::QtView::PaintCallback

Constructor & Destructor Documentation

occ::QtView::QtView ( const Handle_AIS_InteractiveContext &  context3d,
QWidget *  parent = NULL 
)

Construct a QtView bound to the interactive context context3d, and having parent as its Qt widget parent

occ::QtView::~QtView ( )

Member Function Documentation

int occ::QtView::addPaintCallback ( const PaintCallback callback)
Handle_AIS_InteractiveContext occ::QtView::context ( ) const
void occ::QtView::fitAll ( )
slot
Handle_V3d_View occ::QtView::internalView ( ) const
Aspect_GraphicCallbackStruct * occ::QtView::paintCallbackData ( ) const
QPaintEngine * occ::QtView::paintEngine ( ) const
override

Hack for Qt 4.5.x.

void occ::QtView::paintEvent ( QPaintEvent *  event)
overrideprotected

Reimplemented from QWidget::paintEvent()

void occ::QtView::redraw ( )
slot

Force a redraw of the view.

void occ::QtView::removePaintCallback ( int  callbackId)
void occ::QtView::resizeEvent ( QResizeEvent *  event)
overrideprotected

Reimplemented from QWidget::resizeEvent() Called when the widget needs to resize itself, but seeing as a paint event always follows a resize event, we'll move the work into the paint event.

Friends And Related Function Documentation

int occ_QtView_paintCallBack ( Aspect_Drawable  ,
void *  pointer,
Aspect_GraphicCallbackStruct *  data 
)
friend

Callback executed each time a paint is requested (on paintEvent())


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