#include <GLViewer_ViewPort.h>
Signals | |
void | vpKeyEvent (QKeyEvent *) |
void | vpMouseEvent (QMouseEvent *) |
void | vpWheelEvent (QWheelEvent *) |
void | vpDrawExternal (QPainter *) |
void | contextMenuRequested (QContextMenuEvent *) |
Public Member Functions | |
GLViewer_ViewPort (QWidget *parent) | |
~GLViewer_ViewPort () | |
void | setSketchingEnabled (bool) |
Activates/deactivates sketching. More... | |
bool | isSketchingEnabled () const |
Checks active status of sketcher. More... | |
void | setTransformEnabled (bool) |
Activates/deactivates transformer. More... | |
bool | isTransformEnabled () const |
Checks active status of transformer. More... | |
virtual QColor | backgroundColor () const |
Returns background color. More... | |
virtual void | setBackgroundColor (const QColor &) |
Sets background color. More... | |
void | redrawPainters () |
Redraw external pa inters. More... | |
virtual void | onUpdate () |
Updates view. More... | |
virtual BlockStatus | currentBlock () |
Returns blocking status for current started operations. More... | |
Static Public Member Functions | |
static QCursor * | getDefaultCursor () |
static void | setDefaultCursor (const QCursor &newCursor) |
static QCursor * | getRotCursor () |
static void | setRotCursor (const QCursor &newCursor) |
static QCursor * | getSketchCursor () |
static void | setSketchCursor (const QCursor &newCursor) |
Protected Types | |
enum | ViewType { Type2D , Type3D } |
Protected Slots | |
virtual void | onChangeBgColor () |
Protected Member Functions | |
void | selectVisualId (ViewType) |
virtual QPaintDevice * | getPaintDevice () |
virtual void | contextMenuEvent (QContextMenuEvent *e) |
virtual void | paintEvent (QPaintEvent *) |
EVENTS. More... | |
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 | wheelEvent (QWheelEvent *) |
virtual void | reset ()=0 |
TO BE REDEFINED. More... | |
virtual void | pan (int, int)=0 |
virtual void | setCenter (int, int)=0 |
virtual void | zoom (int, int, int, int)=0 |
virtual void | fitRect (const QRect &)=0 |
virtual void | fitSelect ()=0 |
virtual void | fitAll (bool keepScale=false, bool withZ=true)=0 |
Static Protected Member Functions | |
static void | createCursors () |
STATICS. More... | |
static void | destroyCursors () |
static QCursor * | getHandCursor () |
static void | setHandCursor (const QCursor &newCursor) |
static QCursor * | getPanCursor () |
static void | setPanCursor (const QCursor &newCursor) |
static QCursor * | getPanglCursor () |
static void | setPanglCursor (const QCursor &newCursor) |
static QCursor * | getZoomCursor () |
static void | setZoomCursor (const QCursor &newCursor) |
Protected Attributes | |
bool | myEnableSketching |
bool | myEnableTransform |
bool | myPaintersRedrawing |
Private Member Functions | |
void | initialize () |
void | cleanup () |
Static Private Attributes | |
static int | nCounter = 0 |
static QCursor * | defCursor = 0 |
static QCursor * | panglCursor = 0 |
static QCursor * | handCursor = 0 |
static QCursor * | panCursor = 0 |
static QCursor * | zoomCursor = 0 |
static QCursor * | rotCursor = 0 |
static QCursor * | sketchCursor = 0 |
Friends | |
class | GLViewer_ViewSketcher |
class | GLViewer_ViewTransformer |
Visualisation canvas of GLViewer
|
protected |
GLViewer_ViewPort::GLViewer_ViewPort | ( | QWidget * | parent | ) |
Constructor
References initialize().
GLViewer_ViewPort::~GLViewer_ViewPort | ( | ) |
Destructor
References cleanup().
|
virtual |
Returns background color.
Returns the background color. [ virtual ]
Reimplemented in GLViewer_ViewPort2d.
|
private |
Cleans up the viewport. [ private ]
References destroyCursors(), and nCounter.
|
protectedvirtual |
Custom context menu event handler
References contextMenuRequested().
|
signal |
|
staticprotected |
STATICS.
Creates the necessary viewport cursors. [ static ]
References defCursor, handCursor, QtxResourceMgr::loadPixmap(), panCursor, panglCursor, SUIT_Session::resourceMgr(), rotCursor, SUIT_Session::session(), sketchCursor, and zoomCursor.
|
inlinevirtual |
Returns blocking status for current started operations.
Reimplemented in GLViewer_ViewPort2d.
References BS_NoBlock.
|
staticprotected |
Destroys the viewport cursors. [ static ]
References defCursor, handCursor, panCursor, panglCursor, rotCursor, sketchCursor, and zoomCursor.
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
|
inlinestatic |
|
inlinestaticprotected |
|
inlineprotectedvirtual |
Reimplemented in GLViewer_ViewPort2d.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticprotected |
|
private |
Initializes viewport. [ private ]
References createCursors(), myEnableSketching, myEnableTransform, myPaintersRedrawing, and nCounter.
bool GLViewer_ViewPort::isSketchingEnabled | ( | ) | const |
Checks active status of sketcher.
Returns 'true' if sketching is enabled in this viewport. [ public ]
References myEnableSketching.
bool GLViewer_ViewPort::isTransformEnabled | ( | ) | const |
Checks active status of transformer.
Returns 'true' if transformations ( rotation, zoom etc. ) are enabled in this viewport. [ public ]
References myEnableTransform.
|
protectedvirtual |
Emits 'keyEvent' signal. [ virtual protected ]
References vpKeyEvent().
|
protectedvirtual |
Emits 'keyEvent' signal. [ virtual protected ]
References vpKeyEvent().
|
protectedvirtual |
Emits 'mouseEvent' signal. [ virtual protected ]
Reimplemented in GLViewer_ViewPort2d.
References vpMouseEvent().
|
protectedvirtual |
Emits 'mouseEvent' signal. [ virtual protected ]
Reimplemented in GLViewer_ViewPort2d.
References vpMouseEvent().
|
protectedvirtual |
Emits 'mouseEvent' signal. [ virtual protected ]
Reimplemented in GLViewer_ViewPort2d.
References vpMouseEvent().
|
protectedvirtual |
Emits 'mouseEvent' signal. [ virtual protected ]
Reimplemented in GLViewer_ViewPort2d.
References vpMouseEvent().
|
protectedvirtualslot |
Sets the background color with color selection dialog. [ virtual protected slot ]
References backgroundColor(), and setBackgroundColor().
|
virtual |
Updates view.
Updates this view. Does nothing by default. [ virtual public ]
|
protectedvirtual |
EVENTS.
Repaints the viewport. [ virtual protected ]
Reimplemented in GLViewer_ViewPort2d.
References myPaintersRedrawing, and vpDrawExternal().
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
void GLViewer_ViewPort::redrawPainters | ( | ) |
Redraw external pa inters.
Forces to redraw the viewport by an external painter. [ public ]
References myPaintersRedrawing.
|
protectedpure virtual |
TO BE REDEFINED.
Implemented in GLViewer_ViewPort2d.
|
protected |
Selects visual ID for OpenGL window ( X11 specific ). [ protected ]
References backgroundColor(), choose_cmap(), Plot2d::None, Type2D, Type3D, and Window.
|
virtual |
Sets background color.
Sets the background 'color'. [ virtual ]
Reimplemented in GLViewer_ViewPort2d.
References OCCViewer::color().
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
|
static |
Sets new default cursor. [ static ]
References defCursor.
|
staticprotected |
Sets new cursor for drawing rectangle in the viewport. [ static ]
References handCursor.
|
staticprotected |
Sets new cursor for panning. [ static ]
References panCursor.
|
staticprotected |
Sets new cursor for global panning. [ static ]
References panglCursor.
|
static |
Sets new cursor for rotating. [ static ]
References rotCursor.
|
static |
Sets new cursor for rotating. [ static ]
References rotCursor, and sketchCursor.
void GLViewer_ViewPort::setSketchingEnabled | ( | bool | enable | ) |
Activates/deactivates sketching.
Enables / disables sketching [ public ]
References myEnableSketching.
void GLViewer_ViewPort::setTransformEnabled | ( | bool | enable | ) |
Activates/deactivates transformer.
Enables / disables transformations. [ public ]
References myEnableTransform.
|
staticprotected |
Sets new cursor for zooming. [ static ]
References zoomCursor.
|
signal |
|
signal |
|
signal |
|
signal |
|
protectedvirtual |
Emits 'mouseEvent' signal. [ virtual protected ]
References vpWheelEvent().
|
protectedpure virtual |
Implemented in GLViewer_ViewPort2d.
|
friend |
|
friend |
|
staticprivate |
|
staticprivate |
|
protected |
|
protected |
|
protected |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |