Version: 6.3.1
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | Friends

OCCViewer_ViewPort Class Reference

#include <OCCViewer_ViewPort.h>

Inheritance diagram for OCCViewer_ViewPort:
Inheritance graph

Signals

void vpKeyEvent (QKeyEvent *)
void vpMouseEvent (QMouseEvent *)
void vpDrawExternal (QPainter *)
void vpChangeBGColor (QColor)

Public Member Functions

 OCCViewer_ViewPort (QWidget *parent)
virtual ~OCCViewer_ViewPort ()
void setSketchingEnabled (bool)
bool isSketchingEnabled () const
void setTransformEnabled (bool)
bool isTransformEnabled () const
virtual QColor backgroundColor () const
virtual void setBackgroundColor (const QColor &)
void redrawPainters ()
virtual void onUpdate ()
virtual QPaintEngine * paintEngine () const

Protected Slots

virtual void onChangeBgColor ()

Protected Member Functions

void selectVisualId ()
virtual void paintEvent (QPaintEvent *)
virtual void mouseMoveEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseDoubleClickEvent (QMouseEvent *)
virtual void keyPressEvent (QKeyEvent *)
virtual void keyReleaseEvent (QKeyEvent *)
virtual void reset ()=0
virtual void pan (int, int)=0
virtual void setCenter (int, int)=0
virtual void fitRect (const QRect &)=0
virtual void zoom (int, int, int, int)=0
virtual void fitAll (bool keepScale=false, bool withZ=true, bool upd=true)=0
 Handle (Aspect_Window) myWindow

Protected Attributes

bool myEnableSketching
bool myEnableTransform
bool myPaintersRedrawing
QList< QtxAction * > myPopupActions

Private Member Functions

void initialize ()
void cleanup ()

Static Private Attributes

static int nCounter

Friends

class OCCViewer_ViewSketcher

Detailed Description

Visualisation canvas of SUIT-based application


Constructor & Destructor Documentation

OCCViewer_ViewPort::OCCViewer_ViewPort ( QWidget parent)

Constructor

References initialize().

OCCViewer_ViewPort::~OCCViewer_ViewPort ( ) [virtual]

Destructor

References cleanup().


Member Function Documentation

void OCCViewer_ViewPort::setSketchingEnabled ( bool  enable)

Enables / disables sketching [ public ]

References myEnableSketching.

bool OCCViewer_ViewPort::isSketchingEnabled ( ) const

Returns 'true' if sketching is enabled in this viewport. [ public ]

References myEnableSketching.

void OCCViewer_ViewPort::setTransformEnabled ( bool  enable)

Enables / disables transformations. [ public ]

References myEnableTransform.

bool OCCViewer_ViewPort::isTransformEnabled ( ) const

Returns 'true' if transformations ( rotation, zoom etc. ) are enabled in this viewport. [ public ]

References myEnableTransform.

QColor OCCViewer_ViewPort::backgroundColor ( ) const [virtual]

Returns the background color. [ virtual ]

Reimplemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::setBackgroundColor ( const QColor &  color) [virtual]

Sets the background 'color'. [ virtual ]

Reimplemented in OCCViewer_ViewPort3d.

References vpChangeBGColor().

void OCCViewer_ViewPort::redrawPainters ( )

Forces to redraw the viewport by an external painter. [ public ]

References myPaintersRedrawing.

void OCCViewer_ViewPort::onUpdate ( ) [virtual]

Updates this view. Does nothing by default. [ virtual public ]

Reimplemented in OCCViewer_ViewPort3d.

QPaintEngine * OCCViewer_ViewPort::paintEngine ( ) const [virtual]

Get paint engine for the OpenGL viewer. [ virtual public ]

void OCCViewer_ViewPort::selectVisualId ( ) [protected]

Selects visual ID for OpenGL window ( X11 specific ). [ protected ]

References test_table.a, backgroundColor(), choose_cmap(), Plot2d.None, and Window.

void OCCViewer_ViewPort::paintEvent ( QPaintEvent *  ) [protected, virtual]

Repaints the viewport. [ virtual protected ]

Reimplemented in OCCViewer_ViewPort3d.

References myPaintersRedrawing, and vpDrawExternal().

void OCCViewer_ViewPort::mouseMoveEvent ( QMouseEvent *  e) [protected, virtual]

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mouseReleaseEvent ( QMouseEvent *  e) [protected, virtual]

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mousePressEvent ( QMouseEvent *  e) [protected, virtual]

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mouseDoubleClickEvent ( QMouseEvent *  e) [protected, virtual]

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::keyPressEvent ( QKeyEvent *  e) [protected, virtual]

Emits 'keyEvent' signal. [ virtual protected ]

References vpKeyEvent().

void OCCViewer_ViewPort::keyReleaseEvent ( QKeyEvent *  e) [protected, virtual]

Emits 'keyEvent' signal. [ virtual protected ]

References vpKeyEvent().

virtual void OCCViewer_ViewPort.reset ( ) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort.pan ( int  ,
int   
) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort.setCenter ( int  ,
int   
) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort.fitRect ( const QRect &  ) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort.zoom ( int  ,
int  ,
int  ,
int   
) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort.fitAll ( bool  keepScale = false,
bool  withZ = true,
bool  upd = true 
) [protected, pure virtual]

Implemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::onChangeBgColor ( ) [protected, virtual, slot]

Creates the popup. [ virtual protected ]

Destroys the popup. [ virtual protected ]

Sets the background color with color selection dialog. [ virtual protected slot ]

References backgroundColor(), and setBackgroundColor().

void OCCViewer_ViewPort.vpKeyEvent ( QKeyEvent *  ) [signal]
void OCCViewer_ViewPort.vpMouseEvent ( QMouseEvent *  ) [signal]
void OCCViewer_ViewPort.vpDrawExternal ( QPainter *  ) [signal]
void OCCViewer_ViewPort.vpChangeBGColor ( QColor  ) [signal]
void OCCViewer_ViewPort::initialize ( ) [private]

Initializes viewport. [ private ]

References myEnableSketching, myEnableTransform, and myPaintersRedrawing.

void OCCViewer_ViewPort::cleanup ( ) [private]

Cleans up the viewport. [ private ]

OCCViewer_ViewPort.Handle ( Aspect_Window  ) [protected]

Friends And Related Function Documentation

friend class OCCViewer_ViewSketcher [friend]

Field Documentation

int OCCViewer_ViewPort.nCounter [static, private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS