#include "SPlot2d_ViewModel.h"
#include "Plot2d_ViewFrame.h"
-#include "Plot2d_ViewModel.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
{
if (MYDEBUG) MESSAGE("XYPlot_i::XYPlot_i");
if (theApplication) {
- myViewManager = ProcessEvent(new TNewSpecViewEvent<Plot2d_Viewer>(theApplication));
+ myViewManager = ProcessEvent(new TNewSpecViewEvent<SPlot2d_Viewer>(theApplication));
}
}
protected:
Plot2d_ViewFrame* myView;
TFun myFun;
- CORBA::Boolean myMajor, myNumMajor;
- CORBA::Boolean myMinor, myNumMinor;
+ CORBA::Boolean myMajor, myMinor;
+ CORBA::Long myNumMajor, myNumMinor;
};
void XYPlot_i::EnableXGrid (CORBA::Boolean theMajor, CORBA::Long theNumMajor,
void XYPlot_i::EnableYGrid(CORBA::Boolean theMajor, CORBA::Long theNumMajor,
CORBA::Boolean theMinor, CORBA::Long theNumMinor)
{
- //jfa tmp:ProcessVoidEvent(new TEnableGridEvent(myView,&Plot2d_ViewFrame::setYGrid,
- //jfa tmp: theMajor,theNumMajor,theMinor,theNumMinor));
+ //asl: Plot2d_ViewFrame::setYGrid has more parameters
+ //ProcessVoidEvent(new TEnableGridEvent(myView,&Plot2d_ViewFrame::setYGrid,
+ // theMajor,theNumMajor,theMinor,theNumMinor));
}
class TSetScaleModeEvent: public SALOME_Event
ProcessVoidEvent(new TVoidMemFunEvent<Plot2d_ViewFrame> (myView,&Plot2d_ViewFrame::fitAll));
}
+ class TFitRangeEvent: public SALOME_Event
+ {
+ public:
+ TFitRangeEvent (Plot2d_ViewFrame* theView,
+ const int mode,
+ const double xMin, const double xMax,
+ const double yMin, const double yMax):
+ myView(theView),
+ myMode(mode),
+ myXMin(xMin),myXMax(xMax),
+ myYMin(yMin),myYMax(yMax)
+ {}
+ virtual void Execute()
+ {
+ myView->fitData(myMode,myXMin,myXMax,myYMin,myYMax);
+ }
+ protected:
+ const int myMode;
+ const double myXMin;
+ const double myXMax;
+ const double myYMin;
+ const double myYMax;
+ Plot2d_ViewFrame* myView;
+ };
+
+ void XYPlot_i::FitXRange(const CORBA::Double xMin,const CORBA::Double xMax)
+ {
+ const CORBA::Long mode = 1;
+ const CORBA::Double yMin = 0.0;
+ const CORBA::Double yMax = 0.0;
+ ProcessVoidEvent(new TFitRangeEvent(myView,mode,xMin,xMax,yMin,yMax));
+ }
+
+ void XYPlot_i::FitYRange(const CORBA::Double yMin,const CORBA::Double yMax)
+ {
+ const CORBA::Long mode = 2;
+ const CORBA::Double xMin = 0.0;
+ const CORBA::Double xMax = 0.0;
+ ProcessVoidEvent(new TFitRangeEvent(myView,mode,xMin,xMax,yMin,yMax));
+ }
+
+ void XYPlot_i::FitRange(const CORBA::Double xMin,const CORBA::Double xMax,
+ const CORBA::Double yMin,const CORBA::Double yMax)
+ {
+ const CORBA::Long mode = 0;
+ ProcessVoidEvent(new TFitRangeEvent(myView,mode,xMin,xMax,yMin,yMax));
+ }
+
+ void XYPlot_i::GetFitRanges(double& xMin, double& xMax, double& yMin, double& yMax)
+ {
+ double y2Min,y2Max;
+ myView->getFitRanges(xMin,xMax,yMin,yMax,y2Min,y2Max);
+ }
//===========================================================================
TableView_i::TableView_i (SalomeApp_Application* theApplication)