This commit is contained in:
2019-07-02 09:13:47 +02:00
parent a373609b08
commit e22d03a744
20 changed files with 431 additions and 1015 deletions

View File

@@ -25,14 +25,48 @@ SlsQt2DPlotLayout::~SlsQt2DPlotLayout(){
delete the_plot;
}
SlsQt2DPlot* SlsQt2DPlotLayout::GetPlot(){
return the_plot;
}
void SlsQt2DPlotLayout::SetXTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::xBottom)->setTitle(title);
}
void SlsQt2DPlotLayout::SetYTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::yLeft)->setTitle(title);
}
void SlsQt2DPlotLayout::SetZTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::yRight)->setTitle(title);
}
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);
}
void SlsQt2DPlotLayout::Layout(){
if(the_layout) delete the_layout;
the_layout = new QGridLayout(this);
the_layout->addWidget(the_plot,2,0,3,3);
}
void SlsQt2DPlotLayout::KeepZRangeIfSet() {
UpdateZRange(zmin, zmax);
}
@@ -47,7 +81,6 @@ 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();
@@ -68,35 +101,3 @@ void SlsQt2DPlotLayout::UpdateZRange(double min, double max) {
the_plot->Update();
}
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);
}
void SlsQt2DPlotLayout::SetXTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::xBottom)->setTitle(title);
}
void SlsQt2DPlotLayout::SetYTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::yLeft)->setTitle(title);
}
void SlsQt2DPlotLayout::SetZTitle(QString st){
QwtText title(st);
title.setFont(QFont("Sans Serif",11,QFont::Normal));
GetPlot()->axisWidget(QwtPlot::yRight)->setTitle(title);
}