Version: 9.12.0
Plot2d_ViewFrame Class Reference

#include <Plot2d_ViewFrame.h>

Inheritance diagram for Plot2d_ViewFrame:
Inheritance graph

Public Types

enum  ObjectType {
  MainTitle , XTitle , YTitle , Y2Title ,
  XAxis , YAxis , Y2Axis
}
 

Public Slots

void onViewPan ()
 
void onViewZoom ()
 
void onViewFitAll ()
 
void onViewFitArea ()
 
void onViewGlobalPan ()
 
void onSettings ()
 
void onAnalyticalCurve ()
 
void onFitData ()
 
void onChangeBackground ()
 
void onPanLeft ()
 
void onPanRight ()
 
void onPanUp ()
 
void onPanDown ()
 
void onZoomIn ()
 
void onZoomOut ()
 

Signals

void vpModeHorChanged ()
 
void vpModeVerChanged ()
 
void vpNormLModeChanged ()
 
void vpNormRModeChanged ()
 
void vpCurveChanged ()
 
void contextMenuRequested (QContextMenuEvent *)
 
void clicked (const QVariant &, int)
 

Public Member Functions

 Plot2d_ViewFrame (QWidget *, const QString &="")
 
virtual ~Plot2d_ViewFrame ()
 
void Init ()
 
void SetPreference ()
 
QWidgetgetViewWidget ()
 
virtual void DisplayAll ()
 
virtual void EraseAll ()
 
void Repaint ()
 
void Display (const Plot2d_Prs *)
 
void Erase (const Plot2d_Prs *, const bool=false)
 
Plot2d_PrsCreatePrs (const char *=0)
 
virtual bool eventFilter (QObject *, QEvent *)
 
void updateTitles (const bool=true)
 
void setTitle (const QString &)
 
QString getTitle () const
 
QVector< QVector< QwtPlotCurve * > > displayPlot2dCurveList (const QList< QList< Plot2d_Curve * > > &sysCoCurveList, bool displayLegend, const QList< QList< bool > > &sides)
 
QVector< QVector< QwtPlotCurve * > > displayPlot2dCurveList (const QList< Plot2d_Curve * > &curveList, int groupsize, bool displayLegend, const QList< bool > &sides)
 
Plot2d_CurvecreatePlot2dCurve (QString &title, QString &unit, QList< double > &xList, QList< double > &yList, QList< QString > &tooltipList, Plot2d::LineType lineKind, int lineWidth, QColor &lineColor, QwtSymbol::Style markerKind, Plot2d_QwtPlotPicker *picker, bool toDraw, bool displayLegend=true)
 
QColor getPlot2dCurveColor (Plot2d_Curve *plot2dCurve)
 
QwtPlotCurvecreateSegment (double *X, double *Y, int nbPoint, Qt::PenStyle lineKind, int lineWidth, QColor &lineColor, QwtSymbol::Style markerKind, bool side=false)
 
void displayCurve (Plot2d_Curve *, bool=false)
 
void displayCurves (const curveList &, bool=false)
 
void eraseCurve (Plot2d_Curve *, bool=false)
 
void eraseCurves (const curveList &, bool=false)
 
int getCurves (curveList &) const
 
CurveDict getCurves () const
 
void updateCurve (Plot2d_Curve *, bool=false)
 
void processFiltering (bool=false)
 
QwtPlotItemdisplayObject (Plot2d_Object *, bool=false)
 
void displayObjects (const objectList &, bool=false)
 
void eraseObject (Plot2d_Object *, bool=false)
 
void eraseObjects (const objectList &, bool=false)
 
void eraseBasicObject (QwtPlotItem *, bool=false)
 
void eraseBasicObjects (const QList< QwtPlotItem * > &, bool=false)
 
int getObjects (objectList &) const
 
bool isVisible (Plot2d_Object *) const
 
void updateObject (Plot2d_Object *, bool=false)
 
void updateLegend (const Plot2d_Prs *)
 
void updateLegend ()
 
void fitAll ()
 
void fitArea (const QRect &)
 
void fitData (const int, const double, const double, const double, const double, const double=0, const double=0)
 
void getFitRanges (double &, double &, double &, double &, double &, double &)
 
void getFitRangeByCurves (double &, double &, double &, double &, double &, double &)
 
void getFitRangeByMarkers (double &, double &, double &, double &, double &, double &)
 
void addAnalyticalCurve (Plot2d_AnalyticalCurve *)
 
void removeAnalyticalCurve (Plot2d_AnalyticalCurve *)
 
void updateAnalyticalCurve (Plot2d_AnalyticalCurve *, bool=false)
 
void updateAnalyticalCurves ()
 
void deselectAnalyticalCurves ()
 Deselect all analytical curves. More...
 
AnalyticalCurveList getAnalyticalCurves () const
 
Plot2d_AnalyticalCurvegetAnalyticalCurve (QwtPlotItem *)
 
void deselectObjects ()
 Deselect all objects, except analytical curves. More...
 
void copyPreferences (Plot2d_ViewFrame *)
 
void setCurveType (int, bool=true)
 
int getCurveType () const
 
void setCurveTitle (Plot2d_Curve *, const QString &)
 
void setObjectTitle (Plot2d_Object *, const QString &)
 
void showLegend (bool, bool=true)
 
void setLegendPos (int)
 
int getLegendPos () const
 
void setLegendSymbolType (int)
 
int getLegendSymbolType () const
 
void setLegendFont (const QFont &)
 
QFont getLegendFont () const
 
void setLegendFontColor (const QColor &)
 
QColor getLegendFontColor () const
 
void setSelectedLegendFontColor (const QColor &)
 
QColor getSelectedLegendFontColor () const
 
void setMarkerSize (const int, bool=true)
 
int getMarkerSize () const
 
virtual void setBackgroundColor (const QColor &)
 
QColor backgroundColor () const
 
virtual void setSelectionColor (const QColor &)
 
QColor selectionColor () const
 
void setXGrid (bool, const int, bool, const int, bool=true)
 
void setYGrid (bool, const int, bool, const int, bool, const int, bool, const int, bool=true)
 
void setTitle (bool, const QString &, ObjectType, bool=true)
 
QString getTitle (ObjectType) const
 
void setFont (const QFont &, ObjectType, bool=true)
 
void setHorScaleMode (const int, bool=true)
 
int getHorScaleMode () const
 
void setVerScaleMode (const int, bool=true)
 
int getVerScaleMode () const
 
void setNormLMaxMode (bool, bool=true)
 
bool getNormLMaxMode () const
 
void setNormLMinMode (bool, bool=true)
 
bool getNormLMinMode () const
 
void setNormRMaxMode (bool, bool=true)
 
bool getNormRMaxMode () const
 
void setNormRMinMode (bool, bool=true)
 
bool getNormRMinMode () const
 
bool isModeHorLinear ()
 
bool isModeVerLinear ()
 
bool isNormLMaxMode ()
 
bool isNormLMinMode ()
 
bool isNormRMaxMode ()
 
bool isNormRMinMode ()
 
bool isLegendShow () const
 
bool isXLogEnabled () const
 
bool isYLogEnabled () const
 
void setEnableAxis (QwtPlot::Axis, bool)
 
virtual bool print (const QString &, const QString &) const
 
void printPlot (QPainter *, const QRectF &) const
 Print Plot2d window. More...
 
QString getVisualParameters ()
 
void setVisualParameters (const QString &)
 
void incrementalPan (const int, const int)
 
void incrementalZoom (const int, const int)
 
QwtPlotCanvas * getPlotCanvas () const
 
Plot2d_CurvegetClosestCurve (QPoint, double &, int &) const
 
Plot2d_ObjectgetPlotObject (QwtPlotItem *) const
 
QwtPlotItemgetPlotObject (Plot2d_Object *) const
 
QwtPlotCurvegetPlotCurve (Plot2d_Curve *) const
 
Plot2d_Plot2dgetPlot () const
 
void updatePlotItem (Plot2d_Object *, QwtPlotItem *)
 

Protected Member Functions

int testOperation (const QMouseEvent &)
 
virtual void readPreferences ()
 
virtual void writePreferences ()
 
QString getInfo (const QPoint &)
 
virtual void wheelEvent (QWheelEvent *)
 
bool hasPlotCurve (Plot2d_Curve *) const
 
void setCurveType (QwtPlotCurve *, int)
 
bool hasPlotObject (Plot2d_Object *) const
 
QString getXmlVisualParameters ()
 
bool setXmlVisualParameters (const QString &)
 
virtual void customEvent (QEvent *)
 
void plotMousePressed (const QMouseEvent &)
 
bool plotMouseMoved (const QMouseEvent &)
 
void plotMouseReleased (const QMouseEvent &)
 

Protected Attributes

Plot2d_Plot2dmyPlot
 
int myOperation
 
QPoint myPnt
 
int myCurveType
 
bool myShowLegend
 
int myLegendPos
 
int myLegendSymbolType
 
QFont myLegendFont
 
QColor myLegendColor
 
QColor mySelectedLegendFontColor
 
int myMarkerSize
 
QColor myBackground
 
QColor mySelectionColor
 
QString myTitle
 
QString myXTitle
 
QString myYTitle
 
QString myY2Title
 
bool myTitleEnabled
 
bool myXTitleEnabled
 
bool myYTitleEnabled
 
bool myY2TitleEnabled
 
bool myXGridMajorEnabled
 
bool myYGridMajorEnabled
 
bool myY2GridMajorEnabled
 
bool myXGridMinorEnabled
 
bool myYGridMinorEnabled
 
bool myY2GridMinorEnabled
 
int myXGridMaxMajor
 
int myYGridMaxMajor
 
int myY2GridMaxMajor
 
int myXGridMaxMinor
 
int myYGridMaxMinor
 
int myY2GridMaxMinor
 
int myXMode
 
int myYMode
 
bool myNormLMin
 
bool myNormLMax
 
bool myNormRMin
 
bool myNormRMax
 
double myXDistance
 
double myYDistance
 
double myYDistance2
 
bool mySecondY
 
ObjectDict myObjects
 
AnalyticalCurveList myAnalyticalCurves
 
Plot2d_NormalizeAlgorithmmyLNormAlgo
 
Plot2d_NormalizeAlgorithmmyRNormAlgo
 
bool myIsDefTitle
 

Private Types

enum  {
  NoOpId , FitAreaId , ZoomId , PanId ,
  GlPanId , DumpId , ModeXLinearId , ModeXLogarithmicId ,
  ModeYLinearId , ModeYLogarithmicId , LegendId , CurvePointsId ,
  CurveLinesId , CurveSplinesId
}
 

Private Attributes

QList< QwtPlotItem * > myQwtPlotCurveList
 
QList< QwtPlotCurve * > myIntermittentSegmentList
 
QList< Plot2d_Curve * > myPlot2dCurveList
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NoOpId 
FitAreaId 
ZoomId 
PanId 
GlPanId 
DumpId 
ModeXLinearId 
ModeXLogarithmicId 
ModeYLinearId 
ModeYLogarithmicId 
LegendId 
CurvePointsId 
CurveLinesId 
CurveSplinesId 

◆ ObjectType

Enumerator
MainTitle 
XTitle 
YTitle 
Y2Title 
XAxis 
YAxis 
Y2Axis 

Constructor & Destructor Documentation

◆ Plot2d_ViewFrame()

Plot2d_ViewFrame::Plot2d_ViewFrame ( QWidget parent,
const QString &  title = "" 
)

Constructor

References Init(), myLNormAlgo, myPlot, and myRNormAlgo.

◆ ~Plot2d_ViewFrame()

Plot2d_ViewFrame::~Plot2d_ViewFrame ( )
virtual

Destructor

Member Function Documentation

◆ addAnalyticalCurve()

void Plot2d_ViewFrame::addAnalyticalCurve ( Plot2d_AnalyticalCurve theCurve)
virtual

Implements Plot2d_CurveContainer.

References myAnalyticalCurves.

◆ backgroundColor()

QColor Plot2d_ViewFrame::backgroundColor ( ) const

Gets background color

References myBackground.

◆ clicked

void Plot2d_ViewFrame::clicked ( const QVariant &  ,
int   
)
signal

◆ contextMenuRequested

void Plot2d_ViewFrame::contextMenuRequested ( QContextMenuEvent *  )
signal

◆ copyPreferences()

◆ createPlot2dCurve()

Plot2d_Curve * Plot2d_ViewFrame::createPlot2dCurve ( QString &  title,
QString &  unit,
QList< double > &  xList,
QList< double > &  yList,
QList< QString > &  tooltipList,
Plot2d::LineType  lineKind,
int  lineWidth,
QColor &  lineColor,
QwtSymbol::Style  markerKind,
Plot2d_QwtPlotPicker picker,
bool  toDraw,
bool  displayLegend = true 
)

Create and display an y=f(x) curve of points Parameters : toDraw : true => Display the created curve Draw the points'markers and create associated tooltips

References Plot2d_Object::addPoint(), displayCurve(), getPlotObject(), myPlot, myPlot2dCurveList, Plot2d_Curve::setColor(), Plot2d_Curve::setLine(), Plot2d_Curve::setMarkerSize(), Plot2d_Curve::setMarkerStyle(), Plot2d_Object::setVerTitle(), and Plot2d_Object::setVerUnits().

◆ CreatePrs()

Plot2d_Prs * Plot2d_ViewFrame::CreatePrs ( const char *  = 0)

Creates presentation of object Default implementation is empty

◆ createSegment()

QwtPlotCurve * Plot2d_ViewFrame::createSegment ( double *  X,
double *  Y,
int  nbPoint,
Qt::PenStyle  lineKind,
int  lineWidth,
QColor &  lineColor,
QwtSymbol::Style  markerKind,
bool  side = false 
)

Create and display a segment with nbPoint=2 points

References myIntermittentSegmentList, myPlot, yLeft, and yRight.

◆ customEvent()

void Plot2d_ViewFrame::customEvent ( QEvent ce)
protectedvirtual

Schedules a FitAll operation by putting it to the application's event queue. This ensures that other important events (show, resize, etc.) are processed first.

References fitAll(), and FITALL_EVENT.

◆ deselectAnalyticalCurves()

void Plot2d_ViewFrame::deselectAnalyticalCurves ( )

Deselect all analytical curves.

References myAnalyticalCurves, and Plot2d_AnalyticalCurve::setSelected().

◆ deselectObjects()

void Plot2d_ViewFrame::deselectObjects ( )

Deselect all objects, except analytical curves.

References myObjects.

◆ Display()

◆ DisplayAll()

void Plot2d_ViewFrame::DisplayAll ( )
virtual

Actually this method just re-displays all curves which are presented in the viewer

References getObjects(), myPlot, Plot2d_Plot2d::replot(), updateObject(), and Plot2d_Plot2d::zoomer().

◆ displayCurve()

void Plot2d_ViewFrame::displayCurve ( Plot2d_Curve curve,
bool  update = false 
)

Adds curve into view

References displayObject(), and myQwtPlotCurveList.

◆ displayCurves()

void Plot2d_ViewFrame::displayCurves ( const curveList curves,
bool  update = false 
)

Adds curves into view

References displayObjects().

◆ displayObject()

◆ displayObjects()

void Plot2d_ViewFrame::displayObjects ( const objectList objects,
bool  update = false 
)

Adds objects into view

References displayObject(), fitAll(), myPlot, and Plot2d_Plot2d::replot().

◆ displayPlot2dCurveList() [1/2]

QVector< QVector< QwtPlotCurve * > > Plot2d_ViewFrame::displayPlot2dCurveList ( const QList< Plot2d_Curve * > &  curveList,
int  groupSize,
bool  displayLegend,
const QList< bool > &  sides 
)

Display list of curves by group of consecutive curves.

Draw points markers and create associated tooltips Draw connection segments (intermittent line) between the curves

Parameters
[in]sidessorted as in curveList. If true->right if false->left
Returns
the list of underlying plot curve that defines the complex cuve at once. In case of success the vector is at least of size 1. The first one is the curve used by the legend.

References createSegment(), displayCurve(), Plot2d_Curve::getColor(), Plot2d_Object::getData(), Plot2d_Curve::getLine(), Plot2d_Curve::getLineWidth(), Plot2d_Curve::getMarkerStyle(), getPlotObject(), Plot2d_Object::getVerTitle(), myPlot, Plot2d_Curve::setColor(), Plot2d_Curve::setLine(), Plot2d_Curve::setMarkerStyle(), showLegend(), yLeft, and yRight.

◆ displayPlot2dCurveList() [2/2]

QVector< QVector< QwtPlotCurve * > > Plot2d_ViewFrame::displayPlot2dCurveList ( const QList< QList< Plot2d_Curve * > > &  sysCoCurveList,
bool  displayLegend,
const QList< QList< bool > > &  sides 
)

Display curves of the list of lists by systems and components

  • the first level list contains NbSytems lists of second level
  • a second level list contains NbComponents curves | system 1 | system 2 | ..... | system N | | compo1 compo2 ... compoM | compo1 compo2 ... compoM | ..... | compo1 compo2 ... compoM |

Draw points markers and create associated tooltips. Draw connection segments (intermittent line) between all the curves of a component.

Returns
the list of underlying plot curve that defines the complex cuve at once. In case of success the vector is at least of size 1. The first one is the curve used by the legend.

References myPlot, and xBottom.

◆ Erase()

void Plot2d_ViewFrame::Erase ( const Plot2d_Prs prs,
const bool  = false 
)

◆ EraseAll()

void Plot2d_ViewFrame::EraseAll ( )
virtual

◆ eraseBasicObject()

void Plot2d_ViewFrame::eraseBasicObject ( QwtPlotItem object,
bool  update = false 
)

◆ eraseBasicObjects()

void Plot2d_ViewFrame::eraseBasicObjects ( const QList< QwtPlotItem * > &  objects,
bool  update = false 
)

◆ eraseCurve()

void Plot2d_ViewFrame::eraseCurve ( Plot2d_Curve curve,
bool  update = false 
)

Erases curve

References eraseObject().

◆ eraseCurves()

void Plot2d_ViewFrame::eraseCurves ( const curveList curves,
bool  update = false 
)

Erases curves

References eraseObjects().

◆ eraseObject()

void Plot2d_ViewFrame::eraseObject ( Plot2d_Object object,
bool  update = false 
)

◆ eraseObjects()

void Plot2d_ViewFrame::eraseObjects ( const objectList objects,
bool  update = false 
)

◆ eventFilter()

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

◆ fitAll()

void Plot2d_ViewFrame::fitAll ( )

◆ fitArea()

void Plot2d_ViewFrame::fitArea ( const QRect &  area)

Fits the view to rectangle area (pixels)

References MIN_RECT_SIZE, myPlot, mySecondY, Plot2d_Plot2d::replot(), xBottom, yLeft, yRight, and Plot2d_Plot2d::zoomer().

◆ fitData()

void Plot2d_ViewFrame::fitData ( const int  mode,
const double  xMin,
const double  xMax,
const double  yMin,
const double  yMax,
const double  y2Min = 0,
const double  y2Max = 0 
)

"Fit Data" command for TUI interface

References myPlot, mySecondY, Plot2d_Plot2d::replot(), xBottom, yLeft, yRight, and Plot2d_Plot2d::zoomer().

◆ getAnalyticalCurve()

Plot2d_AnalyticalCurve * Plot2d_ViewFrame::getAnalyticalCurve ( QwtPlotItem theItem)

Get analytical curve by plot item.

References myAnalyticalCurves.

◆ getAnalyticalCurves()

AnalyticalCurveList Plot2d_ViewFrame::getAnalyticalCurves ( ) const
virtual

Return list of the alalytical curves.

Implements Plot2d_CurveContainer.

References myAnalyticalCurves.

◆ getClosestCurve()

Plot2d_Curve * Plot2d_ViewFrame::getClosestCurve ( QPoint  p,
double &  distance,
int &  index 
) const

return closest curve if it exist, else 0

References getCurves().

◆ getCurves() [1/2]

CurveDict Plot2d_ViewFrame::getCurves ( ) const

References myObjects.

◆ getCurves() [2/2]

int Plot2d_ViewFrame::getCurves ( curveList curves) const

Gets lsit of displayed curves

References getCurves().

◆ getCurveType()

int Plot2d_ViewFrame::getCurveType ( ) const

Gets curve type

References myCurveType.

◆ getFitRangeByCurves()

void Plot2d_ViewFrame::getFitRangeByCurves ( double &  xMin,
double &  xMax,
double &  yMin,
double &  yMax,
double &  y2Min,
double &  y2Max 
)

Gets current fit ranges by Curves

References isModeHorLinear(), isModeVerLinear(), myObjects, and yRight.

◆ getFitRangeByMarkers()

void Plot2d_ViewFrame::getFitRangeByMarkers ( double &  xMin,
double &  xMax,
double &  yMin,
double &  yMax,
double &  y2Min,
double &  y2Max 
)

Gets current fit ranges by Markers All parameters are inout.

References Plot2d_Plot2d::getPicker(), myPlot, Plot2d_QwtPlotPicker::pMarkers, and yRight.

◆ getFitRanges()

void Plot2d_ViewFrame::getFitRanges ( double &  xMin,
double &  xMax,
double &  yMin,
double &  yMax,
double &  y2Min,
double &  y2Max 
)

Gets current fit ranges for view frame

References myPlot, mySecondY, xBottom, yLeft, and yRight.

◆ getHorScaleMode()

int Plot2d_ViewFrame::getHorScaleMode ( ) const

Gets scale mode for horizontal axis: 0 - linear, 1 - logarithmic

References myXMode.

◆ getInfo()

QString Plot2d_ViewFrame::getInfo ( const QPoint &  pnt)
protected

Prints mouse cursor coordinates into string

References myPlot, mySecondY, xBottom, yLeft, and yRight.

◆ getLegendFont()

QFont Plot2d_ViewFrame::getLegendFont ( ) const

Gets legend font

References myLegendFont.

◆ getLegendFontColor()

QColor Plot2d_ViewFrame::getLegendFontColor ( ) const

Gets legend font color

References myLegendColor.

◆ getLegendPos()

int Plot2d_ViewFrame::getLegendPos ( ) const

Gets legend position : 0 - left, 1 - right, 2 - top, 3 - bottom

References myLegendPos.

◆ getLegendSymbolType()

int Plot2d_ViewFrame::getLegendSymbolType ( ) const

Gets legend symbol type : 0 - marker on line, 1 - marker above line

References myLegendSymbolType.

◆ getMarkerSize()

int Plot2d_ViewFrame::getMarkerSize ( ) const

Gets new marker size

References myMarkerSize.

◆ getNormLMaxMode()

bool Plot2d_ViewFrame::getNormLMaxMode ( ) const

Gets normalization mode to the global maximum by left Y axis

References myNormLMax.

◆ getNormLMinMode()

bool Plot2d_ViewFrame::getNormLMinMode ( ) const

Gets normalization mode to the global minimum by left Y axis

References myNormLMax.

◆ getNormRMaxMode()

bool Plot2d_ViewFrame::getNormRMaxMode ( ) const

Gets normalization mode to the global maximum by right Y axis

References myNormRMax.

◆ getNormRMinMode()

bool Plot2d_ViewFrame::getNormRMinMode ( ) const

Gets normalization mode to the global minimum by right Y axis

References myNormRMax.

◆ getObjects()

int Plot2d_ViewFrame::getObjects ( objectList objects) const

Gets lsit of displayed curves

References myObjects.

◆ getPlot()

Plot2d_Plot2d* Plot2d_ViewFrame::getPlot ( ) const
inline

◆ getPlot2dCurveColor()

QColor Plot2d_ViewFrame::getPlot2dCurveColor ( Plot2d_Curve plot2dCurve)

Get curve's color

References OCCViewer::color(), and getPlotObject().

◆ getPlotCanvas()

QwtPlotCanvas * Plot2d_ViewFrame::getPlotCanvas ( ) const

References myPlot.

◆ getPlotCurve()

QwtPlotCurve * Plot2d_ViewFrame::getPlotCurve ( Plot2d_Curve curve) const

Returns qwt plot curve if it is existed in map of curves and 0 otherwise

References getPlotObject().

◆ getPlotObject() [1/2]

QwtPlotItem * Plot2d_ViewFrame::getPlotObject ( Plot2d_Object object) const

Returns qwt plot curve if it is existed in map of curves and 0 otherwise

References myObjects.

◆ getPlotObject() [2/2]

Plot2d_Object * Plot2d_ViewFrame::getPlotObject ( QwtPlotItem plotItem) const

Return Plot2d_Object by the QwtPlotItem

References myObjects.

◆ getSelectedLegendFontColor()

QColor Plot2d_ViewFrame::getSelectedLegendFontColor ( ) const

Gets selected legend font color

References mySelectedLegendFontColor.

◆ getTitle() [1/2]

QString Plot2d_ViewFrame::getTitle ( ) const

Gets title

References myTitle.

◆ getTitle() [2/2]

QString Plot2d_ViewFrame::getTitle ( ObjectType  type) const

Sets title for some axis

References MainTitle, myTitle, myXTitle, myY2Title, myYTitle, XTitle, Y2Title, and YTitle.

◆ getVerScaleMode()

int Plot2d_ViewFrame::getVerScaleMode ( ) const

Gets scale mode for vertical axis: 0 - linear, 1 - logarithmic

References myYMode.

◆ getViewWidget()

QWidget * Plot2d_ViewFrame::getViewWidget ( )

Gets window's central widget

References myPlot.

◆ getVisualParameters()

QString Plot2d_ViewFrame::getVisualParameters ( )
Returns
string with all visual parameters

References getXmlVisualParameters().

◆ getXmlVisualParameters()

◆ hasPlotCurve()

bool Plot2d_ViewFrame::hasPlotCurve ( Plot2d_Curve curve) const
protected

Returns true if qwt plot curve is existed in map of curves and false otherwise

References hasPlotObject().

◆ hasPlotObject()

bool Plot2d_ViewFrame::hasPlotObject ( Plot2d_Object object) const
protected

Returns true if qwt plot curve is existed in map of curves and false otherwise

References myObjects.

◆ incrementalPan()

void Plot2d_ViewFrame::incrementalPan ( const int  incrX,
const int  incrY 
)

Incremental zooming operation

References myPlot, mySecondY, Plot2d_Plot2d::replot(), xBottom, yLeft, and yRight.

◆ incrementalZoom()

void Plot2d_ViewFrame::incrementalZoom ( const int  incrX,
const int  incrY 
)

Incremental panning operation

References myPlot, mySecondY, Plot2d_Plot2d::replot(), xBottom, yLeft, and yRight.

◆ Init()

◆ isLegendShow()

bool Plot2d_ViewFrame::isLegendShow ( ) const

Return True if legend is shown

References myShowLegend.

◆ isModeHorLinear()

bool Plot2d_ViewFrame::isModeHorLinear ( )

Return, scale mode for horizontal axis

References myXMode.

◆ isModeVerLinear()

bool Plot2d_ViewFrame::isModeVerLinear ( )

Return, scale mode for vertical axis

References myYMode.

◆ isNormLMaxMode()

bool Plot2d_ViewFrame::isNormLMaxMode ( )

Return True if curves are normalize to the global maximum by left Y axis

References myNormLMax.

◆ isNormLMinMode()

bool Plot2d_ViewFrame::isNormLMinMode ( )

Return True if curves are normalize to the global minimum by left Y axis

References myNormLMin.

◆ isNormRMaxMode()

bool Plot2d_ViewFrame::isNormRMaxMode ( )

Return True if curves are normalize to the global maximum by right Y axis

References myNormRMax.

◆ isNormRMinMode()

bool Plot2d_ViewFrame::isNormRMinMode ( )

Return True if curves are normalize to the global minimum by right Y axis

References myNormRMin.

◆ isVisible()

bool Plot2d_ViewFrame::isVisible ( Plot2d_Object object) const

Returns true if the curve is visible

References getPlotObject(), and hasPlotObject().

◆ isXLogEnabled()

bool Plot2d_ViewFrame::isXLogEnabled ( ) const

Precaution for logarithmic X scale

References myObjects.

◆ isYLogEnabled()

bool Plot2d_ViewFrame::isYLogEnabled ( ) const

Precaution for logarithmic Y scale

References myObjects.

◆ onAnalyticalCurve

void Plot2d_ViewFrame::onAnalyticalCurve ( )
slot

"Analytical Curves" toolbar action slot

References updateAnalyticalCurves().

◆ onChangeBackground

void Plot2d_ViewFrame::onChangeBackground ( )
slot

Change background color

References backgroundColor(), and setBackgroundColor().

◆ onFitData

void Plot2d_ViewFrame::onFitData ( )
slot

◆ onPanDown

void Plot2d_ViewFrame::onPanDown ( )
slot

Performs incremental panning to the bottom

References INCREMENT_FOR_OP, incrementalPan(), and updateAnalyticalCurves().

◆ onPanLeft

void Plot2d_ViewFrame::onPanLeft ( )
slot

Performs incremental panning to the left

References INCREMENT_FOR_OP, incrementalPan(), and updateAnalyticalCurves().

◆ onPanRight

void Plot2d_ViewFrame::onPanRight ( )
slot

Performs incremental panning to the right

References INCREMENT_FOR_OP, incrementalPan(), and updateAnalyticalCurves().

◆ onPanUp

void Plot2d_ViewFrame::onPanUp ( )
slot

Performs incremental panning to the top

References INCREMENT_FOR_OP, incrementalPan(), and updateAnalyticalCurves().

◆ onSettings

void Plot2d_ViewFrame::onSettings ( )
slot

"Settings" toolbar action slot

References OCCViewer::color(), Plot2d_SetupViewDlg::getBackgroundColor(), Plot2d_SetupViewDlg::getCurveType(), Plot2d_SetupViewDlg::getDeviationMarkerCl(), Plot2d_SetupViewDlg::getDeviationMarkerLw(), Plot2d_SetupViewDlg::getDeviationMarkerTs(), Plot2d_SetupViewDlg::getLegendColor(), Plot2d_SetupViewDlg::getLegendFont(), Plot2d_SetupViewDlg::getLegendPos(), Plot2d_SetupViewDlg::getLegendSymbolType(), Plot2d_SetupViewDlg::getLMaxNormMode(), Plot2d_SetupViewDlg::getLMinNormMode(), Plot2d_SetupViewDlg::getMainTitle(), Plot2d_SetupViewDlg::getMajorGrid(), Plot2d_SetupViewDlg::getMarkerSize(), Plot2d_SetupViewDlg::getMinorGrid(), Plot2d_SetupViewDlg::getRMaxNormMode(), Plot2d_SetupViewDlg::getRMinNormMode(), Plot2d_SetupViewDlg::getSelectedLegendColor(), Plot2d_SetupViewDlg::getSelectionColor(), Plot2d_SetupViewDlg::getXScaleMode(), Plot2d_SetupViewDlg::getXTitle(), Plot2d_SetupViewDlg::getY2Title(), Plot2d_SetupViewDlg::getYScaleMode(), Plot2d_SetupViewDlg::getYTitle(), Plot2d_SetupViewDlg::isLegendEnabled(), Plot2d_SetupViewDlg::isMainTitleEnabled(), Plot2d_SetupViewDlg::isSetAsDefault(), Plot2d_SetupViewDlg::isXTitleEnabled(), Plot2d_SetupViewDlg::isY2TitleEnabled(), Plot2d_SetupViewDlg::isYTitleEnabled(), MainTitle, myBackground, myCurveType, myIsDefTitle, myLegendColor, myLegendFont, myLegendPos, myLegendSymbolType, myMarkerSize, myNormLMax, myNormLMin, myNormRMax, myNormRMin, myPlot, mySecondY, mySelectedLegendFontColor, mySelectionColor, myShowLegend, myTitle, myTitleEnabled, myXGridMajorEnabled, myXGridMinorEnabled, myXMode, myXTitle, myXTitleEnabled, myY2GridMajorEnabled, myY2GridMinorEnabled, myY2Title, myY2TitleEnabled, myYGridMajorEnabled, myYGridMinorEnabled, myYMode, myYTitle, myYTitleEnabled, PLOT2D_DEVIATION_COLOR, PLOT2D_DEVIATION_LW, PLOT2D_DEVIATION_TS, Plot2d_Plot2d::replot(), Plot2d_SetupViewDlg::setBackgroundColor(), setBackgroundColor(), Plot2d_SetupViewDlg::setCurveType(), setCurveType(), Plot2d_SetupViewDlg::setDeviationMarkerCl(), Plot2d_SetupViewDlg::setDeviationMarkerLw(), Plot2d_SetupViewDlg::setDeviationMarkerTs(), setHorScaleMode(), Plot2d_SetupViewDlg::setLegend(), setLegendFont(), setLegendFontColor(), setLegendPos(), setLegendSymbolType(), Plot2d_SetupViewDlg::setLMaxNormMode(), Plot2d_SetupViewDlg::setLMinNormMode(), Plot2d_SetupViewDlg::setMainTitle(), Plot2d_SetupViewDlg::setMajorGrid(), Plot2d_SetupViewDlg::setMarkerSize(), setMarkerSize(), Plot2d_SetupViewDlg::setMinorGrid(), setNormLMaxMode(), setNormLMinMode(), setNormRMaxMode(), setNormRMinMode(), Plot2d_SetupViewDlg::setRMaxNormMode(), Plot2d_SetupViewDlg::setRMinNormMode(), Plot2d_SetupViewDlg::setScaleMode(), setSelectedLegendFontColor(), Plot2d_SetupViewDlg::setSelectionColor(), setSelectionColor(), setTitle(), setVerScaleMode(), setXGrid(), Plot2d_SetupViewDlg::setXTitle(), Plot2d_SetupViewDlg::setY2Title(), setYGrid(), Plot2d_SetupViewDlg::setYTitle(), showLegend(), writePreferences(), xBottom, XTitle, Y2Title, yLeft, yRight, and YTitle.

◆ onViewFitAll

void Plot2d_ViewFrame::onViewFitAll ( )
slot

View operations : Fit All

References Plot2d_Plot2d::defaultPicker(), fitAll(), myOperation, myPlot, and NoOpId.

◆ onViewFitArea

void Plot2d_ViewFrame::onViewFitArea ( )
slot

View operations : Fit Area

References FitAreaId, myOperation, myPlot, and Plot2d_Plot2d::setPickerMousePattern().

◆ onViewGlobalPan

void Plot2d_ViewFrame::onViewGlobalPan ( )
slot

◆ onViewPan

void Plot2d_ViewFrame::onViewPan ( )
slot

View operations : Pan view

References Plot2d_Plot2d::defaultPicker(), myOperation, myPlot, and PanId.

◆ onViewZoom

void Plot2d_ViewFrame::onViewZoom ( )
slot

View operations : Zoom view

References Plot2d_Plot2d::defaultPicker(), imageZoomCursor, myOperation, myPlot, and ZoomId.

◆ onZoomIn

void Plot2d_ViewFrame::onZoomIn ( )
slot

Performs incremental zooming in

References INCREMENT_FOR_OP, incrementalZoom(), and updateAnalyticalCurves().

◆ onZoomOut

void Plot2d_ViewFrame::onZoomOut ( )
slot

Performs incremental zooming out

References INCREMENT_FOR_OP, incrementalZoom(), and updateAnalyticalCurves().

◆ plotMouseMoved()

bool Plot2d_ViewFrame::plotMouseMoved ( const QMouseEvent &  me)
protected

Slot, called when user moves mouse

References getInfo(), incrementalPan(), incrementalZoom(), myOperation, myPnt, NoOpId, PanId, Plot2d_ViewWindow::putInfo(), and ZoomId.

◆ plotMousePressed()

void Plot2d_ViewFrame::plotMousePressed ( const QMouseEvent &  me)
protected

◆ plotMouseReleased()

void Plot2d_ViewFrame::plotMouseReleased ( const QMouseEvent &  me)
protected

◆ print()

bool Plot2d_ViewFrame::print ( const QString &  file,
const QString &  format 
) const
virtual

Outputs content of viewframe to file

Parameters
file- file name
format- file format

References myPlot.

◆ printPlot()

void Plot2d_ViewFrame::printPlot ( QPainter *  p,
const QRectF &  rect 
) const

Print Plot2d window.

References myPlot.

◆ processFiltering()

◆ readPreferences()

◆ removeAnalyticalCurve()

void Plot2d_ViewFrame::removeAnalyticalCurve ( Plot2d_AnalyticalCurve theCurve)
virtual

◆ Repaint()

void Plot2d_ViewFrame::Repaint ( )

Redraws viewframe contents

References myPlot, and Plot2d_Plot2d::replot().

◆ selectionColor()

QColor Plot2d_ViewFrame::selectionColor ( ) const

Gets selection color

References mySelectionColor.

◆ setBackgroundColor()

void Plot2d_ViewFrame::setBackgroundColor ( const QColor &  color)
virtual

◆ setCurveTitle()

void Plot2d_ViewFrame::setCurveTitle ( Plot2d_Curve curve,
const QString &  title 
)

Sets curve title

Parameters
curveKey- curve id
title- new title

References setObjectTitle().

◆ setCurveType() [1/2]

void Plot2d_ViewFrame::setCurveType ( int  curveType,
bool  update = true 
)

◆ setCurveType() [2/2]

void Plot2d_ViewFrame::setCurveType ( QwtPlotCurve curve,
int   
)
protected

Sets curve type

References myCurveType.

◆ setEnableAxis()

void Plot2d_ViewFrame::setEnableAxis ( QwtPlot::Axis  theAxis,
bool  isEnable 
)

References myPlot, mySecondY, and yRight.

◆ setFont()

void Plot2d_ViewFrame::setFont ( const QFont &  font,
ObjectType  type,
bool  update = true 
)

Sets font for Plot2d object : title or axis

References MainTitle, myPlot, Plot2d_Plot2d::replot(), XAxis, xBottom, XTitle, Y2Axis, Y2Title, YAxis, yLeft, yRight, and YTitle.

◆ setHorScaleMode()

void Plot2d_ViewFrame::setHorScaleMode ( const int  mode,
bool  update = true 
)

Sets scale mode for horizontal axis: 0 - linear, 1 - logarithmic

References fitAll(), isXLogEnabled(), myPlot, myXMode, Plot2d_Plot2d::setLogScale(), vpModeHorChanged(), SUIT_MessageBox::warning(), and xBottom.

◆ setLegendFont()

void Plot2d_ViewFrame::setLegendFont ( const QFont &  fnt)

Sets legend font

References myLegendFont, and myPlot.

◆ setLegendFontColor()

void Plot2d_ViewFrame::setLegendFontColor ( const QColor &  col)

Sets legend font color

References myLegendColor, and myPlot.

◆ setLegendPos()

void Plot2d_ViewFrame::setLegendPos ( int  pos)

Sets legend position : 0 - left, 1 - right, 2 - top, 3 - bottom

References myLegendPos, and myPlot.

◆ setLegendSymbolType()

void Plot2d_ViewFrame::setLegendSymbolType ( int  type)

Sets legend symbol type : 0 - marker on line, 1 - marker above line

References myLegendSymbolType, myPlot, Plot2d_Plot2d::setLegendSymbolType(), and updateLegend().

◆ setMarkerSize()

void Plot2d_ViewFrame::setMarkerSize ( const int  size,
bool  update = true 
)

Sets new marker size

References getCurves(), myMarkerSize, myPlot, and Plot2d_Plot2d::replot().

◆ setNormLMaxMode()

void Plot2d_ViewFrame::setNormLMaxMode ( bool  mode,
bool  update = true 
)

Sets normalization mode to the global maximum by left Y axis

References fitAll(), myNormLMax, processFiltering(), and vpNormLModeChanged().

◆ setNormLMinMode()

void Plot2d_ViewFrame::setNormLMinMode ( bool  mode,
bool  update = true 
)

Sets normalization mode to the global minimum by left Y axis

References fitAll(), myNormLMin, processFiltering(), and vpNormLModeChanged().

◆ setNormRMaxMode()

void Plot2d_ViewFrame::setNormRMaxMode ( bool  mode,
bool  update = true 
)

Sets normalization mode to the global maximum by right Y axis

References fitAll(), myNormRMax, processFiltering(), and vpNormRModeChanged().

◆ setNormRMinMode()

void Plot2d_ViewFrame::setNormRMinMode ( bool  mode,
bool  update = true 
)

Sets normalization mode to the global minimum by right Y axis

References fitAll(), myNormRMin, processFiltering(), and vpNormRModeChanged().

◆ setObjectTitle()

void Plot2d_ViewFrame::setObjectTitle ( Plot2d_Object object,
const QString &  title 
)

Sets object title

Parameters
object- object id
title- new title

References getPlotObject(), and hasPlotObject().

◆ SetPreference()

◆ setSelectedLegendFontColor()

void Plot2d_ViewFrame::setSelectedLegendFontColor ( const QColor &  col)

Sets selected legend font color

References mySelectedLegendFontColor, and Plot2d_Object::setHighlightedLegendTextColor().

◆ setSelectionColor()

void Plot2d_ViewFrame::setSelectionColor ( const QColor &  color)
virtual

◆ setTitle() [1/2]

void Plot2d_ViewFrame::setTitle ( bool  enabled,
const QString &  title,
ObjectType  type,
bool  update = true 
)

◆ setTitle() [2/2]

void Plot2d_ViewFrame::setTitle ( const QString &  title)

Sets title

References MainTitle, myIsDefTitle, and myTitleEnabled.

◆ setVerScaleMode()

void Plot2d_ViewFrame::setVerScaleMode ( const int  mode,
bool  update = true 
)

Sets scale mode for vertical axis: 0 - linear, 1 - logarithmic

References fitAll(), isYLogEnabled(), myPlot, mySecondY, myYMode, Plot2d_Plot2d::setLogScale(), vpModeVerChanged(), SUIT_MessageBox::warning(), yLeft, and yRight.

◆ setVisualParameters()

◆ setXGrid()

void Plot2d_ViewFrame::setXGrid ( bool  xMajorEnabled,
const int  xMajorMax,
bool  xMinorEnabled,
const int  xMinorMax,
bool  update = true 
)

◆ setXmlVisualParameters()

◆ setYGrid()

void Plot2d_ViewFrame::setYGrid ( bool  yMajorEnabled,
const int  yMajorMax,
bool  yMinorEnabled,
const int  yMinorMax,
bool  y2MajorEnabled,
const int  y2MajorMax,
bool  y2MinorEnabled,
const int  y2MinorMax,
bool  update = true 
)

◆ showLegend()

void Plot2d_ViewFrame::showLegend ( bool  show,
bool  update = true 
)

◆ testOperation()

int Plot2d_ViewFrame::testOperation ( const QMouseEvent &  me)
protected

Tests if it is necessary to start operation on mouse action

References FitAreaId, imageZoomCursor, myPlot, NoOpId, PanId, and ZoomId.

◆ updateAnalyticalCurve()

◆ updateAnalyticalCurves()

◆ updateCurve()

void Plot2d_ViewFrame::updateCurve ( Plot2d_Curve curve,
bool  update = false 
)

Updates curves attributes

References updateObject().

◆ updateLegend() [1/2]

void Plot2d_ViewFrame::updateLegend ( )

update legend

References myPlot.

◆ updateLegend() [2/2]

void Plot2d_ViewFrame::updateLegend ( const Plot2d_Prs prs)

◆ updateObject()

void Plot2d_ViewFrame::updateObject ( Plot2d_Object object,
bool  update = false 
)

◆ updatePlotItem()

◆ updateTitles()

◆ vpCurveChanged

void Plot2d_ViewFrame::vpCurveChanged ( )
signal

◆ vpModeHorChanged

void Plot2d_ViewFrame::vpModeHorChanged ( )
signal

◆ vpModeVerChanged

void Plot2d_ViewFrame::vpModeVerChanged ( )
signal

◆ vpNormLModeChanged

void Plot2d_ViewFrame::vpNormLModeChanged ( )
signal

◆ vpNormRModeChanged

void Plot2d_ViewFrame::vpNormRModeChanged ( )
signal

◆ wheelEvent()

void Plot2d_ViewFrame::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Slot, called when user wheeling mouse

References myPlot, myPnt, mySecondY, Plot2d_Plot2d::replot(), updateAnalyticalCurves(), xBottom, yLeft, yRight, and Plot2d_Plot2d::zoomer().

◆ writePreferences()

Member Data Documentation

◆ myAnalyticalCurves

AnalyticalCurveList Plot2d_ViewFrame::myAnalyticalCurves
protected

◆ myBackground

QColor Plot2d_ViewFrame::myBackground
protected

◆ myCurveType

int Plot2d_ViewFrame::myCurveType
protected

◆ myIntermittentSegmentList

QList<QwtPlotCurve*> Plot2d_ViewFrame::myIntermittentSegmentList
private

◆ myIsDefTitle

bool Plot2d_ViewFrame::myIsDefTitle
protected

◆ myLegendColor

QColor Plot2d_ViewFrame::myLegendColor
protected

◆ myLegendFont

QFont Plot2d_ViewFrame::myLegendFont
protected

◆ myLegendPos

int Plot2d_ViewFrame::myLegendPos
protected

◆ myLegendSymbolType

int Plot2d_ViewFrame::myLegendSymbolType
protected

◆ myLNormAlgo

Plot2d_NormalizeAlgorithm* Plot2d_ViewFrame::myLNormAlgo
protected

◆ myMarkerSize

int Plot2d_ViewFrame::myMarkerSize
protected

◆ myNormLMax

bool Plot2d_ViewFrame::myNormLMax
protected

◆ myNormLMin

bool Plot2d_ViewFrame::myNormLMin
protected

◆ myNormRMax

bool Plot2d_ViewFrame::myNormRMax
protected

◆ myNormRMin

bool Plot2d_ViewFrame::myNormRMin
protected

◆ myObjects

ObjectDict Plot2d_ViewFrame::myObjects
protected

◆ myOperation

int Plot2d_ViewFrame::myOperation
protected

◆ myPlot

Plot2d_Plot2d* Plot2d_ViewFrame::myPlot
protected

◆ myPlot2dCurveList

QList<Plot2d_Curve*> Plot2d_ViewFrame::myPlot2dCurveList
private

◆ myPnt

QPoint Plot2d_ViewFrame::myPnt
protected

◆ myQwtPlotCurveList

QList<QwtPlotItem*> Plot2d_ViewFrame::myQwtPlotCurveList
private

◆ myRNormAlgo

Plot2d_NormalizeAlgorithm* Plot2d_ViewFrame::myRNormAlgo
protected

◆ mySecondY

bool Plot2d_ViewFrame::mySecondY
protected

◆ mySelectedLegendFontColor

QColor Plot2d_ViewFrame::mySelectedLegendFontColor
protected

◆ mySelectionColor

QColor Plot2d_ViewFrame::mySelectionColor
protected

◆ myShowLegend

bool Plot2d_ViewFrame::myShowLegend
protected

◆ myTitle

QString Plot2d_ViewFrame::myTitle
protected

◆ myTitleEnabled

bool Plot2d_ViewFrame::myTitleEnabled
protected

◆ myXDistance

double Plot2d_ViewFrame::myXDistance
protected

◆ myXGridMajorEnabled

bool Plot2d_ViewFrame::myXGridMajorEnabled
protected

◆ myXGridMaxMajor

int Plot2d_ViewFrame::myXGridMaxMajor
protected

◆ myXGridMaxMinor

int Plot2d_ViewFrame::myXGridMaxMinor
protected

◆ myXGridMinorEnabled

bool Plot2d_ViewFrame::myXGridMinorEnabled
protected

◆ myXMode

int Plot2d_ViewFrame::myXMode
protected

◆ myXTitle

QString Plot2d_ViewFrame::myXTitle
protected

◆ myXTitleEnabled

bool Plot2d_ViewFrame::myXTitleEnabled
protected

◆ myY2GridMajorEnabled

bool Plot2d_ViewFrame::myY2GridMajorEnabled
protected

◆ myY2GridMaxMajor

int Plot2d_ViewFrame::myY2GridMaxMajor
protected

◆ myY2GridMaxMinor

int Plot2d_ViewFrame::myY2GridMaxMinor
protected

◆ myY2GridMinorEnabled

bool Plot2d_ViewFrame::myY2GridMinorEnabled
protected

◆ myY2Title

QString Plot2d_ViewFrame::myY2Title
protected

◆ myY2TitleEnabled

bool Plot2d_ViewFrame::myY2TitleEnabled
protected

◆ myYDistance

double Plot2d_ViewFrame::myYDistance
protected

◆ myYDistance2

double Plot2d_ViewFrame::myYDistance2
protected

◆ myYGridMajorEnabled

bool Plot2d_ViewFrame::myYGridMajorEnabled
protected

◆ myYGridMaxMajor

int Plot2d_ViewFrame::myYGridMaxMajor
protected

◆ myYGridMaxMinor

int Plot2d_ViewFrame::myYGridMaxMinor
protected

◆ myYGridMinorEnabled

bool Plot2d_ViewFrame::myYGridMinorEnabled
protected

◆ myYMode

int Plot2d_ViewFrame::myYMode
protected

◆ myYTitle

QString Plot2d_ViewFrame::myYTitle
protected

◆ myYTitleEnabled

bool Plot2d_ViewFrame::myYTitleEnabled
protected

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