This commit is contained in:
2019-06-27 11:54:17 +02:00
parent 61b937e2e0
commit 06834617de
13 changed files with 428 additions and 409 deletions

View File

@ -18,7 +18,6 @@ SlsQt2DPlotLayout::SlsQt2DPlotLayout(QWidget *parent):QGroupBox(parent){
isZmin = false;
isZmax = false;
Layout();
ConnectSignalsAndSlots();
}
SlsQt2DPlotLayout::~SlsQt2DPlotLayout(){
@ -32,11 +31,7 @@ void SlsQt2DPlotLayout::Layout(){
the_layout->addWidget(the_plot,2,0,3,3);
}
void SlsQt2DPlotLayout::ConnectSignalsAndSlots(){
connect(this, SIGNAL(InterpolateSignal(bool)), the_plot, SLOT(InterpolatedPlot(bool)));
connect(this, SIGNAL(ContourSignal(bool)), the_plot, SLOT(showContour(bool)));
connect(this, SIGNAL(LogzSignal(bool)), this, SLOT(SetZScaleToLog(bool)));
}
void SlsQt2DPlotLayout::KeepZRangeIfSet() {
UpdateZRange(zmin, zmax);
@ -52,6 +47,7 @@ void SlsQt2DPlotLayout::SetZRange(bool isMin, bool isMax, double min, double max
UpdateZRange(min, max);
}
void SlsQt2DPlotLayout::UpdateZRange(double min, double max) {
if(isLog) {
the_plot->SetZMinimumToFirstGreaterThanZero();
@ -72,8 +68,15 @@ void SlsQt2DPlotLayout::UpdateZRange(double min, double max) {
the_plot->Update();
}
void SlsQt2DPlotLayout::SetZScaleToLog(bool enable) {
FILE_LOG(logINFO) << (enable ? "Enabling" : "Disabling") << " Z Scale to log";
void SlsQt2DPlotLayout::SetInterpolate(bool enable) {
the_plot->InterpolatedPlot(enable);
}
void SlsQt2DPlotLayout::SetContour(bool enable) {
the_plot->showContour(enable);
}
void SlsQt2DPlotLayout::SetLogz(bool enable) {
isLog = enable;
the_plot->LogZ(enable);
SetZRange(isZmin, isZmax, zmin, zmax);