#include <QxGraph_ViewWindow.h>

Public Slots | |
| void | onViewFitAll () |
| void | onViewFitArea () |
| void | onViewZoom () |
| void | onViewPan () |
| void | onViewGlobalPan () |
| void | onViewReset () |
| virtual void | onDumpView () |
Signals | |
| 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 | |
| QxGraph_ViewWindow (SUIT_Desktop *theDesktop, QxGraph_Viewer *theModel) | |
| virtual | ~QxGraph_ViewWindow () |
| void | setBackgroundColor (const QColor &) |
| QColor | backgroundColor () const |
| QToolBar * | getToolBar () |
| SUIT_ResourceMgr * | resMgr () const |
| QxGraph_Viewer * | getViewModel () const |
| void | setViewModel (QxGraph_Viewer *theViewModel) |
| virtual void | initLayout () |
| void | contextPopupEvent (QContextMenuEvent *theEvent) |
| virtual void | setViewManager (SUIT_ViewManager *) |
| SUIT_ViewManager * | getViewManager () const |
| bool | event (QEvent *) |
| virtual QImage | dumpView () |
| bool | dumpViewToFormat (const QString &fileName, const QString &format) |
| bool | onAccelAction (int) |
| bool | closable () const |
| bool | setClosable (const bool) |
| virtual QString | getVisualParameters () |
| virtual void | setVisualParameters (const QString ¶meters) |
| 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 Member Functions | |
| void | resizeEvent (QResizeEvent *theEvent) |
| virtual void | initCanvas () |
| virtual void | initCanvasViews () |
| 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 | |
| SUIT_Desktop * | myDesktop |
| SUIT_ViewManager * | myManager |
Private Types | |
| enum | { FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, ResetId } |
Actions ID. More... | |
| typedef QMap< int, QtxAction * > | ActionsMap |
Private Member Functions | |
| void | createActions () |
| void | createToolBar () |
Private Attributes | |
| ActionsMap | myActionsMap |
| QToolBar * | myToolBar |
| QxGraph_Viewer * | myViewModel |
typedef QMap<int, QtxAction*> QxGraph_ViewWindow.ActionsMap [private] |
Reimplemented from SUIT_ViewWindow.
| QxGraph_ViewWindow::QxGraph_ViewWindow | ( | SUIT_Desktop * | theDesktop, |
| QxGraph_Viewer * | theModel | ||
| ) |
Constructor
References myViewModel.
| QxGraph_ViewWindow::~QxGraph_ViewWindow | ( | ) | [virtual] |
Destructor
| void QxGraph_ViewWindow::setBackgroundColor | ( | const QColor & | color | ) |
Set background of the viewport
References QxGraph_Viewer.getCurrentView(), and myViewModel.
| QColor QxGraph_ViewWindow::backgroundColor | ( | ) | const |
Returns background of the viewport
References QxGraph_Viewer.getCurrentView(), and myViewModel.
| QToolBar* QxGraph_ViewWindow.getToolBar | ( | ) |
| SUIT_ResourceMgr * QxGraph_ViewWindow::resMgr | ( | ) | const |
Get resource manager
References SUIT_Session.resourceMgr(), and SUIT_Session.session().
| QxGraph_Viewer* QxGraph_ViewWindow.getViewModel | ( | ) | const |
| void QxGraph_ViewWindow.setViewModel | ( | QxGraph_Viewer * | theViewModel | ) |
| void QxGraph_ViewWindow::initLayout | ( | ) | [virtual] |
Initialization
References createActions(), createToolBar(), initCanvas(), initCanvasViews(), and myToolBar.
| void QxGraph_ViewWindow.contextPopupEvent | ( | QContextMenuEvent * | theEvent | ) |
References SUIT_ViewWindow.contextMenuRequested().
| void QxGraph_ViewWindow::onViewFitAll | ( | ) | [slot] |
Fits all objects in the active view
References QxGraph_CanvasView.activateFitAll(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::onViewFitArea | ( | ) | [slot] |
Fits all obejcts within a rectangular area of the active view
References QxGraph_CanvasView.activateFitRect(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::onViewZoom | ( | ) | [slot] |
Zooms the active view
References QxGraph_CanvasView.activateZoom(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::onViewPan | ( | ) | [slot] |
Moves the active view
References QxGraph_CanvasView.activatePanning(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::onViewGlobalPan | ( | ) | [slot] |
Sets a new center of the active view
References QxGraph_CanvasView.activateGlobalPanning(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::onViewReset | ( | ) | [slot] |
Reset the active view
References QxGraph_CanvasView.activateReset(), QxGraph_Viewer.getCurrentView(), and myViewModel.
| void QxGraph_ViewWindow::resizeEvent | ( | QResizeEvent * | theEvent | ) | [protected] |
Custom resize event handler
| void QxGraph_ViewWindow::initCanvas | ( | ) | [protected, virtual] |
Canvas initialization
References myViewModel, resMgr(), and QxGraph_Viewer.setCanvas().
| void QxGraph_ViewWindow::initCanvasViews | ( | ) | [protected, virtual] |
Canvas views initialization
References QxGraph_Viewer.addView(), QxGraph_Viewer.getCanvas(), QxGraph_Viewer.getCanvasViews(), QxGraph_Viewer.getCurrentView(), myViewModel, and QxGraph_Viewer.setCurrentView().
| void QxGraph_ViewWindow::createActions | ( | ) | [private] |
Creates actions of QxGraph view window
References FitAllId, FitRectId, GlobalPanId, QtxResourceMgr.loadPixmap(), myActionsMap, onViewFitAll(), onViewFitArea(), onViewGlobalPan(), onViewPan(), onViewReset(), onViewZoom(), PanId, ResetId, resMgr(), and ZoomId.
| void QxGraph_ViewWindow::createToolBar | ( | ) | [private] |
Creates toolbar of QxGraph view window
References FitAllId, FitRectId, GlobalPanId, myActionsMap, myToolBar, PanId, ResetId, 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().
| QImage SUIT_ViewWindow::dumpView | ( | ) | [virtual, inherited] |
Reimplemented in GLViewer_ViewFrame, OCCViewer_ViewFrame, OCCViewer_ViewWindow, Plot2d_ViewWindow, SVTK_ViewWindow, and VTKViewer_ViewWindow.
| 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().
| QString SUIT_ViewWindow::getVisualParameters | ( | ) | [virtual, inherited] |
Reimplemented in GLViewer_ViewFrame, OCCViewer_ViewFrame, OCCViewer_ViewWindow, Plot2d_ViewWindow, SVTK_ViewWindow, and VTKViewer_ViewWindow.
| void SUIT_ViewWindow::setVisualParameters | ( | const QString & | parameters | ) | [virtual, inherited] |
Sets visual parameters of window by its string representation
| parameters | - string with visual parameters |
Reimplemented in GLViewer_ViewFrame, OCCViewer_ViewFrame, OCCViewer_ViewWindow, Plot2d_ViewWindow, SVTK_ViewWindow, and VTKViewer_ViewWindow.
| 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.
ActionsMap QxGraph_ViewWindow.myActionsMap [private] |
QToolBar* QxGraph_ViewWindow.myToolBar [private] |
QxGraph_Viewer* QxGraph_ViewWindow.myViewModel [private] |
SUIT_Desktop* SUIT_ViewWindow.myDesktop [protected, inherited] |
SUIT_ViewManager* SUIT_ViewWindow.myManager [protected, inherited] |