Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_ViewWindow Class Reference

#include <SUIT_ViewWindow.h>

Inheritance diagram for SUIT_ViewWindow:
Inheritance graph

Public Slots

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)
 
void viewModified (SUIT_ViewWindow *)
 

Public Member Functions

 SUIT_ViewWindow (SUIT_Desktop *)
 
virtual ~SUIT_ViewWindow ()
 
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) More...
 
bool dropDownButtons () const
 Get current buttons mode. More...
 
virtual SUIT_CameraProperties cameraProperties ()
 

Protected Slots

void updateSyncViews ()
 
void onSynchronizeView (bool)
 
virtual void synchronize (SUIT_ViewWindow *)
 
void emitViewModified ()
 

Protected Member Functions

void closeEvent (QCloseEvent *)
 
virtual void contextMenuEvent (QContextMenuEvent *)
 
virtual QString filter () const
 
virtual bool action (const int)
 
virtual bool dumpViewToFormat (const QImage &, const QString &fileName, const QString &format)
 
virtual QActionsynchronizeAction ()
 

Static Protected Member Functions

static void synchronizeView (SUIT_ViewWindow *viewWindow, int id)
 

Protected Attributes

SUIT_DesktopmyDesktop
 
SUIT_ViewManagermyManager
 

Private Types

typedef QMap< int, QList
< QtxMultiAction * > > 
ActionsMap
 

Private Attributes

QtxActionToolMgrmyToolMgr
 
bool myIsDropDown
 
ActionsMap myMultiActions
 
QActionmySyncAction
 

Detailed Description

Class provide view window.

Member Typedef Documentation

typedef QMap< int, QList<QtxMultiAction*> > SUIT_ViewWindow::ActionsMap
private

Constructor & Destructor Documentation

SUIT_ViewWindow::SUIT_ViewWindow ( SUIT_Desktop theDesktop)

Constructor.

References myDesktop, and myToolMgr.

SUIT_ViewWindow::~SUIT_ViewWindow ( )
virtual

Destructor.

Member Function Documentation

bool SUIT_ViewWindow::action ( const int  )
protectedvirtual

action handle standard action (zoom, pan) or custom action. to be redefined in successors.

Reimplemented in SVTK_ViewWindow, SOCC_ViewWindow, and SPlot2d_ViewWindow.

SUIT_CameraProperties SUIT_ViewWindow::cameraProperties ( )
virtual

Get camera properties for the view window.

Returns
shared pointer on camera properties. Base implementation returns null properties.

Reimplemented in SVTK_ViewWindow, OCCViewer_ViewWindow, and OCCViewer_ViewFrame.

bool SUIT_ViewWindow::closable ( ) const

Returns true if view window can be closed by the user

void SUIT_ViewWindow::closeEvent ( QCloseEvent *  e)
protected

Close event theEvent.

References closable(), closing(), and tryClosing().

void SUIT_ViewWindow::closing ( SUIT_ViewWindow )
signal
void SUIT_ViewWindow::contextMenuEvent ( QContextMenuEvent *  e)
protectedvirtual

Context menu requested for event e.

References contextMenuRequested().

void SUIT_ViewWindow::contextMenuRequested ( QContextMenuEvent *  e)
signal
bool SUIT_ViewWindow::dropDownButtons ( ) const
Returns
current buttons mode
See Also
setDropDownButtons()

References myIsDropDown.

QImage SUIT_ViewWindow::dumpView ( )
virtual
Returns
QImage, containing all scene rendering in window

Reimplemented in OCCViewer_ViewWindow, OCCViewer_ViewFrame, Plot2d_ViewWindow, VTKViewer_ViewWindow, SVTK_ViewWindow, GLViewer_ViewFrame, and GraphicsView_ViewFrame.

bool SUIT_ViewWindow::dumpViewToFormat ( const QString &  fileName,
const QString &  format 
)

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 dumpView().

bool SUIT_ViewWindow::dumpViewToFormat ( const QImage &  img,
const QString &  fileName,
const QString &  format 
)
protectedvirtual

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 SVTK_ViewWindow, OCCViewer_ViewWindow, OCCViewer_ViewFrame, and Plot2d_ViewWindow.

void SUIT_ViewWindow::emitViewModified ( )
protectedslot

Emit notification signal that the view is transformed. Other views can use the signal for synchronization.

References viewModified().

QString SUIT_ViewWindow::filter ( ) const
protectedvirtual
Returns
filters for image files

Reimplemented in SVTK_ViewWindow, OCCViewer_ViewWindow, and Plot2d_ViewWindow.

int SUIT_ViewWindow::getId ( ) const
Returns
window unique identifier
SUIT_ViewManager * SUIT_ViewWindow::getViewManager ( ) const
Returns
view manager of window

References myManager.

QString SUIT_ViewWindow::getVisualParameters ( )
virtual
void SUIT_ViewWindow::keyPressed ( SUIT_ViewWindow ,
QKeyEvent *   
)
signal
void SUIT_ViewWindow::keyReleased ( SUIT_ViewWindow ,
QKeyEvent *   
)
signal
void SUIT_ViewWindow::mouseDoubleClicked ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewWindow::mouseMoving ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewWindow::mousePressed ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
void SUIT_ViewWindow::mouseReleased ( SUIT_ViewWindow ,
QMouseEvent *   
)
signal
bool SUIT_ViewWindow::onAccelAction ( int  _action)

Called by SUIT_Accel::onActivated() when a key accelerator was activated and this window was active

References action().

void SUIT_ViewWindow::onDumpView ( )
virtualslot

Post events on dump view.

References DUMP_EVENT.

void SUIT_ViewWindow::onSynchronizeView ( bool  checked)
protectedslot

"Synchronize View" action slot.

References synchronizeView().

bool SUIT_ViewWindow::setClosable ( const bool  on)

Set / reset "closable" option of the view window

References closable().

void SUIT_ViewWindow::setDestructiveClose ( const bool  on)

Set or clear flag Qt::WDestructiveClose

void SUIT_ViewWindow::setViewManager ( SUIT_ViewManager theManager)
virtual

Sets new view manager for window

Parameters
theManager- new view manager

Reimplemented in OCCViewer_ViewFrame.

References myManager.

void SUIT_ViewWindow::setVisualParameters ( const QString &  parameters)
virtual

Sets visual parameters of window by its string representation

Parameters
parameters- string with visual parameters

Reimplemented in SVTK_ViewWindow, OCCViewer_ViewWindow, Plot2d_ViewWindow, VTKViewer_ViewWindow, GLViewer_ViewFrame, OCCViewer_ViewFrame, GraphicsView_ViewFrame, and PVViewer_ViewWindow.

void SUIT_ViewWindow::synchronize ( SUIT_ViewWindow )
protectedvirtualslot

Synchronize this view window's camera properties with specified view window.

This method is a part of general views synchronization mechanism. It should be redefined in successors. Base imlementation does nothing.

Parameters
otherWindowother view window
QAction * SUIT_ViewWindow::synchronizeAction ( )
protectedvirtual

Get action for views syncronization.

This method is a part of general views synchronization mechanism. It creates an action that can be inserted, for instance, to the toolbar.

Returns
action for views synchronization

References QtxResourceMgr::loadPixmap(), mySyncAction, onSynchronizeView(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and updateSyncViews().

void SUIT_ViewWindow::synchronizeView ( SUIT_ViewWindow viewWindow,
int  id 
)
staticprotected

Synchronize camera properties of view viewWindow with camera properties of view specified via id

References SUIT_Session::activeApplication(), app, cameraProperties(), SUIT_Application::desktop(), getId(), SUIT_CameraProperties::isValid(), SUIT_Session::session(), synchronize(), synchronizeAction(), and viewModified().

QtxActionToolMgr * SUIT_ViewWindow::toolMgr ( ) const
Returns
associated tool bar manager

References myToolMgr.

void SUIT_ViewWindow::tryClosing ( SUIT_ViewWindow )
signal
void SUIT_ViewWindow::viewModified ( SUIT_ViewWindow )
signal
void SUIT_ViewWindow::wheeling ( SUIT_ViewWindow ,
QWheelEvent *   
)
signal

Member Data Documentation

SUIT_Desktop* SUIT_ViewWindow::myDesktop
protected
bool SUIT_ViewWindow::myIsDropDown
private
SUIT_ViewManager* SUIT_ViewWindow::myManager
protected
ActionsMap SUIT_ViewWindow::myMultiActions
private
QAction* SUIT_ViewWindow::mySyncAction
private
QtxActionToolMgr* SUIT_ViewWindow::myToolMgr
private

The documentation for this class was generated from the following files: