Version: 9.12.0
QxScene_ViewWindow Class Reference

#include <QxScene_ViewWindow.h>

Inheritance diagram for QxScene_ViewWindow:
Inheritance graph

Public Types

enum  {
  FitAllId , FitRectId , ZoomId , ScaleOpId ,
  PanId , GlobalPanId , MoveOpId , ResetId
}
 Actions ID. More...
 

Public Slots

void onViewFitAll ()
 
void onViewFitArea ()
 
void onViewZoom ()
 
void onViewPan ()
 
void onViewGlobalPan ()
 
void onViewReset ()
 
- Public Slots inherited from SUIT_ViewWindow
virtual void onDumpView ()
 
void setVisible (bool)
 

Signals

void tryClose (bool &isClosed, QxScene_ViewWindow *window)
 
- Signals inherited from SUIT_ViewWindow
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 *)
 
void vpStartRotate (int, int, qint64)
 
void vpRotate (int, int, qint64)
 
void vpEndRotate (int, int, qint64)
 

Public Member Functions

 QxScene_ViewWindow (SUIT_Desktop *theDesktop, QxScene_Viewer *theModel)
 
virtual ~QxScene_ViewWindow ()
 
void setBackgroundColor (const QColor &)
 
QColor backgroundColor () const
 
QToolBargetToolBar ()
 Get view window's toolbar. More...
 
SUIT_ResourceMgrresMgr () const
 
QxScene_ViewergetViewModel () const
 
void setViewModel (QxScene_Viewer *theViewModel)
 
virtual void initLayout ()
 
void contextPopupEvent (QContextMenuEvent *theEvent)
 
void setScene (QGraphicsScene *scene)
 
QGraphicsScenegetScene ()
 
void setSceneView (QGraphicsView *sceneView)
 
QGraphicsViewgetSceneView ()
 
virtual bool closeRequested ()
 
- Public Member Functions inherited from SUIT_ViewWindow
 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 void enableAutoRotation (const bool)
 
virtual bool isAutoRotationEnabled () const
 
virtual SUIT_CameraProperties cameraProperties ()
 

Protected Member Functions

void resizeEvent (QResizeEvent *)
 
- Protected Member Functions inherited from SUIT_ViewWindow
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 ()
 

Protected Attributes

QGraphicsScene_scene
 
QGraphicsView_sceneView
 
- Protected Attributes inherited from SUIT_ViewWindow
SUIT_DesktopmyDesktop
 
SUIT_ViewManagermyManager
 

Private Member Functions

void createActions ()
 
void createToolBar ()
 

Private Attributes

int myToolBar
 
QxScene_ViewermyViewModel
 

Additional Inherited Members

- Protected Slots inherited from SUIT_ViewWindow
void updateSyncViews ()
 
void onSynchronizeView (bool)
 
virtual void synchronize (SUIT_ViewWindow *)
 
void emitViewModified ()
 
- Static Protected Member Functions inherited from SUIT_ViewWindow
static void synchronizeView (SUIT_ViewWindow *viewWindow, int id)
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Actions ID.

Enumerator
FitAllId 
FitRectId 
ZoomId 
ScaleOpId 
PanId 
GlobalPanId 
MoveOpId 
ResetId 

Constructor & Destructor Documentation

◆ QxScene_ViewWindow()

QxScene_ViewWindow::QxScene_ViewWindow ( SUIT_Desktop theDesktop,
QxScene_Viewer theModel 
)

Constructor

References _scene, _sceneView, DEBTRACE, and myViewModel.

◆ ~QxScene_ViewWindow()

QxScene_ViewWindow::~QxScene_ViewWindow ( )
virtual

Destructor

References DEBTRACE.

Member Function Documentation

◆ backgroundColor()

QColor QxScene_ViewWindow::backgroundColor ( ) const

Returns background of the viewport

References DEBTRACE.

◆ closeRequested()

bool QxScene_ViewWindow::closeRequested ( )
virtual

emits a signal to ask to close the schema associated to the window. A boolean in return indicates if it is OK to close.

References DEBTRACE, and tryClose().

◆ contextPopupEvent()

void QxScene_ViewWindow::contextPopupEvent ( QContextMenuEvent *  theEvent)
inline

◆ createActions()

◆ createToolBar()

void QxScene_ViewWindow::createToolBar ( )
private

◆ getScene()

QGraphicsScene* QxScene_ViewWindow::getScene ( )
inline

◆ getSceneView()

QGraphicsView* QxScene_ViewWindow::getSceneView ( )
inline

◆ getToolBar()

QToolBar * QxScene_ViewWindow::getToolBar ( )

Get view window's toolbar.

Returns
toolbar

References DEBTRACE, myToolBar, QtxActionToolMgr::toolBar(), and SUIT_ViewWindow::toolMgr().

◆ getViewModel()

QxScene_Viewer* QxScene_ViewWindow::getViewModel ( ) const
inline

◆ initLayout()

void QxScene_ViewWindow::initLayout ( )
virtual

Initialization

References createActions(), createToolBar(), and DEBTRACE.

◆ onViewFitAll

void QxScene_ViewWindow::onViewFitAll ( )
slot

Fits all objects in the active view

References DEBTRACE.

◆ onViewFitArea

void QxScene_ViewWindow::onViewFitArea ( )
slot

Fits all obejcts within a rectangular area of the active view

References DEBTRACE.

◆ onViewGlobalPan

void QxScene_ViewWindow::onViewGlobalPan ( )
slot

Sets a new center of the active view

References DEBTRACE.

◆ onViewPan

void QxScene_ViewWindow::onViewPan ( )
slot

Moves the active view

References DEBTRACE.

◆ onViewReset

void QxScene_ViewWindow::onViewReset ( )
slot

Reset the active view

References DEBTRACE.

◆ onViewZoom

void QxScene_ViewWindow::onViewZoom ( )
slot

Zooms the active view

References DEBTRACE.

◆ resizeEvent()

void QxScene_ViewWindow::resizeEvent ( QResizeEvent *  )
protected

Custom resize event handler

References DEBTRACE.

◆ resMgr()

SUIT_ResourceMgr * QxScene_ViewWindow::resMgr ( ) const

Get resource manager

References DEBTRACE, SUIT_Session::resourceMgr(), and SUIT_Session::session().

◆ setBackgroundColor()

void QxScene_ViewWindow::setBackgroundColor ( const QColor &  )

Set background of the viewport

References DEBTRACE.

◆ setScene()

void QxScene_ViewWindow::setScene ( QGraphicsScene scene)
inline

◆ setSceneView()

void QxScene_ViewWindow::setSceneView ( QGraphicsView sceneView)
inline

◆ setViewModel()

void QxScene_ViewWindow::setViewModel ( QxScene_Viewer theViewModel)
inline

◆ tryClose

void QxScene_ViewWindow::tryClose ( bool &  isClosed,
QxScene_ViewWindow window 
)
signal

Member Data Documentation

◆ _scene

QGraphicsScene* QxScene_ViewWindow::_scene
protected

◆ _sceneView

QGraphicsView* QxScene_ViewWindow::_sceneView
protected

◆ myToolBar

int QxScene_ViewWindow::myToolBar
private

◆ myViewModel

QxScene_Viewer* QxScene_ViewWindow::myViewModel
private

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