Skip to content

Commit d3e166a

Browse files
committed
re-enable plot control widgets on Experiment and Analysis tabs
1 parent 6e1d793 commit d3e166a

2 files changed

Lines changed: 100 additions & 2 deletions

File tree

‎EasyReflectometryApp/Gui/Pages/Experiment/Sidebar/Advanced/Groups/PlotControl.qml‎

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,59 @@
33
// © 2025 Contributors to the EasyReflectometry project <https://github.com/easyscience/EasyReflectometry>
44

55
import QtQuick
6+
import QtQuick.Controls
67

78
import EasyApp.Gui.Style as EaStyle
89
import EasyApp.Gui.Elements as EaElements
910

10-
import Gui as Gui
11+
import Gui.Globals as Globals
1112

1213
EaElements.GroupBox {
1314
title: qsTr("Plot control")
1415
collapsed: true
1516

16-
Gui.PlotControlRefLines {}
17+
Column {
18+
spacing: EaStyle.Sizes.fontPixelSize * 0.5
19+
20+
EaElements.CheckBox {
21+
topPadding: 0
22+
checked: Globals.BackendWrapper.plottingPlotRQ4
23+
text: qsTr("Plot R(q)×q⁴")
24+
ToolTip.text: qsTr("Checking this box will plot R(q) multiplied by q⁴")
25+
onToggled: {
26+
Globals.BackendWrapper.plottingTogglePlotRQ4()
27+
}
28+
}
29+
30+
EaElements.CheckBox {
31+
topPadding: 0
32+
checked: Globals.Variables.logarithmicQAxis
33+
text: qsTr("Logarithmic q-axis")
34+
ToolTip.text: qsTr("Checking this box will make the q-axis logarithmic")
35+
onToggled: {
36+
Globals.Variables.logarithmicQAxis = checked
37+
}
38+
}
39+
40+
EaElements.CheckBox {
41+
topPadding: 0
42+
checked: Globals.BackendWrapper.plottingScaleShown
43+
text: qsTr("Show scale line")
44+
ToolTip.text: qsTr("Checking this box will show the scale reference line on the plot")
45+
onToggled: {
46+
Globals.BackendWrapper.plottingFlipScaleShown()
47+
}
48+
}
49+
50+
EaElements.CheckBox {
51+
topPadding: 0
52+
checked: Globals.BackendWrapper.plottingBkgShown
53+
text: qsTr("Show background line")
54+
ToolTip.text: qsTr("Checking this box will show the background reference line on the plot")
55+
onToggled: {
56+
Globals.BackendWrapper.plottingFlipBkgShown()
57+
}
58+
}
59+
}
1760
}
1861

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-FileCopyrightText: 2025 EasyReflectometry contributors <support@easyreflectometry.org>
2+
// SPDX-License-Identifier: BSD-3-Clause
3+
// © 2025 Contributors to the EasyReflectometry project <https://github.com/easyscience/EasyReflectometry>
4+
5+
import QtQuick
6+
import QtQuick.Controls
7+
8+
import EasyApp.Gui.Style as EaStyle
9+
import EasyApp.Gui.Elements as EaElements
10+
11+
import Gui.Globals as Globals
12+
13+
Column {
14+
spacing: EaStyle.Sizes.fontPixelSize * 0.5
15+
16+
EaElements.CheckBox {
17+
topPadding: 0
18+
checked: Globals.BackendWrapper.plottingPlotRQ4
19+
text: qsTr("Plot R(q)×q⁴")
20+
ToolTip.text: qsTr("Checking this box will plot R(q) multiplied by q⁴")
21+
onToggled: {
22+
Globals.BackendWrapper.plottingTogglePlotRQ4()
23+
}
24+
}
25+
26+
EaElements.CheckBox {
27+
topPadding: 0
28+
checked: Globals.Variables.logarithmicQAxis
29+
text: qsTr("Logarithmic q-axis")
30+
ToolTip.text: qsTr("Checking this box will make the q-axis logarithmic")
31+
onToggled: {
32+
Globals.Variables.logarithmicQAxis = checked
33+
}
34+
}
35+
36+
EaElements.CheckBox {
37+
topPadding: 0
38+
checked: Globals.BackendWrapper.plottingScaleShown
39+
text: qsTr("Show scale line")
40+
ToolTip.text: qsTr("Checking this box will show the scale reference line on the plot")
41+
onToggled: {
42+
Globals.BackendWrapper.plottingFlipScaleShown()
43+
}
44+
}
45+
46+
EaElements.CheckBox {
47+
topPadding: 0
48+
checked: Globals.BackendWrapper.plottingBkgShown
49+
text: qsTr("Show background line")
50+
ToolTip.text: qsTr("Checking this box will show the background reference line on the plot")
51+
onToggled: {
52+
Globals.BackendWrapper.plottingFlipBkgShown()
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)