#include <GLViewer_ViewFrame.h>

Public Types | |
| enum | { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId } |
Actions ID. More... | |
Public Slots | |
| virtual void | onDumpView () |
Signals | |
| void | vfDrawExternal (QPainter *) |
| void | vfViewClosing (QCloseEvent *) |
| void | tryClosing (SUIT_ViewWindow *) |
| void | closing (SUIT_ViewWindow *) |
| void | mousePressed (SUIT_ViewWindow *, QMouseEvent *) |
| void | mouseReleased (SUIT_ViewWindow *, QMouseEvent *) |
| void | mouseDoubleClicked (SUIT_ViewWindow *, QMouseEvent *) |
| void | mouseMoving (SUIT_ViewWindow *, QMouseEvent *) |
| void | wheeling (SUIT_ViewWindow *, QWheelEvent *) |
| void | keyPressed (SUIT_ViewWindow *, QKeyEvent *) |
| void | keyReleased (SUIT_ViewWindow *, QKeyEvent *) |
| void | contextMenuRequested (QContextMenuEvent *e) |
Public Member Functions | |
| GLViewer_ViewFrame (SUIT_Desktop *, GLViewer_Viewer *) | |
| ~GLViewer_ViewFrame () | |
| void | setViewer (GLViewer_Viewer *) |
| GLViewer_Viewer * | getViewer () const |
| void | setViewPort (GLViewer_ViewPort *) |
| GLViewer_ViewPort * | getViewPort () const |
| void | setBackgroundColor (const QColor &) |
| QColor | backgroundColor () const |
| QSize | sizeHint () const |
| virtual void | onUpdate (int) |
| virtual QString | getVisualParameters () |
| virtual void | setVisualParameters (const QString ¶meters) |
| virtual QImage | dumpView () |
| QWidget * | getViewWidget () |
| virtual void | setViewManager (SUIT_ViewManager *) |
| SUIT_ViewManager * | getViewManager () const |
| bool | event (QEvent *) |
| bool | dumpViewToFormat (const QString &fileName, const QString &format) |
| bool | onAccelAction (int) |
| bool | closable () const |
| bool | setClosable (const bool) |
| void | setDestructiveClose (const bool) |
| int | getId () const |
| QtxActionToolMgr * | toolMgr () const |
| virtual void | setDropDownButtons (bool) |
Set buttons mode to drop-down (on = true) or ligned (on = false) | |
| bool | dropDownButtons () const |
| Get current buttons mode. | |
Protected Slots | |
| void | onViewPan () |
| void | onViewZoom () |
| void | onViewFitAll () |
| void | onViewFitArea () |
| void | onViewFitSelect () |
| void | onViewGlobalPan () |
| void | onViewRotate () |
| void | onViewReset () |
| void | onViewFront () |
| void | onViewBack () |
| void | onViewRight () |
| void | onViewLeft () |
| void | onViewBottom () |
| void | onViewTop () |
| void | onViewTrihedron () |
Protected Member Functions | |
| virtual bool | dumpViewToFormat (const QImage &, const QString &fileName, const QString &format) |
| void | closeEvent (QCloseEvent *) |
| virtual void | contextMenuEvent (QContextMenuEvent *) |
| virtual QString | filter () const |
| virtual bool | action (const int) |
Protected Attributes | |
| GLViewer_Viewer * | myViewer |
| GLViewer_ViewPort * | myVP |
| SUIT_Desktop * | myDesktop |
| SUIT_ViewManager * | myManager |
Private Slots | |
| void | keyEvent (QKeyEvent *) |
| void | mouseEvent (QMouseEvent *) |
| void | wheelEvent (QWheelEvent *) |
Private Member Functions | |
| void | createActions () |
| void | createToolBar () |
Frame window for viewport in QAD-based application
| GLViewer_ViewFrame::GLViewer_ViewFrame | ( | SUIT_Desktop * | d, |
| GLViewer_Viewer * | vw | ||
| ) |
Constructor
References createActions(), createToolBar(), setBackgroundColor(), and setViewPort().
| GLViewer_ViewFrame::~GLViewer_ViewFrame | ( | ) |
Destructor
| void GLViewer_ViewFrame::setViewer | ( | GLViewer_Viewer * | v | ) |
Sets the viewer for this view. [ public ]
References myViewer.
| GLViewer_Viewer * GLViewer_ViewFrame::getViewer | ( | ) | const |
Returns the viewer of this view. [ public ]
References myViewer.
| void GLViewer_ViewFrame::setViewPort | ( | GLViewer_ViewPort * | vp | ) |
Sets the viewport for this frame
References SUIT_ViewWindow.contextMenuRequested(), keyEvent(), mouseEvent(), myVP, vfDrawExternal(), and wheelEvent().
| GLViewer_ViewPort * GLViewer_ViewFrame::getViewPort | ( | ) | const |
Returns the viewport of this frame. [ public ]
References myVP.
| void GLViewer_ViewFrame::setBackgroundColor | ( | const QColor & | color | ) |
Set background of the viewport. [ public ]
References myVP, and GLViewer_ViewPort.setBackgroundColor().
| QColor GLViewer_ViewFrame::backgroundColor | ( | ) | const |
Returns background of the viewport. [ public ]
References GLViewer_ViewPort.backgroundColor(), and myVP.
| QSize GLViewer_ViewFrame::sizeHint | ( | ) | const |
Returns the preferred view size. [ virtual public ]
| void GLViewer_ViewFrame::onUpdate | ( | int | ) | [virtual] |
Called by viewer's 'update()' method. Does nothing by default [ virtual public ]
| QString GLViewer_ViewFrame::getVisualParameters | ( | ) | [virtual] |
Reimplemented from SUIT_ViewWindow.
References GLViewer_ViewPort2d.getPan(), GLViewer_ViewPort2d.getScale(), and myVP.
| void GLViewer_ViewFrame::setVisualParameters | ( | const QString & | parameters | ) | [virtual] |
The method restores visual parameters of this view from a formated string
Reimplemented from SUIT_ViewWindow.
References GLViewer_ViewPort2d.getGLWidget(), myVP, GLViewer_Widget.setPan(), and GLViewer_Widget.setScale().
| QImage GLViewer_ViewFrame::dumpView | ( | ) | [virtual] |
SLOT: called on dump view operation is activated, stores scene to raster file
Reimplemented from SUIT_ViewWindow.
References myVP.
| void GLViewer_ViewFrame.vfDrawExternal | ( | QPainter * | ) | [signal] |
| void GLViewer_ViewFrame.vfViewClosing | ( | QCloseEvent * | ) | [signal] |
| QWidget* GLViewer_ViewFrame.getViewWidget | ( | ) |
| void GLViewer_ViewFrame::onViewPan | ( | ) | [protected, slot] |
Start panning
References GLViewer_Viewer.activateTransform(), myViewer, and GLViewer_Viewer.Pan.
| void GLViewer_ViewFrame::onViewZoom | ( | ) | [protected, slot] |
Start zooming
References GLViewer_Viewer.activateTransform(), myViewer, and GLViewer_Viewer.Zoom.
| void GLViewer_ViewFrame::onViewFitAll | ( | ) | [protected, slot] |
Start fit all
References GLViewer_Viewer.activateTransform(), GLViewer_Viewer.FitAll, and myViewer.
| void GLViewer_ViewFrame::onViewFitArea | ( | ) | [protected, slot] |
Start fit area
References GLViewer_Viewer.activateTransform(), GLViewer_Viewer.FitRect, and myViewer.
| void GLViewer_ViewFrame::onViewFitSelect | ( | ) | [protected, slot] |
Start fit selected
References GLViewer_Viewer.activateTransform(), GLViewer_Viewer.FitSelect, and myViewer.
| void GLViewer_ViewFrame::onViewGlobalPan | ( | ) | [protected, slot] |
Start global panning
References GLViewer_Viewer.activateTransform(), myViewer, and GLViewer_Viewer.PanGlobal.
| void GLViewer_ViewFrame::onViewRotate | ( | ) | [protected, slot] |
Start rotating
| void GLViewer_ViewFrame::onViewReset | ( | ) | [protected, slot] |
Start reset default view aspects
References GLViewer_Viewer.activateTransform(), myViewer, and GLViewer_Viewer.Reset.
| void GLViewer_ViewFrame.onViewFront | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewBack | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewRight | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewLeft | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewBottom | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewTop | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame.onViewTrihedron | ( | ) | [protected, slot] |
| void GLViewer_ViewFrame::keyEvent | ( | QKeyEvent * | e | ) | [private, slot] |
Dispatches key events
References SUIT_ViewWindow.keyPressed(), and SUIT_ViewWindow.keyReleased().
| void GLViewer_ViewFrame::mouseEvent | ( | QMouseEvent * | e | ) | [private, slot] |
Dispatches mouse events
References SUIT_ViewWindow.mouseDoubleClicked(), SUIT_ViewWindow.mouseMoving(), SUIT_ViewWindow.mousePressed(), and SUIT_ViewWindow.mouseReleased().
| void GLViewer_ViewFrame::wheelEvent | ( | QWheelEvent * | e | ) | [private, slot] |
Dispatches wheel events
References SUIT_ViewWindow.wheeling().
| void GLViewer_ViewFrame::createActions | ( | ) | [private] |
Creates actions of GL view frame
References DumpId, FitAllId, FitRectId, FitSelectId, GlobalPanId, QtxResourceMgr.loadPixmap(), SUIT_ViewWindow.onDumpView(), onViewFitAll(), onViewFitArea(), onViewFitSelect(), onViewGlobalPan(), onViewPan(), onViewReset(), onViewZoom(), PanId, QtxActionMgr.registerAction(), ResetId, SUIT_Session.resourceMgr(), SUIT_Session.session(), SUIT_ViewWindow.toolMgr(), and ZoomId.
| void GLViewer_ViewFrame::createToolBar | ( | ) | [private] |
Creates toolbar of GL view frame
References SUIT_ViewWindow.action(), QtxActionToolMgr.append(), QtxActionToolMgr.createToolBar(), DumpId, FitAllId, FitRectId, FitSelectId, GlobalPanId, QtxActionSet.insertAction(), PanId, ResetId, SUIT_ViewWindow.toolMgr(), and ZoomId.
| void SUIT_ViewWindow::setViewManager | ( | SUIT_ViewManager * | theManager | ) | [virtual, inherited] |
Sets new view manager for window
| theManager | - new view manager |
Reimplemented in OCCViewer_ViewFrame.
References SUIT_ViewWindow.myManager.
| SUIT_ViewManager * SUIT_ViewWindow::getViewManager | ( | ) | const [inherited] |
References SUIT_ViewWindow.myManager.
| bool SUIT_ViewWindow::event | ( | QEvent * | e | ) | [inherited] |
Reaction view window on event e.
References SUIT_Study.application(), SUIT_MessageBox.critical(), DUMP_EVENT, SUIT_ViewWindow.dumpView(), SUIT_ViewWindow.dumpViewToFormat(), Qtx.extension(), SUIT_ViewWindow.filter(), SUIT_Application.getFileName(), SUIT_ViewWindow.myManager, and SUIT_ViewManager.study().
| bool SUIT_ViewWindow::dumpViewToFormat | ( | const QString & | fileName, |
| const QString & | format | ||
| ) | [inherited] |
Saves scene rendering in window to file
| fileName | - name of file |
| format | - string contains name of format (for example, "BMP"(default) or "JPEG", "JPG") |
References SUIT_ViewWindow.dumpView().
| bool SUIT_ViewWindow::dumpViewToFormat | ( | const QImage & | img, |
| const QString & | fileName, | ||
| const QString & | format | ||
| ) | [protected, virtual, inherited] |
Saves image to file according to the format
| image | - image |
| fileName | - name of file |
| format | - string contains name of format (for example, "BMP"(default) or "JPEG", "JPG") |
Reimplemented in OCCViewer_ViewFrame, OCCViewer_ViewWindow, Plot2d_ViewWindow, and SVTK_ViewWindow.
| bool SUIT_ViewWindow::onAccelAction | ( | int | _action | ) | [inherited] |
Called by SUIT_Accel.onActivated() when a key accelerator was activated and this window was active
References SUIT_ViewWindow.action().
| bool SUIT_ViewWindow::closable | ( | ) | const [inherited] |
Returns true if view window can be closed by the user
| bool SUIT_ViewWindow::setClosable | ( | const bool | on | ) | [inherited] |
Set / reset "closable" option of the view window
References SUIT_ViewWindow.closable().
| void SUIT_ViewWindow::setDestructiveClose | ( | const bool | on | ) | [inherited] |
Set or clear flag Qt.WDestructiveClose
| int SUIT_ViewWindow::getId | ( | ) | const [inherited] |
| QtxActionToolMgr * SUIT_ViewWindow::toolMgr | ( | ) | const [inherited] |
References SUIT_ViewWindow.myToolMgr.
| void SUIT_ViewWindow::setDropDownButtons | ( | bool | on | ) | [virtual, inherited] |
| on | new buttons mode |
Reimplemented in OCCViewer_ViewFrame.
References test_table.a, QtxActionMgr.action(), QtxActionSet.actions(), QtxActionMgr.idList(), QtxActionToolMgr.index(), QtxActionToolMgr.insert(), SUIT_ViewWindow.myIsDropDown, SUIT_ViewWindow.myMultiActions, QtxActionToolMgr.remove(), QtxActionToolMgr.toolBarsIds(), and SUIT_ViewWindow.toolMgr().
| bool SUIT_ViewWindow::dropDownButtons | ( | ) | const [inherited] |
| void SUIT_ViewWindow::onDumpView | ( | ) | [virtual, slot, inherited] |
Post events on dump view.
Reimplemented in OCCViewer_ViewFrame, and Plot2d_ViewWindow.
References DUMP_EVENT.
| void SUIT_ViewWindow.tryClosing | ( | SUIT_ViewWindow * | ) | [signal, inherited] |
| void SUIT_ViewWindow.closing | ( | SUIT_ViewWindow * | ) | [signal, inherited] |
| void SUIT_ViewWindow.mousePressed | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseReleased | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseDoubleClicked | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseMoving | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.wheeling | ( | SUIT_ViewWindow * | , |
| QWheelEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.keyPressed | ( | SUIT_ViewWindow * | , |
| QKeyEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.keyReleased | ( | SUIT_ViewWindow * | , |
| QKeyEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.contextMenuRequested | ( | QContextMenuEvent * | e | ) | [signal, inherited] |
| void SUIT_ViewWindow::closeEvent | ( | QCloseEvent * | e | ) | [protected, inherited] |
Close event theEvent.
References SUIT_ViewWindow.closable(), SUIT_ViewWindow.closing(), and SUIT_ViewWindow.tryClosing().
| void SUIT_ViewWindow::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual, inherited] |
Context menu requested for event e.
References SUIT_ViewWindow.contextMenuRequested().
| QString SUIT_ViewWindow::filter | ( | ) | const [protected, virtual, inherited] |
Reimplemented in OCCViewer_ViewWindow, Plot2d_ViewWindow, and SVTK_ViewWindow.
| bool SUIT_ViewWindow::action | ( | const int | ) | [protected, virtual, inherited] |
action handle standard action (zoom, pan) or custom action. to be redefined in successors.
Reimplemented in SOCC_ViewWindow, SPlot2d_ViewWindow, and SVTK_ViewWindow.
GLViewer_Viewer* GLViewer_ViewFrame.myViewer [protected] |
GLViewer_ViewPort* GLViewer_ViewFrame.myVP [protected] |
SUIT_Desktop* SUIT_ViewWindow.myDesktop [protected, inherited] |
SUIT_ViewManager* SUIT_ViewWindow.myManager [protected, inherited] |