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

#include <OCCViewer_ViewPort.h>

Inheritance diagram for OCCViewer_ViewPort:
Inheritance graph

Public Slots

virtual bool synchronize (OCCViewer_ViewPort *)
 

Signals

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

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 onChangeBackground ()
 

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

QColor OCCViewer_ViewPort::backgroundColor ( ) const
virtual

Returns the background color. [ virtual ]

Reimplemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::cleanup ( )
private

Cleans up the viewport. [ private ]

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

Implemented in OCCViewer_ViewPort3d.

virtual void OCCViewer_ViewPort::fitRect ( const QRect &  )
protectedpure virtual

Implemented in OCCViewer_ViewPort3d.

OCCViewer_ViewPort::Handle ( Aspect_Window  )
protected
void OCCViewer_ViewPort::initialize ( )
private

Initializes viewport. [ private ]

References myEnableSketching, myEnableTransform, and myPaintersRedrawing.

bool OCCViewer_ViewPort::isSketchingEnabled ( ) const

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

References myEnableSketching.

bool OCCViewer_ViewPort::isTransformEnabled ( ) const

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

References myEnableTransform.

void OCCViewer_ViewPort::keyPressEvent ( QKeyEvent *  e)
protectedvirtual

Emits 'keyEvent' signal. [ virtual protected ]

References vpKeyEvent().

void OCCViewer_ViewPort::keyReleaseEvent ( QKeyEvent *  e)
protectedvirtual

Emits 'keyEvent' signal. [ virtual protected ]

References vpKeyEvent().

void OCCViewer_ViewPort::mouseDoubleClickEvent ( QMouseEvent *  e)
protectedvirtual

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mouseMoveEvent ( QMouseEvent *  e)
protectedvirtual

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Emits 'mouseEvent' signal. [ virtual protected ]

References vpMouseEvent().

void OCCViewer_ViewPort::onChangeBackground ( )
protectedvirtualslot

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

References backgroundColor(), and setBackgroundColor().

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::paintEvent ( QPaintEvent *  )
protectedvirtual

Repaints the viewport. [ virtual protected ]

Reimplemented in OCCViewer_ViewPort3d.

References myPaintersRedrawing, and vpDrawExternal().

virtual void OCCViewer_ViewPort::pan ( int  ,
int   
)
protectedpure virtual

Implemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::redrawPainters ( )

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

References myPaintersRedrawing.

virtual void OCCViewer_ViewPort::reset ( )
protectedpure virtual

Implemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::selectVisualId ( )
protected

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

References backgroundColor(), choose_cmap(), Plot2d::None, and Window.

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

Sets the background 'color'. [ virtual ]

Reimplemented in OCCViewer_ViewPort3d.

References vpChangeBGColor().

virtual void OCCViewer_ViewPort::setCenter ( int  ,
int   
)
protectedpure virtual

Implemented in OCCViewer_ViewPort3d.

void OCCViewer_ViewPort::setSketchingEnabled ( bool  enable)

Enables / disables sketching [ public ]

References myEnableSketching.

void OCCViewer_ViewPort::setTransformEnabled ( bool  enable)

Enables / disables transformations. [ public ]

References myEnableTransform.

bool OCCViewer_ViewPort::synchronize ( OCCViewer_ViewPort )
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)

void OCCViewer_ViewPort::vpChangeBGColor ( QColor  )
signal
void OCCViewer_ViewPort::vpDrawExternal ( QPainter *  )
signal
void OCCViewer_ViewPort::vpKeyEvent ( QKeyEvent *  )
signal
void OCCViewer_ViewPort::vpMouseEvent ( QMouseEvent *  )
signal
void OCCViewer_ViewPort::vpTransformed ( OCCViewer_ViewPort )
signal
virtual void OCCViewer_ViewPort::zoom ( int  ,
int  ,
int  ,
int   
)
protectedpure virtual

Implemented in OCCViewer_ViewPort3d.

Friends And Related Function Documentation

friend class OCCViewer_ViewSketcher
friend

Member Data Documentation

bool OCCViewer_ViewPort::myEnableSketching
protected
bool OCCViewer_ViewPort::myEnableTransform
protected
bool OCCViewer_ViewPort::myPaintersRedrawing
protected
QList<QtxAction*> OCCViewer_ViewPort::myPopupActions
protected
int OCCViewer_ViewPort::nCounter
staticprivate

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