Version: 6.3.1
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes

SUPERVGraph_ViewFrame Class Reference

#include <SUPERVGraph_ViewFrame.h>

Inheritance diagram for SUPERVGraph_ViewFrame:
Inheritance graph

Public Slots

void onViewPan ()
void onViewZoom ()
void onViewFitAll ()
void onViewFitArea ()
void onViewGlobalPan ()
void onViewRotate ()
void onViewReset ()
void onViewFront ()
void onViewBack ()
void onViewRight ()
void onViewLeft ()
void onViewBottom ()
void onViewTop ()
void onViewTrihedron ()
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

 SUPERVGraph_ViewFrame (SUIT_Desktop *theDesktop)
 ~SUPERVGraph_ViewFrame ()
SUPERVGraph_ViewgetViewWidget ()
void setViewWidget (SUPERVGraph_View *theView)
void setBackgroundColor (const QColor &)
QColor backgroundColor () const
void onAdjustTrihedron ()
void highlight (const Handle(SALOME_InteractiveObject)&IObject, bool highlight, bool immediatly=true)
void unHighlightAll ()
void rename (const Handle(SALOME_InteractiveObject)&IObject, QString newName)
bool isInViewer (const Handle(SALOME_InteractiveObject)&IObject)
bool isVisible (const Handle(SALOME_InteractiveObject)&IObject)
 Handle (SALOME_InteractiveObject) FindIObject(const char *Entry)
void Display (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
void DisplayOnly (const Handle(SALOME_InteractiveObject)&IObject)
void Erase (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
void DisplayAll ()
void EraseAll ()
void Repaint ()
QToolBargetToolBar ()
virtual void setViewManager (SUIT_ViewManager *)
SUIT_ViewManagergetViewManager () 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 &parameters)
void setDestructiveClose (const bool)
int getId () const
QtxActionToolMgrtoolMgr () 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 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_DesktopmyDesktop
SUIT_ViewManagermyManager

Private Types

enum  { PanId, ResetId }
 

Actions ID.

More...
typedef QMap< int, QtxAction * > ActionsMap

Private Member Functions

void createActions ()
void createToolBar ()

Private Attributes

ActionsMap myActionsMap
QToolBarmyToolBar
SUPERVGraph_ViewmyView

Member Typedef Documentation

typedef QMap<int, QtxAction*> SUPERVGraph_ViewFrame.ActionsMap [private]

Reimplemented from SUIT_ViewWindow.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
PanId 
ResetId 

Constructor & Destructor Documentation

SUPERVGraph_ViewFrame::SUPERVGraph_ViewFrame ( SUIT_Desktop theDesktop)

Constructor

References createActions(), createToolBar(), myToolBar, and myView.

SUPERVGraph_ViewFrame::~SUPERVGraph_ViewFrame ( )

Destructor


Member Function Documentation

SUPERVGraph_View * SUPERVGraph_ViewFrame::getViewWidget ( )

Returns widget containing 3D-Viewer

References myView.

void SUPERVGraph_ViewFrame::setViewWidget ( SUPERVGraph_View theView)

Sets new view widget

Parameters:
theView- new view widget

References myView.

void SUPERVGraph_ViewFrame::setBackgroundColor ( const QColor &  color)

Set background of the viewport

References myView.

QColor SUPERVGraph_ViewFrame::backgroundColor ( ) const

Returns background of the viewport

References myView.

void SUPERVGraph_ViewFrame::onAdjustTrihedron ( )
void SUPERVGraph_ViewFrame::highlight ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  highlight,
bool  immediatly = true 
)

Hilights/unhilights object in viewer

Parameters:
obj- object to be updated
hilight- if it is true, object will be hilighted, otherwise it will be unhilighted
update- update current viewer
void SUPERVGraph_ViewFrame::unHighlightAll ( )

Unhilights all object in viewer

Parameters:
updateviewer- update current viewer
void SUPERVGraph_ViewFrame::rename ( const Handle(SALOME_InteractiveObject)&  IObject,
QString  newName 
)

Changes name of object

Parameters:
obj- object to be renamed
name- new name
bool SUPERVGraph_ViewFrame::isInViewer ( const Handle(SALOME_InteractiveObject)&  IObject)
Returns:
true if object is in viewer or in collector
Parameters:
obj- object to be checked
onlyInViewer- search object only in viewer (so object must be displayed)
bool SUPERVGraph_ViewFrame::isVisible ( const Handle(SALOME_InteractiveObject)&  IObject)
Returns:
true if object is displayed in viewer
Parameters:
obj- object to be checked
SUPERVGraph_ViewFrame.Handle ( SALOME_InteractiveObject  ) const

References Handle().

void SUPERVGraph_ViewFrame.Display ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  immediatly = true 
)
void SUPERVGraph_ViewFrame.DisplayOnly ( const Handle(SALOME_InteractiveObject)&  IObject)
void SUPERVGraph_ViewFrame.Erase ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  immediatly = true 
)
void SUPERVGraph_ViewFrame.DisplayAll ( )
void SUPERVGraph_ViewFrame.EraseAll ( )
void SUPERVGraph_ViewFrame.Repaint ( )
QToolBar* SUPERVGraph_ViewFrame.getToolBar ( )
void SUPERVGraph_ViewFrame::onViewPan ( ) [slot]

Moves the active view

References SUPERVGraph_View.ActivatePanning(), and myView.

void SUPERVGraph_ViewFrame::onViewZoom ( ) [slot]

Zooms the active view

void SUPERVGraph_ViewFrame::onViewFitAll ( ) [slot]

Fits all objects in the active view

void SUPERVGraph_ViewFrame::onViewFitArea ( ) [slot]

Fits all obejcts within a rectangular area of the active view

void SUPERVGraph_ViewFrame::onViewGlobalPan ( ) [slot]

Sets a new center of the active view

void SUPERVGraph_ViewFrame::onViewRotate ( ) [slot]

Rotates the active view

void SUPERVGraph_ViewFrame::onViewReset ( ) [slot]

Reset the active view

References myView, and SUPERVGraph_View.ResetView().

void SUPERVGraph_ViewFrame::onViewFront ( ) [slot]

Provides front projection of the active view

void SUPERVGraph_ViewFrame::onViewBack ( ) [slot]

Provides back projection of the active view

void SUPERVGraph_ViewFrame::onViewRight ( ) [slot]

Provides right projection of the active view

void SUPERVGraph_ViewFrame::onViewLeft ( ) [slot]

Provides left projection of the active view

void SUPERVGraph_ViewFrame::onViewBottom ( ) [slot]

Provides bottom projection of the active view

void SUPERVGraph_ViewFrame::onViewTop ( ) [slot]

Provides top projection of the active view

void SUPERVGraph_ViewFrame::onViewTrihedron ( ) [slot]

Display/hide Trihedron

void SUPERVGraph_ViewFrame::resizeEvent ( QResizeEvent *  theEvent) [protected]

Custom resize event handler

References myView, and SUPERVGraph_View.resizeView().

void SUPERVGraph_ViewFrame::createActions ( ) [private]
void SUPERVGraph_ViewFrame::createToolBar ( ) [private]

Creates toolbar of SUPERVGraph view window

References myActionsMap, myToolBar, PanId, and ResetId.

void SUIT_ViewWindow::setViewManager ( SUIT_ViewManager theManager) [virtual, inherited]

Sets new view manager for window

Parameters:
theManager- new view manager

Reimplemented in OCCViewer_ViewFrame.

References SUIT_ViewWindow.myManager.

SUIT_ViewManager * SUIT_ViewWindow::getViewManager ( ) const [inherited]
Returns:
view manager of window

References SUIT_ViewWindow.myManager.

bool SUIT_ViewWindow::event ( QEvent e) [inherited]
QImage SUIT_ViewWindow::dumpView ( ) [virtual, inherited]
Returns:
QImage, containing all scene rendering in window

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

Parameters:
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

Parameters:
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]
Returns:
string containing visual parameters of window

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:
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]
Returns:
window unique identifier
QtxActionToolMgr * SUIT_ViewWindow::toolMgr ( ) const [inherited]
Returns:
associated tool bar manager

References SUIT_ViewWindow.myToolMgr.

void SUIT_ViewWindow::setDropDownButtons ( bool  on) [virtual, inherited]
bool SUIT_ViewWindow::dropDownButtons ( ) const [inherited]
Returns:
current buttons mode
See also:
setDropDownButtons()

References SUIT_ViewWindow.myIsDropDown.

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]
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]
Returns:
filters for image files

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.


Field Documentation

SUIT_Desktop* SUIT_ViewWindow.myDesktop [protected, inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS