mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
WIP
This commit is contained in:
@ -373,9 +373,9 @@ void qDrawPlot::Initialization() {
|
||||
connect(this, SIGNAL(UpdatePlotSignal()), this, SLOT(UpdatePlot()));
|
||||
connect(this, SIGNAL(InterpolateSignal(bool)), plot2D, SIGNAL(InterpolateSignal(bool)));
|
||||
connect(this, SIGNAL(ContourSignal(bool)), plot2D, SIGNAL(ContourSignal(bool)));
|
||||
connect(this, SIGNAL(LogzSignal(bool)), plot2D, SLOT(SetZScaleToLog(bool)));
|
||||
connect(this, SIGNAL(LogzSignal(bool)), plot2D, SIGNAL(LogzSignal(bool))));
|
||||
connect(this, SIGNAL(LogySignal(bool)), plot1D, SLOT(SetLogY(bool)));
|
||||
connect(this, SIGNAL(ResetZMinZMaxSignal(bool, bool, double, double)), plot2D, SLOT(ResetZMinZMax(bool, bool, double, double)));
|
||||
connect(this, SIGNAL(ResetZMinZMaxSignal(bool, bool, double, double)), plot2D, SLOT(SetZRange(bool, bool, double, double)));
|
||||
|
||||
connect(this, SIGNAL(AcquisitionErrorSignal(QString)), this, SLOT(ShowAcquisitionErrorMessage(QString)));
|
||||
|
||||
@ -1425,7 +1425,7 @@ void qDrawPlot::UpdatePlot() {
|
||||
plot2D->SetXTitle(imageXAxisTitle);
|
||||
plot2D->SetYTitle(imageYAxisTitle);
|
||||
plot2D->SetZTitle(imageZAxisTitle);
|
||||
plot2D->UpdateNKeepSetRangeIfSet(); //keep a "set" z range, and call Update();
|
||||
plot2D->KeepZRangeIfSet(); //keep a "set" z range, and call Update();
|
||||
if (gainPlotEnable) {
|
||||
gainplot2D->GetPlot()->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, startPixel, endPixel, gainImageArray);
|
||||
gainplot2D->setTitle(GetImageTitle());
|
||||
@ -1734,7 +1734,7 @@ void qDrawPlot::DisableZoom(bool disable) {
|
||||
plot2D->SetXTitle("Pixel");
|
||||
plot2D->SetYTitle("Pixel");
|
||||
plot2D->SetZTitle("Trimbits");
|
||||
plot2D->UpdateNKeepSetRangeIfSet();
|
||||
plot2D->KeepZRangeIfSet();
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Trimbits Plot updated" <<'\n';
|
||||
#endif
|
||||
|
@ -562,46 +562,16 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
|
||||
|
||||
|
||||
void qTabPlot::SetZRange() {
|
||||
emit ResetZMinZMaxSignal(
|
||||
(chkZMin->isChecked() && CheckZRange(dispZMin->text())),
|
||||
(chkZMax->isChecked() && CheckZRange(dispZMax->text())),
|
||||
dispZMin->text().toDouble(),
|
||||
dispZMax->text().toDouble());
|
||||
}
|
||||
|
||||
|
||||
void qTabPlot::EnableZRange() {
|
||||
|
||||
disconnect(dispZMin, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
||||
disconnect(dispZMax, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
||||
|
||||
dispZMin->setEnabled(chkZMin->isChecked());
|
||||
dispZMax->setEnabled(chkZMax->isChecked());
|
||||
emit ResetZMinZMaxSignal(
|
||||
(chkZMin->isChecked() && CheckZRange(dispZMin->text())),
|
||||
(chkZMax->isChecked() && CheckZRange(dispZMax->text())),
|
||||
dispZMin->text().toDouble(),
|
||||
dispZMax->text().toDouble());
|
||||
|
||||
connect(dispZMin, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
||||
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
||||
}
|
||||
|
||||
|
||||
bool qTabPlot::CheckZRange(QString value) {
|
||||
if (value.isEmpty())
|
||||
return false;
|
||||
|
||||
bool ok;
|
||||
value.toDouble(&ok);
|
||||
if (!ok) {
|
||||
qDefs::Message(qDefs::WARNING, "<nobr>Check Z Range</nobr><br><nobr>"
|
||||
"Zmin and Zmax should be in double</nobr>",
|
||||
"qTabPlot::CheckZRange");
|
||||
return false;
|
||||
bool isZmin = chkZMin->isChecked();
|
||||
bool isZmax = chkZMax->isChecked();
|
||||
double zmin = 0, zmax = 1;
|
||||
if (!dispZMin->text().empty()) {
|
||||
zmin = dispZMin->text().toDouble();
|
||||
}
|
||||
|
||||
return true;
|
||||
if (!dispZMax->text().empty()) {
|
||||
zmax = dispZMax->text().toDouble();
|
||||
}
|
||||
emit ResetZMinZMaxSignal(isZmin, isZmax, zmin, zmax);
|
||||
}
|
||||
|
||||
|
||||
@ -679,8 +649,6 @@ bool qTabPlot::CheckZRange(QString value) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user