Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OCCViewer_ViewPort3d Class Reference

#include <OCCViewer_ViewPort3d.h>

Inheritance diagram for OCCViewer_ViewPort3d:
Inheritance graph

Public Slots

virtual bool synchronize (OCCViewer_ViewPort *)
 
- Public Slots inherited from OCCViewer_ViewPort
virtual bool synchronize (OCCViewer_ViewPort *)
 

Signals

void vpChangeBackground (const Qtx::BackgroundData &)
 
void vpClosed (OCCViewer_ViewPort3d *)
 
void vpMapped (OCCViewer_ViewPort3d *)
 
- Signals inherited from OCCViewer_ViewPort
void vpKeyEvent (QKeyEvent *)
 
void vpMouseEvent (QMouseEvent *)
 
void vpDrawExternal (QPainter *)
 
void vpChangeBGColor (QColor)
 
void vpTransformed (OCCViewer_ViewPort *)
 

Public Member Functions

 OCCViewer_ViewPort3d (QWidget *, const Handle(V3d_Viewer)&, V3d_TypeOfView=V3d_ORTHOGRAPHIC)
 
virtual ~OCCViewer_ViewPort3d ()
 
 Handle (V3d_View) getView() const
 
 Handle (V3d_View) setView(const Handle(V3d_View)&)
 
 Handle (V3d_Viewer) getViewer() const
 
virtual void setBackgroundColor (const QColor &color)
 
virtual QColor backgroundColor () const
 
void setBackground (const Qtx::BackgroundData &color)
 
Qtx::BackgroundData background () const
 
virtual int getBgImgHeight ()
 
virtual int getBgImgWidth ()
 
virtual bool syncronize (const OCCViewer_ViewPort3d *)
 
double getZSize () const
 
void setZSize (double)
 
void getAxialScale (double &, double &, double &)
 
virtual void onUpdate ()
 
virtual void reset ()
 
virtual void pan (int, int)
 
virtual void setCenter (int, int)
 
virtual void fitRect (const QRect &)
 
virtual void startZoomAtPoint (int, int)
 
virtual void zoom (int, int, int, int)
 
virtual void fitAll (bool keepScale=false, bool withZ=true, bool upd=true)
 
virtual void rotateXY (double)
 
virtual void setAxialScale (double, double, double)
 
virtual void startRotation (int, int, int, const gp_Pnt &)
 
virtual void rotate (int, int, int, const gp_Pnt &)
 
virtual void endRotation ()
 
bool isBusy ()
 
void setAdvancedZoomingEnabled (const bool theState)
 
bool isAdvancedZoomingEnabled () const
 
void showStaticTrihedron (bool)
 
void setDefaultCursor (Qt::CursorShape theCursorShape)
 
QCursor * getDefaultCursor () const
 
- Public Member Functions inherited from OCCViewer_ViewPort
 OCCViewer_ViewPort (QWidget *parent)
 
virtual ~OCCViewer_ViewPort ()
 
void setSketchingEnabled (bool)
 
bool isSketchingEnabled () const
 
void setTransformEnabled (bool)
 
bool isTransformEnabled () const
 
void redrawPainters ()
 
virtual QPaintEngine * paintEngine () const
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *)
 
virtual void resizeEvent (QResizeEvent *)
 
virtual void attachWindow (const Handle(V3d_View)&, const Handle(Aspect_Window)&)
 
- Protected Member Functions inherited from OCCViewer_ViewPort
void selectVisualId ()
 
virtual void mouseMoveEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 
virtual void keyPressEvent (QKeyEvent *)
 
virtual void keyReleaseEvent (QKeyEvent *)
 
 Handle (Aspect_Window) myWindow
 

Private Slots

void repaintViewAfterMove ()
 

Private Member Functions

 Handle (V3d_View) activeView() const
 
 Handle (V3d_View) inactiveView() const
 
bool mapView (const Handle(V3d_View)&)
 
bool setWindow (const Handle(V3d_View)&)
 
bool mapped (const Handle(V3d_View)&) const
 
void updateBackground ()
 
void setDefaultParams ()
 
 Handle (V3d_View) myActiveView
 
 Handle (V3d_View) myOrthoView
 
 Handle (V3d_View) myPerspView
 

Private Attributes

bool myBusy
 
double myScale
 
bool myIsAdvancedZoomingEnabled
 
Qtx::BackgroundData myBackground
 
int myBgImgHeight
 
int myBgImgWidth
 
QCursor * myCursor
 

Friends

class OCCViewer_ViewTransformer
 

Additional Inherited Members

- Protected Slots inherited from OCCViewer_ViewPort
virtual void onChangeBackground ()
 
- Protected Attributes inherited from OCCViewer_ViewPort
bool myEnableSketching
 
bool myEnableTransform
 
bool myPaintersRedrawing
 
QList< QtxAction * > myPopupActions
 

Constructor & Destructor Documentation

OCCViewer_ViewPort3d::OCCViewer_ViewPort3d ( QWidget parent,
const Handle(V3d_Viewer)&  viewer,
V3d_TypeOfView  type = V3d_ORTHOGRAPHIC 
)

Constructor

References myCursor, and setDefaultParams().

OCCViewer_ViewPort3d::~OCCViewer_ViewPort3d ( )
virtual

Destructor

References Handle(), myCursor, and vpClosed().

Member Function Documentation

void OCCViewer_ViewPort3d::attachWindow ( const Handle(V3d_View)&  view,
const Handle(Aspect_Window)&  window 
)
protectedvirtual

References updateBackground().

Qtx::BackgroundData OCCViewer_ViewPort3d::background ( ) const

Returns the background data

References myBackground.

QColor OCCViewer_ViewPort3d::backgroundColor ( ) const
virtual

Returns the background color [ virtual public ] [ obsolete ]

Reimplemented from OCCViewer_ViewPort.

References background(), and Qtx::BackgroundData::color().

void OCCViewer_ViewPort3d::endRotation ( )
virtual

Resets the viewport after 'rotation'. [ protected ]

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::fitAll ( bool  keepScale = false,
bool  withZ = true,
bool  upd = true 
)
virtual

Fits all objects in view. [ virtual protected ]

Implements OCCViewer_ViewPort.

References myScale, and OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::fitRect ( const QRect &  rect)
virtual

Called at 'window fit' transformation. [ virtual protected ]

Implements OCCViewer_ViewPort.

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::getAxialScale ( double &  xScale,
double &  yScale,
double &  zScale 
)

Get axial scale to the view

virtual int OCCViewer_ViewPort3d::getBgImgHeight ( )
inlinevirtual
virtual int OCCViewer_ViewPort3d::getBgImgWidth ( )
inlinevirtual
QCursor * OCCViewer_ViewPort3d::getDefaultCursor ( ) const

References myCursor.

double OCCViewer_ViewPort3d::getZSize ( ) const

Returns Z-size of this view. [ public ]

OCCViewer_ViewPort3d::Handle ( V3d_View  ) const
OCCViewer_ViewPort3d::Handle ( V3d_View  ) const
OCCViewer_ViewPort3d::Handle ( V3d_Viewer  ) const
OCCViewer_ViewPort3d::Handle ( V3d_View  ) const
private
OCCViewer_ViewPort3d::Handle ( V3d_View  ) const
private
OCCViewer_ViewPort3d::Handle ( V3d_View  )
private
OCCViewer_ViewPort3d::Handle ( V3d_View  )
private
OCCViewer_ViewPort3d::Handle ( V3d_View  )
private
bool OCCViewer_ViewPort3d::isAdvancedZoomingEnabled ( ) const
inline
bool OCCViewer_ViewPort3d::isBusy ( )
inline
bool OCCViewer_ViewPort3d::mapped ( const Handle(V3d_View)&  ) const
private
bool OCCViewer_ViewPort3d::mapView ( const Handle(V3d_View)&  view)
private

Activates the desired 'type' of view in the viewer ( view of 'type' is created if it doesn't exist ). [ public ]

Maps CasCade 'view' to this viewport. [ private ]

References mapped(), setWindow(), and vpMapped().

void OCCViewer_ViewPort3d::onUpdate ( )
virtual

Updates the active viewport. [ virtual public ]

Reimplemented from OCCViewer_ViewPort.

void OCCViewer_ViewPort3d::paintEvent ( QPaintEvent *  e)
protectedvirtual

Repaints the viewport. [ virtual protected ]

Reimplemented from OCCViewer_ViewPort.

References mapped(), mapView(), myBusy, OCCViewer_ViewPort::myPaintersRedrawing, and OCCViewer_ViewPort::paintEvent().

void OCCViewer_ViewPort3d::pan ( int  dx,
int  dy 
)
virtual

Called at 'pan' transformation. [ virtual protected ]

Implements OCCViewer_ViewPort.

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::repaintViewAfterMove ( )
privateslot

Moved the viewport

void OCCViewer_ViewPort3d::reset ( )
virtual

Resets the view. [ virtual protected ]

Implements OCCViewer_ViewPort.

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::resizeEvent ( QResizeEvent *  e)
protectedvirtual

Resizes the viewport. [ virtual protected ]

References mapped(), mapView(), and repaintViewAfterMove().

void OCCViewer_ViewPort3d::rotate ( int  x,
int  y,
int  theRotationPointType,
const gp_Pnt &  theSelectedPoint 
)
virtual
void OCCViewer_ViewPort3d::rotateXY ( double  degrees)
virtual

Rotate the view in the view plane (orthogonal to the view vector)

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::setAdvancedZoomingEnabled ( const bool  theState)
inline
void OCCViewer_ViewPort3d::setAxialScale ( double  xScale,
double  yScale,
double  zScale 
)
virtual

Set axial scale to the view

References OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::setBackground ( const Qtx::BackgroundData bgData)
void OCCViewer_ViewPort3d::setBackgroundColor ( const QColor &  color)
virtual

Sets the background color [ virtual public ] [ obsolete ]

Reimplemented from OCCViewer_ViewPort.

References background(), setBackground(), and Qtx::BackgroundData::setColor().

void OCCViewer_ViewPort3d::setCenter ( int  x,
int  y 
)
virtual

Centers the viewport. [ virtual protected ]

Implements OCCViewer_ViewPort.

References myScale, and OCCViewer_ViewPort::vpTransformed().

void OCCViewer_ViewPort3d::setDefaultCursor ( Qt::CursorShape  theCursorShape)

References myCursor.

bool OCCViewer_ViewPort3d::setWindow ( const Handle(V3d_View)&  view)
private

Passed the handle of native window of the component to CASCADE view. [ private ]

References attachWindow().

void OCCViewer_ViewPort3d::setZSize ( double  zsize)

Sets Z-size of this view ( for both orthographic and perspective ). [ public ]

void OCCViewer_ViewPort3d::showStaticTrihedron ( bool  on)

References Handle().

void OCCViewer_ViewPort3d::startRotation ( int  x,
int  y,
int  theRotationPointType,
const gp_Pnt &  theSelectedPoint 
)
virtual

Inits 'rotation' transformation. [ protected ]

References OCCViewer_ViewWindow::BBCENTER, rx, ry, OCCViewer_ViewWindow::SELECTED, sx, sy, and zRotation.

void OCCViewer_ViewPort3d::startZoomAtPoint ( int  x,
int  y 
)
virtual

Inits 'zoom' transformation. [ protected ]

References isAdvancedZoomingEnabled().

bool OCCViewer_ViewPort3d::synchronize ( OCCViewer_ViewPort view)
virtualslot

Performs synchronization of view parameters with the specified view. Returns true if synchronization is done successfully or false otherwise. Default implementation does nothing (return false)

References Handle().

bool OCCViewer_ViewPort3d::syncronize ( const OCCViewer_ViewPort3d ref)
virtual

Syncronizes visual state of this viewport with 'ref' ( scale, projection, eye etc ) Returns 'true' if copied OK, 'false' otherwise. [ virtual public ]

References Handle().

void OCCViewer_ViewPort3d::vpChangeBackground ( const Qtx::BackgroundData )
signal
void OCCViewer_ViewPort3d::vpClosed ( OCCViewer_ViewPort3d )
signal
void OCCViewer_ViewPort3d::vpMapped ( OCCViewer_ViewPort3d )
signal
void OCCViewer_ViewPort3d::zoom ( int  x0,
int  y0,
int  x,
int  y 
)
virtual

Called at 'zoom' transformation. [ virtual protected ]

Implements OCCViewer_ViewPort.

References isAdvancedZoomingEnabled(), and OCCViewer_ViewPort::vpTransformed().

Friends And Related Function Documentation

friend class OCCViewer_ViewTransformer
friend

Member Data Documentation

Qtx::BackgroundData OCCViewer_ViewPort3d::myBackground
private
int OCCViewer_ViewPort3d::myBgImgHeight
private
int OCCViewer_ViewPort3d::myBgImgWidth
private
bool OCCViewer_ViewPort3d::myBusy
private
QCursor* OCCViewer_ViewPort3d::myCursor
private
bool OCCViewer_ViewPort3d::myIsAdvancedZoomingEnabled
private
double OCCViewer_ViewPort3d::myScale
private

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