#include <qocc3dwidget.h>
Collaboration diagram for Qocc3dWidget:
Public Types | |
CurAction3d_Undefined | |
CurAction3d_Nothing | |
CurAction3d_Picking | |
CurAction3d_DynamicZooming | |
CurAction3d_WindowZooming | |
CurAction3d_DynamicPanning | |
CurAction3d_GlobalPanning | |
CurAction3d_DynamicRotation | |
enum | CurrentAction3d { CurAction3d_Undefined, CurAction3d_Nothing, CurAction3d_Picking, CurAction3d_DynamicZooming, CurAction3d_WindowZooming, CurAction3d_DynamicPanning, CurAction3d_GlobalPanning, CurAction3d_DynamicRotation } |
Public Slots | |
void | idle () |
Go idle This called from various locations, and also exposed as a slot. | |
void | fitExtents () |
Just fits the current window This function just fits the current objects to the window, without either reducing or increasing the Z extents. This can cause clipping of the objects after rotation. | |
void | fitAll () |
Fits the model to view extents This function fits the current objects to the window, reducing or increasing the Z extents as needed. | |
void | fitArea () |
Sets up the view for a rubberband window zoom. | |
void | zoom () |
Sets up the view for a dynamic zoom. | |
void | pan () |
Sets up the view for panning. | |
void | globalPan () |
Sets up the view for global panning, whatever that is! | |
void | rotation () |
Sets up the view for dynamic rotation. | |
void | hiddenLineOn () |
void | hiddenLineOff () |
void | background () |
void | viewFront () |
View from canonical "front". | |
void | viewBack () |
View from canonical "back". | |
void | viewTop () |
View from canonical "top". This is traditional XOY axis. | |
void | viewBottom () |
View from canonical "bottom". | |
void | viewLeft () |
View from canonical "left". | |
void | viewRight () |
View from canonical "right". | |
void | viewAxo () |
View using axonometric projection. | |
void | viewTopFront () |
void | viewGrid () |
This aligns the view to the current privilege plane. Not so interesting at the moment, but wait until custom grid planes are implemented! | |
void | viewReset () |
void | setReset () |
void | newShape () |
void | refresh () |
Signals | |
void | initialized () |
void | selectionChanged () |
void | mouseMoved (Qocc3dWidget *widget, QMouseEvent *e) |
void | mouseClicked (Qocc3dWidget *widget, QMouseEvent *e) |
void | sendStatus (const QString aMessage) |
void | popupMenu (const Qocc3dWidget *aView, const QPoint aPoint) |
Just a placeholder for now. | |
void | error (int errorCode, QString &errorDescription) |
Public Member Functions | |
Qocc3dWidget (const QoccController *aController=NULL, QWidget *parent=NULL, Qt::WindowFlags wflags=0) | |
Constructor for Qocc3dWidget. This constructor creates an uninitialised window for rendering a Handle_V3d_View based OpenCASCADE 3D viewer. | |
~Qocc3dWidget () | |
Default destructor for Qocc3dWidget. This should delete any memory and release any resources. No parameters required. | |
QoccController * | getController (void) |
Handle (AIS_InteractiveContext)&getContext(void) | |
Handle (V3d_Viewer)&getViewer(void) | |
Handle (V3d_View)&getView(void) | |
V3d_Coordinate | x (void) |
V3d_Coordinate | y (void) |
V3d_Coordinate | z (void) |
Qt::MouseButtons | buttons () const |
Qt::MouseButtons | button () const |
Qt::KeyboardModifiers | keyboard () const |
void | setStatusMessage (const QString &aString) |
QPaintEngine * | paintEngine () const |
Returns a NULL QPaintEngine This should result in a minor performance benefit. | |
gp_Dir | getDirection () |
gp_Pln | getPlane () |
gp_Pnt | getPoint () |
void | redraw (bool isPainting=false) |
The main redraw function This called from various locations. | |
void | setProjection (V3d_TypeOfOrientation orientation) |
bool | dump (Standard_CString theFile) |
Protected Member Functions | |
void | initializeOCC () |
The initializeOCC() procedure. This function creates the widget's view using the interactive context provided. Currently it also creates a trihedron object in the lower left corner - this will eventually be managed by an external system setting. | |
virtual void | paintEvent (QPaintEvent *e) |
Paint Event Called when the Widget needs to repaint itself. | |
virtual void | resizeEvent (QResizeEvent *e) |
Resize event. 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. | |
virtual void | mousePressEvent (QMouseEvent *e) |
Mouse press event. | |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Mouse release event. | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
Mouse move event, driven from application message loop. | |
virtual void | wheelEvent (QWheelEvent *e) |
The QWheelEvent class contains parameters that describe a wheel event. | |
virtual void | leaveEvent (QEvent *) |
A leave event is sent to the widget when the mouse cursor leaves the widget. This sub-classed event handler fixes redraws when gestures are interrupted by use of parent menus etc. (Candidate for change). | |
Private Member Functions | |
Handle (V3d_View) myView | |
Handle (Visual3d_View) myVisual | |
void | onLeftButtonDown (Qt::KeyboardModifiers nFlags, const QPoint point) |
This function handles left button down events from the mouse. | |
void | onMiddleButtonDown (Qt::KeyboardModifiers nFlags, const QPoint point) |
This function handles middle button down events from the mouse. | |
void | onRightButtonDown (Qt::KeyboardModifiers nFlags, const QPoint point) |
This function handles right button down events from the mouse. | |
void | onLeftButtonUp (Qt::KeyboardModifiers nFlags, const QPoint point) |
This function handles left button up events from the mouse. This marks the end of the gesture. | |
void | onMiddleButtonUp (Qt::KeyboardModifiers nFlags, const QPoint point) |
Middle button up event handler. This marks the end of the gesture. | |
void | onRightButtonUp (Qt::KeyboardModifiers nFlags, const QPoint point) |
Right button up event handler. This marks the end of the gesture. | |
void | onMouseMove (Qt::MouseButtons buttons, Qt::KeyboardModifiers nFlags, const QPoint point) |
Mouse move event handler. | |
AIS_StatusOfPick | dragEvent (const QPoint startPoint, const QPoint endPoint, const bool multi=false) |
Drag event handler. | |
AIS_StatusOfPick | inputEvent (const bool multi=false) |
This handles object highlighting during movement of the mouse across the view. | |
AIS_StatusOfDetection | moveEvent (const QPoint point) |
Move event detection handler. | |
void | setMode (const CurrentAction3d mode) |
This function sets the current cursor for the given interraction mode. | |
Standard_Real | precision (Standard_Real aReal) |
This is a Utility function for rounding the input value to a specific DP. | |
Standard_Real | viewPrecision (bool resized=false) |
This routine calculates the minimum sensible precision for the point selection routines, by setting an minumum resolution to a decade one higher than the equivalent pixel width. | |
void | drawRubberBand (const QPoint origin, const QPoint position) |
Draws the rubberband box This function is designed to reduce "flicker" as the box is redrawn, especially when the origin in the bottom corner of the window. | |
void | showRubberBand (void) |
Shows the rubberband box. | |
void | hideRubberBand (void) |
Hides the rubberband box. | |
void | sendStatusLocation (void) |
Standard_Boolean | convertToPlane (const Standard_Integer Xs, const Standard_Integer Ys, Standard_Real &X, Standard_Real &Y, Standard_Real &Z) |
ConvertToPlane convert 2d window position to 3d point on priviledged plane. This routine was provided by Matra Datavision during Foundation training. There still appears to be a pixel error in y co-ordinate transforms. | |
void | paintOCC () |
The OpenGL paint routine in the callback. | |
Static Private Member Functions | |
static int | paintCallBack (Aspect_Drawable, void *, Aspect_GraphicCallbackStruct *) |
Static OpenCascade callback proxy. | |
Private Attributes | |
Handle_Xw_Window | myWindow |
QoccController * | myController |
Standard_Boolean | myViewResized |
Standard_Boolean | myViewInitialized |
CurrentAction3d | myMode |
Quantity_Factor | myCurZoom |
Standard_Boolean | myGridSnap |
AIS_StatusOfDetection | myDetection |
V3d_Coordinate | myCurrentX |
V3d_Coordinate | myCurrentY |
V3d_Coordinate | myCurrentZ |
QRubberBand * | myRubberBand |
QPoint | myStartPoint |
QPoint | myCurrentPoint |
Standard_Real | myPrecision |
Standard_Real | myViewPrecision |
Standard_Boolean | myMapIsValid |
Qt::KeyboardModifiers | myKeyboardFlags |
Qt::MouseButton | myMouseFlags |
Qt::MouseButtons | myMouseState |
QCursor | myCrossCursor |
QToolBar * | myToolBar |
Static Private Attributes | |
static QString | myStatusMessage = QObject::tr("") |
Definition at line 46 of file qocc3dwidget.h.
CurAction3d_Undefined | |
CurAction3d_Nothing | |
CurAction3d_Picking | |
CurAction3d_DynamicZooming | |
CurAction3d_WindowZooming | |
CurAction3d_DynamicPanning | |
CurAction3d_GlobalPanning | |
CurAction3d_DynamicRotation |
Definition at line 52 of file qocc3dwidget.h.
Qocc3dWidget::Qocc3dWidget | ( | const QoccController * | aController = NULL , |
|
QWidget * | parent = NULL , |
|||
Qt::WindowFlags | f = 0 | |||
) |
Constructor for Qocc3dWidget. This constructor creates an uninitialised window for rendering a Handle_V3d_View based OpenCASCADE 3D viewer.
aContext | The widget's Qocc context | |
parent | The widget's parent widget | |
wflags | The widget's window configuration flags |
Definition at line 63 of file qocc3dwidget.cpp.
References CurAction3d_Undefined, INITIAL_PRECISION, myController, myCrossCursor, myDetection, myGridSnap, myKeyboardFlags, myMode, myMouseFlags, myPrecision, myRubberBand, myViewInitialized, myViewPrecision, and myViewResized.
Qocc3dWidget::~Qocc3dWidget | ( | ) |
Default destructor for Qocc3dWidget. This should delete any memory and release any resources. No parameters required.
Definition at line 128 of file qocc3dwidget.cpp.
References myRubberBand.
void Qocc3dWidget::background | ( | ) | [slot] |
Qt::MouseButtons Qocc3dWidget::button | ( | ) | const [inline] |
Definition at line 96 of file qocc3dwidget.h.
Qt::MouseButtons Qocc3dWidget::buttons | ( | ) | const [inline] |
Definition at line 95 of file qocc3dwidget.h.
Standard_Boolean Qocc3dWidget::convertToPlane | ( | const Standard_Integer | Xs, | |
const Standard_Integer | Ys, | |||
Standard_Real & | X, | |||
Standard_Real & | Y, | |||
Standard_Real & | Z | |||
) | [private] |
ConvertToPlane convert 2d window position to 3d point on priviledged plane. This routine was provided by Matra Datavision during Foundation training. There still appears to be a pixel error in y co-ordinate transforms.
------------------------------------------------------------------------------------
Xs | The screen's x co-ordinate (in) | |
Ys | The screen's y co-ordinate (in) | |
X | The output x position on the privileged plane (out) | |
Y | The output y position on the privileged plane (out) | |
Z | The output z position on the privileged plane (out) |
Definition at line 1019 of file qocc3dwidget.cpp.
Referenced by mouseMoveEvent().
Here is the caller graph for this function:
AIS_StatusOfPick Qocc3dWidget::dragEvent | ( | const QPoint | startPoint, | |
const QPoint | endPoint, | |||
const bool | multi = false | |||
) | [private] |
Drag event handler.
startPoint | The gesture start point. | |
endPoint | The gesture end point. | |
multi | Allows selection of multiple objects. |
Definition at line 900 of file qocc3dwidget.cpp.
References myController, and selectionChanged().
Referenced by onLeftButtonUp(), and onMouseMove().
Here is the caller graph for this function:
void Qocc3dWidget::drawRubberBand | ( | const QPoint | origin, | |
const QPoint | position | |||
) | [private] |
Draws the rubberband box This function is designed to reduce "flicker" as the box is redrawn, especially when the origin in the bottom corner of the window.
origin | A QPoint defining the screen origin | |
position | A QPoint defining the current cursor screen location |
Definition at line 1064 of file qocc3dwidget.cpp.
References hideRubberBand(), myRubberBand, redraw(), and showRubberBand().
Referenced by onMouseMove().
Here is the call graph for this function:
Here is the caller graph for this function:
bool Qocc3dWidget::dump | ( | Standard_CString | theFile | ) |
Definition at line 946 of file qocc3dwidget.cpp.
References redraw().
Here is the call graph for this function:
void Qocc3dWidget::error | ( | int | errorCode, | |
QString & | errorDescription | |||
) | [signal] |
void Qocc3dWidget::fitAll | ( | void | ) | [slot] |
Fits the model to view extents This function fits the current objects to the window, reducing or increasing the Z extents as needed.
Definition at line 449 of file qocc3dwidget.cpp.
References viewPrecision().
Referenced by newShape().
void Qocc3dWidget::fitArea | ( | void | ) | [slot] |
Sets up the view for a rubberband window zoom.
Definition at line 464 of file qocc3dwidget.cpp.
References CurAction3d_WindowZooming, and setMode().
void Qocc3dWidget::fitExtents | ( | void | ) | [slot] |
Just fits the current window This function just fits the current objects to the window, without either reducing or increasing the Z extents. This can cause clipping of the objects after rotation.
Definition at line 434 of file qocc3dwidget.cpp.
References viewPrecision().
QoccController* Qocc3dWidget::getController | ( | void | ) | [inline] |
Definition at line 86 of file qocc3dwidget.h.
Referenced by QoccCmdPoint::clickEvent(), QoccCmdLine2Pt::clickEvent(), QoccCmdCircle2Pt::clickEvent(), QoccCmdLine2Pt::moveEvent(), and QoccCmdCircle2Pt::moveEvent().
Here is the caller graph for this function:
gp_Dir Qocc3dWidget::getDirection | ( | ) |
Definition at line 201 of file qocc3dwidget.cpp.
References myController.
Referenced by QoccCmdLine2Pt::clickEvent(), and QoccCmdCircle2Pt::clickEvent().
Here is the caller graph for this function:
gp_Pln Qocc3dWidget::getPlane | ( | ) |
gp_Pnt Qocc3dWidget::getPoint | ( | ) |
void Qocc3dWidget::globalPan | ( | ) | [slot] |
Sets up the view for global panning, whatever that is!
Definition at line 500 of file qocc3dwidget.cpp.
References CurAction3d_GlobalPanning, myCurZoom, setMode(), and viewPrecision().
Qocc3dWidget::Handle | ( | Visual3d_View | ) | [private] |
Qocc3dWidget::Handle | ( | V3d_View | ) | [private] |
Qocc3dWidget::Handle | ( | V3d_View | ) | [inline] |
Definition at line 89 of file qocc3dwidget.h.
Qocc3dWidget::Handle | ( | V3d_Viewer | ) | [inline] |
Definition at line 88 of file qocc3dwidget.h.
Qocc3dWidget::Handle | ( | AIS_InteractiveContext | ) | [inline] |
Definition at line 87 of file qocc3dwidget.h.
Referenced by initializeOCC().
Here is the caller graph for this function:
void Qocc3dWidget::hiddenLineOff | ( | ) | [slot] |
Definition at line 600 of file qocc3dwidget.cpp.
void Qocc3dWidget::hiddenLineOn | ( | ) | [slot] |
Definition at line 610 of file qocc3dwidget.cpp.
void Qocc3dWidget::hideRubberBand | ( | void | ) | [private] |
Hides the rubberband box.
Definition at line 1087 of file qocc3dwidget.cpp.
References myRubberBand.
Referenced by drawRubberBand(), and mouseReleaseEvent().
Here is the caller graph for this function:
void Qocc3dWidget::idle | ( | ) | [slot] |
Go idle This called from various locations, and also exposed as a slot.
Definition at line 397 of file qocc3dwidget.cpp.
References CurAction3d_Nothing, and setMode().
void Qocc3dWidget::initialized | ( | ) | [signal] |
Referenced by initializeOCC().
void Qocc3dWidget::initializeOCC | ( | ) | [protected] |
The initializeOCC() procedure. This function creates the widget's view using the interactive context provided. Currently it also creates a trihedron object in the lower left corner - this will eventually be managed by an external system setting.
aContext | Handle to the AIS Interactive Context managing the view |
Definition at line 144 of file qocc3dwidget.cpp.
References CurAction3d_Nothing, Handle(), initialized(), myController, myViewInitialized, myViewResized, myWindow, paintCallBack(), and setMode().
Referenced by paintEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
AIS_StatusOfPick Qocc3dWidget::inputEvent | ( | const bool | multi = false |
) | [private] |
This handles object highlighting during movement of the mouse across the view.
multi | Selects multiple objects if true (default false). |
Definition at line 927 of file qocc3dwidget.cpp.
References myController, and selectionChanged().
Referenced by onLeftButtonUp().
Here is the caller graph for this function:
Qt::KeyboardModifiers Qocc3dWidget::keyboard | ( | ) | const [inline] |
Definition at line 97 of file qocc3dwidget.h.
void Qocc3dWidget::leaveEvent | ( | QEvent * | ) | [protected, virtual] |
A leave event is sent to the widget when the mouse cursor leaves the widget. This sub-classed event handler fixes redraws when gestures are interrupted by use of parent menus etc. (Candidate for change).
e | The event data |
Definition at line 362 of file qocc3dwidget.cpp.
References myMouseFlags.
void Qocc3dWidget::mouseClicked | ( | Qocc3dWidget * | widget, | |
QMouseEvent * | e | |||
) | [signal] |
Referenced by mouseReleaseEvent().
void Qocc3dWidget::mouseMoved | ( | Qocc3dWidget * | widget, | |
QMouseEvent * | e | |||
) | [signal] |
Referenced by mouseMoveEvent().
void Qocc3dWidget::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Mouse move event, driven from application message loop.
e | The event data. |
Definition at line 319 of file qocc3dwidget.cpp.
References convertToPlane(), QoccController::isDrawing(), mouseMoved(), myController, myCurrentPoint, myCurrentX, myCurrentY, myCurrentZ, myGridSnap, myKeyboardFlags, myMouseFlags, myMouseState, onMouseMove(), precision(), sendStatus(), and sendStatusLocation().
Here is the call graph for this function:
void Qocc3dWidget::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Mouse press event.
e | The event data. |
Definition at line 262 of file qocc3dwidget.cpp.
References myKeyboardFlags, myMouseFlags, myMouseState, onLeftButtonDown(), onMiddleButtonDown(), and onRightButtonDown().
Here is the call graph for this function:
void Qocc3dWidget::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Mouse release event.
e | The event data. |
Definition at line 290 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, hideRubberBand(), mouseClicked(), myKeyboardFlags, myMouseFlags, myMouseState, onLeftButtonUp(), onMiddleButtonUp(), onRightButtonUp(), and redraw().
Here is the call graph for this function:
AIS_StatusOfDetection Qocc3dWidget::moveEvent | ( | const QPoint | point | ) | [private] |
Move event detection handler.
Definition at line 886 of file qocc3dwidget.cpp.
References myController.
Referenced by onMouseMove().
Here is the caller graph for this function:
void Qocc3dWidget::newShape | ( | ) | [slot] |
void Qocc3dWidget::onLeftButtonDown | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
This function handles left button down events from the mouse.
Definition at line 653 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, CurAction3d_DynamicPanning, CurAction3d_DynamicRotation, CurAction3d_DynamicZooming, CurAction3d_GlobalPanning, CurAction3d_Nothing, CurAction3d_Picking, CurAction3d_WindowZooming, myMode, myStartPoint, and setMode().
Referenced by mousePressEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onLeftButtonUp | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
This function handles left button up events from the mouse. This marks the end of the gesture.
Definition at line 727 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, CurAction3d_DynamicPanning, CurAction3d_DynamicRotation, CurAction3d_DynamicZooming, CurAction3d_GlobalPanning, CurAction3d_Nothing, CurAction3d_Picking, CurAction3d_WindowZooming, dragEvent(), inputEvent(), MULTISELECTIONKEY, myCurrentPoint, myCurZoom, myMode, myStartPoint, selectionChanged(), setMode(), ValZWMin, and viewPrecision().
Referenced by mouseReleaseEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onMiddleButtonDown | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
This function handles middle button down events from the mouse.
Definition at line 697 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, CurAction3d_DynamicPanning, myStartPoint, and setMode().
Referenced by mousePressEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onMiddleButtonUp | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
Middle button up event handler. This marks the end of the gesture.
Definition at line 792 of file qocc3dwidget.cpp.
References CurAction3d_Nothing, and setMode().
Referenced by mouseReleaseEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onMouseMove | ( | Qt::MouseButtons | buttons, | |
Qt::KeyboardModifiers | nFlags, | |||
const QPoint | point | |||
) | [private] |
Mouse move event handler.
buttons | ||
nFlags | ||
point |
Definition at line 828 of file qocc3dwidget.cpp.
References CurAction3d_DynamicPanning, CurAction3d_DynamicRotation, CurAction3d_DynamicZooming, CurAction3d_GlobalPanning, CurAction3d_Nothing, CurAction3d_Picking, CurAction3d_WindowZooming, dragEvent(), drawRubberBand(), moveEvent(), MULTISELECTIONKEY, myCurrentPoint, myMode, myStartPoint, and viewPrecision().
Referenced by mouseMoveEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onRightButtonDown | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
This function handles right button down events from the mouse.
Definition at line 709 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, CurAction3d_DynamicRotation, myStartPoint, popupMenu(), and setMode().
Referenced by mousePressEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::onRightButtonUp | ( | Qt::KeyboardModifiers | nFlags, | |
const QPoint | point | |||
) | [private] |
Right button up event handler. This marks the end of the gesture.
Definition at line 801 of file qocc3dwidget.cpp.
References CASCADESHORTCUTKEY, CurAction3d_Nothing, myCurrentPoint, myMode, popupMenu(), and setMode().
Referenced by mouseReleaseEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
int Qocc3dWidget::paintCallBack | ( | Aspect_Drawable | , | |
void * | , | |||
Aspect_GraphicCallbackStruct * | ||||
) | [static, private] |
Static OpenCascade callback proxy.
Definition at line 1097 of file qocc3dwidget.cpp.
References paintOCC().
Referenced by initializeOCC().
Here is the call graph for this function:
Here is the caller graph for this function:
QPaintEngine * Qocc3dWidget::paintEngine | ( | ) | const |
Returns a NULL QPaintEngine This should result in a minor performance benefit.
Definition at line 221 of file qocc3dwidget.cpp.
void Qocc3dWidget::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
Paint Event Called when the Widget needs to repaint itself.
e | The event data. |
Definition at line 231 of file qocc3dwidget.cpp.
References initializeOCC(), myViewInitialized, and redraw().
Here is the call graph for this function:
void Qocc3dWidget::paintOCC | ( | ) | [private] |
The OpenGL paint routine in the callback.
Definition at line 1109 of file qocc3dwidget.cpp.
Referenced by paintCallBack().
Here is the caller graph for this function:
void Qocc3dWidget::pan | ( | void | ) | [slot] |
Sets up the view for panning.
Definition at line 482 of file qocc3dwidget.cpp.
References CurAction3d_DynamicPanning, and setMode().
void Qocc3dWidget::popupMenu | ( | const Qocc3dWidget * | aView, | |
const QPoint | aPoint | |||
) | [signal] |
Standard_Real Qocc3dWidget::precision | ( | Standard_Real | aReal | ) | [private] |
This is a Utility function for rounding the input value to a specific DP.
Definition at line 992 of file qocc3dwidget.cpp.
References myPrecision, SIGN, and viewPrecision().
Referenced by mouseMoveEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::redraw | ( | bool | isPainting = false |
) |
The main redraw function This called from various locations.
Definition at line 405 of file qocc3dwidget.cpp.
References myMouseFlags, myViewResized, and viewPrecision().
Referenced by background(), drawRubberBand(), dump(), mouseReleaseEvent(), paintEvent(), and refresh().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::refresh | ( | ) | [slot] |
void Qocc3dWidget::resizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Resize event. 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.
e | The event data. |
Definition at line 253 of file qocc3dwidget.cpp.
References myViewResized.
void Qocc3dWidget::rotation | ( | void | ) | [slot] |
Sets up the view for dynamic rotation.
Definition at line 491 of file qocc3dwidget.cpp.
References CurAction3d_DynamicRotation, and setMode().
void Qocc3dWidget::selectionChanged | ( | ) | [signal] |
Referenced by dragEvent(), inputEvent(), and onLeftButtonUp().
void Qocc3dWidget::sendStatus | ( | const QString | aMessage | ) | [signal] |
Referenced by mouseMoveEvent(), sendStatusLocation(), and setStatusMessage().
void Qocc3dWidget::sendStatusLocation | ( | void | ) | [private] |
Definition at line 1217 of file qocc3dwidget.cpp.
References myStatusMessage, sendStatus(), x(), y(), and z().
Referenced by mouseMoveEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
void Qocc3dWidget::setMode | ( | const CurrentAction3d | mode | ) | [private] |
This function sets the current cursor for the given interraction mode.
mode | The interraction mode |
Definition at line 956 of file qocc3dwidget.cpp.
References CurAction3d_DynamicPanning, CurAction3d_DynamicRotation, CurAction3d_DynamicZooming, CurAction3d_GlobalPanning, CurAction3d_Nothing, CurAction3d_WindowZooming, and myMode.
Referenced by fitArea(), globalPan(), idle(), initializeOCC(), onLeftButtonDown(), onLeftButtonUp(), onMiddleButtonDown(), onMiddleButtonUp(), onRightButtonDown(), onRightButtonUp(), pan(), rotation(), and zoom().
Here is the caller graph for this function:
void Qocc3dWidget::setProjection | ( | V3d_TypeOfOrientation | orientation | ) |
Definition at line 1226 of file qocc3dwidget.cpp.
Referenced by viewAxo(), viewBack(), viewBottom(), viewFront(), viewLeft(), viewRight(), viewTop(), and viewTopFront().
void Qocc3dWidget::setReset | ( | ) | [slot] |
void Qocc3dWidget::setStatusMessage | ( | const QString & | aString | ) |
void Qocc3dWidget::showRubberBand | ( | void | ) | [private] |
Shows the rubberband box.
Definition at line 1077 of file qocc3dwidget.cpp.
References myRubberBand.
Referenced by drawRubberBand().
Here is the caller graph for this function:
void Qocc3dWidget::viewAxo | ( | ) | [slot] |
View using axonometric projection.
Definition at line 582 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewBack | ( | ) | [slot] |
View from canonical "back".
Definition at line 540 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewBottom | ( | ) | [slot] |
View from canonical "bottom".
Definition at line 558 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewFront | ( | ) | [slot] |
View from canonical "front".
Definition at line 532 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewGrid | ( | ) | [slot] |
This aligns the view to the current privilege plane. Not so interesting at the moment, but wait until custom grid planes are implemented!
Definition at line 520 of file qocc3dwidget.cpp.
void Qocc3dWidget::viewLeft | ( | ) | [slot] |
View from canonical "left".
Definition at line 566 of file qocc3dwidget.cpp.
References setProjection().
Standard_Real Qocc3dWidget::viewPrecision | ( | bool | resized = false |
) | [private] |
This routine calculates the minimum sensible precision for the point selection routines, by setting an minumum resolution to a decade one higher than the equivalent pixel width.
resized | Indicates that recaculation os required due to state changes in the view. |
Definition at line 1170 of file qocc3dwidget.cpp.
References myPrecision, myViewPrecision, and myWindow.
Referenced by fitAll(), fitExtents(), globalPan(), onLeftButtonUp(), onMouseMove(), precision(), redraw(), setReset(), and wheelEvent().
Here is the caller graph for this function:
void Qocc3dWidget::viewReset | ( | ) | [slot] |
Definition at line 592 of file qocc3dwidget.cpp.
void Qocc3dWidget::viewRight | ( | ) | [slot] |
View from canonical "right".
Definition at line 574 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewTop | ( | ) | [slot] |
View from canonical "top". This is traditional XOY axis.
Definition at line 549 of file qocc3dwidget.cpp.
References setProjection().
void Qocc3dWidget::viewTopFront | ( | ) | [slot] |
void Qocc3dWidget::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
The QWheelEvent class contains parameters that describe a wheel event.
Definition at line 370 of file qocc3dwidget.cpp.
References viewPrecision().
Here is the call graph for this function:
V3d_Coordinate Qocc3dWidget::x | ( | void | ) | [inline] |
Definition at line 91 of file qocc3dwidget.h.
Referenced by QoccCmdPoint::clickEvent(), QoccCmdLine2Pt::clickEvent(), QoccCmdCircle2Pt::clickEvent(), getPoint(), QoccCmdLine2Pt::moveEvent(), QoccCmdCircle2Pt::moveEvent(), and sendStatusLocation().
Here is the caller graph for this function:
V3d_Coordinate Qocc3dWidget::y | ( | void | ) | [inline] |
Definition at line 92 of file qocc3dwidget.h.
Referenced by QoccCmdPoint::clickEvent(), QoccCmdLine2Pt::clickEvent(), QoccCmdCircle2Pt::clickEvent(), getPoint(), QoccCmdLine2Pt::moveEvent(), QoccCmdCircle2Pt::moveEvent(), and sendStatusLocation().
Here is the caller graph for this function:
V3d_Coordinate Qocc3dWidget::z | ( | void | ) | [inline] |
Definition at line 93 of file qocc3dwidget.h.
Referenced by QoccCmdPoint::clickEvent(), QoccCmdLine2Pt::clickEvent(), QoccCmdCircle2Pt::clickEvent(), getPoint(), QoccCmdLine2Pt::moveEvent(), QoccCmdCircle2Pt::moveEvent(), and sendStatusLocation().
Here is the caller graph for this function:
void Qocc3dWidget::zoom | ( | void | ) | [slot] |
Sets up the view for a dynamic zoom.
Definition at line 473 of file qocc3dwidget.cpp.
References CurAction3d_DynamicZooming, and setMode().
QoccController* Qocc3dWidget::myController [private] |
Definition at line 174 of file qocc3dwidget.h.
Referenced by dragEvent(), getDirection(), getPlane(), initializeOCC(), inputEvent(), mouseMoveEvent(), moveEvent(), and Qocc3dWidget().
QCursor Qocc3dWidget::myCrossCursor [private] |
QPoint Qocc3dWidget::myCurrentPoint [private] |
Definition at line 189 of file qocc3dwidget.h.
Referenced by mouseMoveEvent(), onLeftButtonUp(), onMouseMove(), and onRightButtonUp().
V3d_Coordinate Qocc3dWidget::myCurrentX [private] |
V3d_Coordinate Qocc3dWidget::myCurrentY [private] |
V3d_Coordinate Qocc3dWidget::myCurrentZ [private] |
Quantity_Factor Qocc3dWidget::myCurZoom [private] |
AIS_StatusOfDetection Qocc3dWidget::myDetection [private] |
Standard_Boolean Qocc3dWidget::myGridSnap [private] |
Qt::KeyboardModifiers Qocc3dWidget::myKeyboardFlags [private] |
Definition at line 195 of file qocc3dwidget.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and Qocc3dWidget().
Standard_Boolean Qocc3dWidget::myMapIsValid [private] |
Definition at line 193 of file qocc3dwidget.h.
CurrentAction3d Qocc3dWidget::myMode [private] |
Definition at line 178 of file qocc3dwidget.h.
Referenced by onLeftButtonDown(), onLeftButtonUp(), onMouseMove(), onRightButtonUp(), Qocc3dWidget(), and setMode().
Qt::MouseButton Qocc3dWidget::myMouseFlags [private] |
Definition at line 196 of file qocc3dwidget.h.
Referenced by leaveEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), Qocc3dWidget(), and redraw().
Qt::MouseButtons Qocc3dWidget::myMouseState [private] |
Definition at line 197 of file qocc3dwidget.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
Standard_Real Qocc3dWidget::myPrecision [private] |
Definition at line 191 of file qocc3dwidget.h.
Referenced by precision(), Qocc3dWidget(), and viewPrecision().
QRubberBand* Qocc3dWidget::myRubberBand [private] |
Definition at line 187 of file qocc3dwidget.h.
Referenced by drawRubberBand(), hideRubberBand(), Qocc3dWidget(), showRubberBand(), and ~Qocc3dWidget().
QPoint Qocc3dWidget::myStartPoint [private] |
Definition at line 188 of file qocc3dwidget.h.
Referenced by onLeftButtonDown(), onLeftButtonUp(), onMiddleButtonDown(), onMouseMove(), and onRightButtonDown().
QString Qocc3dWidget::myStatusMessage = QObject::tr("") [static, private] |
Definition at line 202 of file qocc3dwidget.h.
Referenced by sendStatusLocation(), and setStatusMessage().
QToolBar* Qocc3dWidget::myToolBar [private] |
Definition at line 199 of file qocc3dwidget.h.
Standard_Boolean Qocc3dWidget::myViewInitialized [private] |
Definition at line 177 of file qocc3dwidget.h.
Referenced by initializeOCC(), paintEvent(), and Qocc3dWidget().
Standard_Real Qocc3dWidget::myViewPrecision [private] |
Standard_Boolean Qocc3dWidget::myViewResized [private] |
Definition at line 176 of file qocc3dwidget.h.
Referenced by initializeOCC(), Qocc3dWidget(), redraw(), and resizeEvent().
Handle_Xw_Window Qocc3dWidget::myWindow [private] |