1.0.0-rc.87
This commit is contained in:
@@ -24,8 +24,8 @@ JFJochViewerSidePanelChart::JFJochViewerSidePanelChart(QWidget *parent) : QWidge
|
||||
azint_image = new JFJochAzIntImageView(this);
|
||||
|
||||
stack = new QStackedWidget(this);
|
||||
stack->addWidget(azint_plot); // index 0
|
||||
stack->addWidget(azint_image); // index 1
|
||||
stack->addWidget(azint_plot); // index 0
|
||||
stack->addWidget(azint_image); // index 1
|
||||
layout->addWidget(stack);
|
||||
|
||||
setLayout(layout);
|
||||
@@ -44,7 +44,8 @@ void JFJochViewerSidePanelChart::comboBoxSelected(int val) {
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
std::vector<float> x,y;
|
||||
std::vector<float> x, y;
|
||||
bool one_over_x = false;
|
||||
if (image) {
|
||||
auto index = combo_box->currentIndex();
|
||||
switch (combo_box->itemData(index).toInt()) {
|
||||
@@ -53,12 +54,14 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
y = image->GetAzInt1D();
|
||||
break;
|
||||
case 1:
|
||||
x = image->ImageData().integration_one_over_d;
|
||||
y = image->ImageData().integration_logI;
|
||||
x = image->ImageData().integration_B_one_over_d;
|
||||
y = image->ImageData().integration_B_logI;
|
||||
one_over_x = true;
|
||||
break;
|
||||
case 2:
|
||||
x = image->ImageData().integration_one_over_d;
|
||||
x = image->ImageData().integration_Isigma_one_over_d;
|
||||
y = image->ImageData().integration_Isigma;
|
||||
one_over_x = true;
|
||||
break;
|
||||
case 4:
|
||||
x = image->Dataset().experiment.GetFluorescenceSpectrum().GetEnergy_eV();
|
||||
@@ -83,7 +86,7 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
}
|
||||
}
|
||||
if (!x.empty() && !y.empty()) {
|
||||
azint_plot->UpdateData(x,y);
|
||||
azint_plot->UpdateData(x, y, one_over_x);
|
||||
} else {
|
||||
azint_plot->ClearData();
|
||||
}
|
||||
@@ -92,4 +95,4 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
void JFJochViewerSidePanelChart::loadImage(std::shared_ptr<const JFJochReaderImage> in_image) {
|
||||
image = in_image;
|
||||
redrawPlot();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user