v1.0.0-rc.81
This commit is contained in:
@@ -33,6 +33,11 @@ JFJochViewerSidePanel::JFJochViewerSidePanel(QWidget *parent) : QWidget(parent)
|
||||
|
||||
connect(spotToggleCheckBox, &QCheckBox::toggled, this, &JFJochViewerSidePanel::spotsToggled);
|
||||
|
||||
auto highlightIceRingToggleCheckBox = new QCheckBox("Highlight ice rings", this);
|
||||
highlightIceRingToggleCheckBox->setCheckState(Qt::CheckState::Unchecked);
|
||||
layout->addWidget(highlightIceRingToggleCheckBox);
|
||||
connect(highlightIceRingToggleCheckBox, &QCheckBox::toggled, this,&JFJochViewerSidePanel::highlightIceRingsToggled);
|
||||
|
||||
auto predictionsToggleCheckBox = new QCheckBox("Show predictions", this);
|
||||
predictionsToggleCheckBox->setCheckState(Qt::CheckState::Unchecked);
|
||||
|
||||
@@ -109,17 +114,45 @@ JFJochViewerSidePanel::JFJochViewerSidePanel(QWidget *parent) : QWidget(parent)
|
||||
chart, &JFJochViewerSidePanelChart::loadImage);
|
||||
|
||||
layout->addWidget(new TitleLabel("Data analysis (experimental)", this));
|
||||
|
||||
auto findSpotsButton = new QPushButton("Find spots", this);
|
||||
connect(findSpotsButton, &QPushButton::clicked,[this] {emit findSpots();});
|
||||
layout->addWidget(findSpotsButton);
|
||||
|
||||
auto analyzeButton = new QPushButton("Full analysis", this);
|
||||
connect(analyzeButton, &QPushButton::clicked,[this] {emit analyze();});
|
||||
layout->addWidget(analyzeButton);
|
||||
|
||||
auto findBeamCenterButton = new QPushButton("Calibrate detector (LaB6)", this);
|
||||
connect(findBeamCenterButton, &QPushButton::clicked,[this] {emit findBeamCenter();});
|
||||
layout->addWidget(findBeamCenterButton);
|
||||
|
||||
// Add preset ice rings button below LaB6 calibration
|
||||
auto iceRingsButton = new QPushButton("Add ice rings (manual)", this);
|
||||
connect(iceRingsButton, &QPushButton::clicked, this, [this]() {
|
||||
// Set manual rings and enable display
|
||||
const QVector<float> ice_rings(ICE_RING_RES_A.begin(), ICE_RING_RES_A.end());
|
||||
setRings(ice_rings);
|
||||
});
|
||||
layout->addWidget(iceRingsButton);
|
||||
|
||||
layout->addStretch();
|
||||
setLayout(layout); // Set the layout to the widget
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanel::setRings(const QVector <float> &v) {
|
||||
QString txt;
|
||||
for (float i : v) {
|
||||
txt += QString::number(i, 'f', 3) + ",";
|
||||
}
|
||||
|
||||
resRingsCheckBox->setChecked(true);
|
||||
autoResRingsCheckBox->setChecked(false);
|
||||
res_rings_edit->setEnabled(true);
|
||||
res_rings_edit->setText(txt);
|
||||
emit setResRings(v);
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanel::enableAutoResRings(bool input) {
|
||||
res_rings_edit->setEnabled(!input); // Enable line edit only if "Auto Res Rings" is unchecked
|
||||
if (input) {
|
||||
@@ -180,3 +213,7 @@ void JFJochViewerSidePanel::enableResRings(bool input) {
|
||||
void JFJochViewerSidePanel::saturatedPixelsToggled(bool input) {
|
||||
emit showSaturatedPixels(input);
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanel::highlightIceRingsToggled(bool input) {
|
||||
emit highlightIceRings(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user