Version: 9.15.0
Plot2d_ViewWindow Class Reference

Plot2d view window. More...

#include <Plot2d_ViewWindow.h>

Inheritance diagram for Plot2d_ViewWindow:
Inheritance graph

Public Types

enum  {
  DumpId , ScaleOpId , FitAllId , FitRectId ,
  ZoomId , MoveOpId , PanId , GlobalPanId ,
  PModeXLinearId , PModeXLogarithmicId , PModeYLinearId , PModeYLogarithmicId ,
  PModeNormLMaxId , PModeNormLMinId , PModeNormRMaxId , PModeNormRMinId ,
  CurvPointsId , CurvLinesId , CurvSplinesId , LegendId ,
  CurvSettingsId , CloneId , PrintId , AnalyticalCurveId
}
 

Public Slots

void onChangeHorMode ()
 Called when the scale mode for the horizontal axis is changed. More...
 
void onChangeVerMode ()
 Called when the scale mode for the vertical axis is changed. More...
 
void onChangeCurveMode ()
 Called when the curve type is changed. More...
 
void onChangeLegendMode ()
 Called when the legend mode is changed. More...
 
void onChangeNormLMode ()
 Called when the normalization mode (by left Y axis) for curves is changed. More...
 
void onChangeNormRMode ()
 Called when the normalization mode (by left Y axis) for curves is changed. More...
 
void onFitAll ()
 Called when the "Fit all" action is activated. More...
 
void onFitRect ()
 Called when the "Fit rect" action is activated. More...
 
void onZoom ()
 Called when the "Zoom" action is activated. More...
 
void onPanning ()
 Called when the "Panning" action is activated. More...
 
void onGlobalPanning ()
 Called when the "Global panning" action is activated. More...
 
void onViewHorMode ()
 Called when horizontal axis scale mode action is activated. More...
 
void onViewVerMode ()
 Called when vertical axis scale mode action is activated. More...
 
void onViewNormLMode ()
 Called when normalization mode action (by left Y axis) is activated. More...
 
void onViewNormRMode ()
 Called when normalization mode action (by right Y axis) is activated. More...
 
void onLegend ()
 Called when the "Show legend" action is activated. More...
 
void onCurves ()
 Called when the "Change curve type" action is activated. More...
 
void onDumpView ()
 Called when the "Dump view" action is activated. More...
 
void onPrintView ()
 Called when the "Print view" action is activated. More...
 
- Public Slots inherited from SUIT_ViewWindow
virtual void onDumpView ()
 
void setVisible (bool)
 

Signals

void cloneView ()
 Emitted when the "Clone View" action is activated. More...
 
- 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

 Plot2d_ViewWindow (SUIT_Desktop *, Plot2d_Viewer *)
 Constructor. More...
 
virtual ~Plot2d_ViewWindow ()
 Destructor. More...
 
Plot2d_ViewergetModel ()
 Get view model. More...
 
void putInfo (const QString &)
 Put message to the status bar. More...
 
Plot2d_ViewFramegetViewFrame ()
 Get view frame window. More...
 
QToolBargetToolBar ()
 Get view window's toolbar. More...
 
virtual void initLayout ()
 Internal initialization. More...
 
void contextMenuPopup (QMenu *)
 Fill popup menu with the actions,. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Custom event filter. More...
 
void createActions ()
 Create actions for the view window. More...
 
void createToolBar ()
 Create toolbar for the view window. More...
 
virtual QString getVisualParameters ()
 Get the visual parameters of the view window. More...
 
virtual void setVisualParameters (const QString &)
 Restore visual parameters of the view window from the formated string. More...
 
virtual void RefreshDumpImage ()
 Grab the view window to the internal image. More...
 
- 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 *)
 
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
 
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

virtual QImage dumpView ()
 Dump the contents of the view window to the image. More...
 
virtual bool dumpViewToFormat (const QImage &, const QString &, const QString &)
 Dump scene rendered in the view window to the file. More...
 
virtual QString filter () const
 Get supported image files wildcards. More...
 
- Protected Member Functions inherited from SUIT_ViewWindow
void closeEvent (QCloseEvent *)
 
virtual void contextMenuEvent (QContextMenuEvent *)
 
virtual bool action (const int)
 
virtual QActionsynchronizeAction ()
 

Private Attributes

Plot2d_ViewermyModel
 
Plot2d_ViewFramemyViewFrame
 
int myToolBar
 
QImage myDumpImage
 

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)
 
- Protected Attributes inherited from SUIT_ViewWindow
SUIT_DesktopmyDesktop
 
SUIT_ViewManagermyManager
 

Detailed Description

Plot2d view window.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DumpId 
ScaleOpId 
FitAllId 
FitRectId 
ZoomId 
MoveOpId 
PanId 
GlobalPanId 
PModeXLinearId 
PModeXLogarithmicId 
PModeYLinearId 
PModeYLogarithmicId 
PModeNormLMaxId 
PModeNormLMinId 
PModeNormRMaxId 
PModeNormRMinId 
CurvPointsId 
CurvLinesId 
CurvSplinesId 
LegendId 
CurvSettingsId 
CloneId 
PrintId 
AnalyticalCurveId 

Constructor & Destructor Documentation

◆ Plot2d_ViewWindow()

Plot2d_ViewWindow::Plot2d_ViewWindow ( SUIT_Desktop theDesktop,
Plot2d_Viewer theModel 
)

Constructor.

Parameters
theDesktopparent desktop window
theModelplt2d view model

References myModel.

◆ ~Plot2d_ViewWindow()

Plot2d_ViewWindow::~Plot2d_ViewWindow ( )
virtual

Destructor.

Member Function Documentation

◆ cloneView

void Plot2d_ViewWindow::cloneView ( )
signal

Emitted when the "Clone View" action is activated.

◆ contextMenuPopup()

void Plot2d_ViewWindow::contextMenuPopup ( QMenu thePopup)

◆ createActions()

◆ createToolBar()

◆ dumpView()

QImage Plot2d_ViewWindow::dumpView ( )
protectedvirtual

Dump the contents of the view window to the image.

Returns
image, containing all scene rendered in the window

Reimplemented from SUIT_ViewWindow.

References getToolBar(), myDumpImage, myViewFrame, and px().

◆ dumpViewToFormat()

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

Dump scene rendered in the view window to the file.

Parameters
imgimage
fileNamename of file
formatimage format ("BMP" [default], "JPEG", "JPG", "PNG")

Reimplemented from SUIT_ViewWindow.

References SUIT_ViewWindow::dumpViewToFormat(), myViewFrame, and Plot2d_ViewFrame::print().

◆ eventFilter()

bool Plot2d_ViewWindow::eventFilter ( QObject watched,
QEvent e 
)
virtual

Custom event filter.

Parameters
watchedevent receiver object
eevent
Returns
true if further event processing should be stopped

References SUIT_ViewWindow::mouseMoving(), SUIT_ViewWindow::mousePressed(), SUIT_ViewWindow::mouseReleased(), and myViewFrame.

◆ filter()

QString Plot2d_ViewWindow::filter ( ) const
protectedvirtual

Get supported image files wildcards.

Returns
image files wildcards (list of wildcards, separated by ";;")

Reimplemented from SUIT_ViewWindow.

References SUIT_ViewWindow::filter().

◆ getModel()

Plot2d_Viewer * Plot2d_ViewWindow::getModel ( )

Get view model.

Returns
Plot2d view model

References myModel.

◆ getToolBar()

QToolBar * Plot2d_ViewWindow::getToolBar ( )

Get view window's toolbar.

Returns
toolbar

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

◆ getViewFrame()

Plot2d_ViewFrame * Plot2d_ViewWindow::getViewFrame ( )

Get view frame window.

Returns
view frame window

References myViewFrame.

◆ getVisualParameters()

QString Plot2d_ViewWindow::getVisualParameters ( )
virtual

Get the visual parameters of the view window.

Returns
visual parameters of this view window formatted to the string

Reimplemented from SUIT_ViewWindow.

References Plot2d_ViewFrame::getVisualParameters(), and myViewFrame.

◆ initLayout()

◆ onChangeCurveMode

void Plot2d_ViewWindow::onChangeCurveMode ( )
slot

◆ onChangeHorMode

void Plot2d_ViewWindow::onChangeHorMode ( )
slot

◆ onChangeLegendMode

void Plot2d_ViewWindow::onChangeLegendMode ( )
slot

Called when the legend mode is changed.

References QtxActionMgr::action(), Plot2d_ViewFrame::isLegendShow(), LegendId, myViewFrame, and SUIT_ViewWindow::toolMgr().

◆ onChangeNormLMode

void Plot2d_ViewWindow::onChangeNormLMode ( )
slot

Called when the normalization mode (by left Y axis) for curves is changed.

References QtxActionMgr::action(), Plot2d_ViewFrame::isNormLMaxMode(), Plot2d_ViewFrame::isNormLMinMode(), myViewFrame, PModeNormLMaxId, PModeNormLMinId, and SUIT_ViewWindow::toolMgr().

◆ onChangeNormRMode

void Plot2d_ViewWindow::onChangeNormRMode ( )
slot

Called when the normalization mode (by left Y axis) for curves is changed.

References QtxActionMgr::action(), Plot2d_ViewFrame::isNormRMaxMode(), Plot2d_ViewFrame::isNormRMinMode(), myViewFrame, PModeNormRMaxId, PModeNormRMinId, and SUIT_ViewWindow::toolMgr().

◆ onChangeVerMode

void Plot2d_ViewWindow::onChangeVerMode ( )
slot

◆ onCurves

void Plot2d_ViewWindow::onCurves ( )
slot

Called when the "Change curve type" action is activated.

References SUIT_ViewWindow::action(), CurvLinesId, CurvPointsId, CurvSplinesId, myViewFrame, Plot2d_ViewFrame::setCurveType(), and SUIT_ViewWindow::toolMgr().

◆ onDumpView

void Plot2d_ViewWindow::onDumpView ( )
slot

Called when the "Dump view" action is activated.

References myViewFrame, and SUIT_ViewWindow::onDumpView().

◆ onFitAll

void Plot2d_ViewWindow::onFitAll ( )
slot

Called when the "Fit all" action is activated.

References myViewFrame, and Plot2d_ViewFrame::onViewFitAll().

◆ onFitRect

void Plot2d_ViewWindow::onFitRect ( )
slot

Called when the "Fit rect" action is activated.

References myViewFrame, and Plot2d_ViewFrame::onViewFitArea().

◆ onGlobalPanning

void Plot2d_ViewWindow::onGlobalPanning ( )
slot

Called when the "Global panning" action is activated.

References myViewFrame, and Plot2d_ViewFrame::onViewGlobalPan().

◆ onLegend

void Plot2d_ViewWindow::onLegend ( )
slot

Called when the "Show legend" action is activated.

References Plot2d_ViewFrame::isLegendShow(), myViewFrame, onChangeLegendMode(), and Plot2d_ViewFrame::showLegend().

◆ onPanning

void Plot2d_ViewWindow::onPanning ( )
slot

Called when the "Panning" action is activated.

References myViewFrame, and Plot2d_ViewFrame::onViewPan().

◆ onPrintView

void Plot2d_ViewWindow::onPrintView ( )
slot

Called when the "Print view" action is activated.

References Plot2d_ViewFrame::getCurves(), myViewFrame, and Plot2d_ViewFrame::printPlot().

◆ onViewHorMode

void Plot2d_ViewWindow::onViewHorMode ( )
slot

Called when horizontal axis scale mode action is activated.

References SUIT_ViewWindow::action(), myViewFrame, PModeXLinearId, Plot2d_ViewFrame::setHorScaleMode(), and SUIT_ViewWindow::toolMgr().

◆ onViewNormLMode

void Plot2d_ViewWindow::onViewNormLMode ( )
slot

◆ onViewNormRMode

void Plot2d_ViewWindow::onViewNormRMode ( )
slot

◆ onViewVerMode

void Plot2d_ViewWindow::onViewVerMode ( )
slot

Called when vertical axis scale mode action is activated.

References SUIT_ViewWindow::action(), myViewFrame, PModeYLinearId, Plot2d_ViewFrame::setVerScaleMode(), and SUIT_ViewWindow::toolMgr().

◆ onZoom

void Plot2d_ViewWindow::onZoom ( )
slot

Called when the "Zoom" action is activated.

References myViewFrame, and Plot2d_ViewFrame::onViewZoom().

◆ putInfo()

void Plot2d_ViewWindow::putInfo ( const QString &  theMsg)

Put message to the status bar.

Parameters
theMsgmessage text

References SUIT_ViewWindow::myDesktop.

◆ RefreshDumpImage()

void Plot2d_ViewWindow::RefreshDumpImage ( )
virtual

Grab the view window to the internal image.

References myDumpImage, myViewFrame, and px().

◆ setVisualParameters()

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

Restore visual parameters of the view window from the formated string.

Parameters
parametersview window visual parameters

Reimplemented from SUIT_ViewWindow.

References myViewFrame, and Plot2d_ViewFrame::setVisualParameters().

Member Data Documentation

◆ myDumpImage

QImage Plot2d_ViewWindow::myDumpImage
private

◆ myModel

Plot2d_Viewer* Plot2d_ViewWindow::myModel
private

◆ myToolBar

int Plot2d_ViewWindow::myToolBar
private

◆ myViewFrame

Plot2d_ViewFrame* Plot2d_ViewWindow::myViewFrame
private

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