mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-18 17:24:04 +01:00
Address final-review documentation and comment nits
Document the detachable Plot Settings dock in gui_plotting.rst, clarify that the conda recipe builds the Qt6 GUI only, fix stale scale-panel spin-box comments and the unused QDoubleSpinBox include, and generalise the cmk.sh CONDA_PREFIX comment to Qt (not only Qt6). No behaviour change; the pre-existing auto-z panel override (review L2) remains documented as a non-blocking observation.
This commit is contained in:
1 parent
250d3ce1e4
commit
c7eaa85131
6 files changed
+23
-12
No files matched your search
@@ -300,7 +300,8 @@ conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# create environment to compile (qt6-main is the Qt 6 base package on conda-forge; use qt-main for Qt 5)
|
||||
# create environment to compile (qt6-main is the Qt 6 base package on conda-forge)
|
||||
# The packaged conda recipe builds the Qt 6 GUI; for Qt 5 use the system Qt 5 packages.
|
||||
conda create -n slsgui zeromq gxx_linux-64 qt6-main
|
||||
|
||||
# activate environment
|
||||
|
||||
@@ -294,9 +294,9 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Qt6 from conda-forge: cmake does not search $CONDA_PREFIX by itself when
|
||||
# Qt from conda-forge: cmake does not search $CONDA_PREFIX by itself when
|
||||
# the environment does not export CMAKE_PREFIX_PATH. Only add the hint for
|
||||
# the GUI build so a plain `./cmk.sh -cbgjN` works in a conda environment.
|
||||
# the GUI build so a plain `./cmk.sh -cbgjN` / `-cbGjN` works in a conda env.
|
||||
if [ $GUI -eq 1 ] && [ -n "${CONDA_PREFIX:-}" ] && [ -z "${CMAKE_PREFIX_PATH:-}" ]; then
|
||||
CMAKE_POST+=" -DCMAKE_PREFIX_PATH=$CONDA_PREFIX"
|
||||
echo "Using CMAKE_PREFIX_PATH from CONDA_PREFIX: $CONDA_PREFIX"
|
||||
|
||||
@@ -90,6 +90,15 @@ moment (the producer keeps feeding new frames), and the cursor-to-value mapping
|
||||
uses the pressed-time window so the marker cannot chase itself. The new range
|
||||
is applied once, on release, and the strip is refreshed afterwards.
|
||||
|
||||
Detachable Plot settings
|
||||
------------------------
|
||||
|
||||
The Plot settings tab can be detached into a movable/floating dock with
|
||||
**View -> Detach Plot Settings**. The tab contents are reparented between two
|
||||
``QScrollArea`` widgets (the tab and the dock), so the same ``qTabPlot``
|
||||
instance keeps working while the rest of the main window is busy starting or
|
||||
stopping an acquisition. Selecting the action again reattaches the tab.
|
||||
|
||||
Demo and tests
|
||||
--------------
|
||||
|
||||
|
||||
@@ -367,7 +367,8 @@ With cmk.sh, use ``-g`` for Qt 5 and ``-G`` for Qt 6:
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# create environment to compile (qt6-main is the Qt 6 base package on conda-forge; use qt-main for Qt 5)
|
||||
# create environment to compile (qt6-main is the Qt 6 base package on conda-forge)
|
||||
# The packaged conda recipe builds the Qt 6 GUI; for Qt 5 use the system Qt 5 packages.
|
||||
conda create -n slsgui zeromq gxx_linux-64 qt6-main
|
||||
|
||||
# activate environment
|
||||
|
||||
@@ -125,7 +125,7 @@ void SlsQt2DHist::SetMinMax(double zmin, double zmax) {
|
||||
}
|
||||
if (!haveFinite) {
|
||||
// No usable value at all: keep a valid, harmless range so the colour
|
||||
// mapping and the scale-panel spin boxes stay finite.
|
||||
// mapping and the scale-panel control range stay finite.
|
||||
z_min = 0.0;
|
||||
z_max = 1.0;
|
||||
z_mean = 0.0;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QElapsedTimer>
|
||||
#include <QHash>
|
||||
#include <QSet>
|
||||
@@ -917,7 +916,8 @@ void PlottingTest::scalePanelReentrancy() {
|
||||
// view -> controls -> view must not recurse (sympass guard): one change,
|
||||
// one control update, no push-back loop. The min/max spin boxes were
|
||||
// removed from the plot window; the range is owned by the Plot tab, so
|
||||
// the panel only keeps the last range it read from/wrote to the view.
|
||||
// the panel only keeps the last range it read from/wrote to the view
|
||||
// (controlRange(), not spin-box widgets).
|
||||
int rangeCalls = 0;
|
||||
view.onColorRangeChanged = [&](double, double) { rangeCalls++; };
|
||||
panel.setColorRange(1.0, 5.0);
|
||||
@@ -1037,12 +1037,12 @@ void PlottingTest::scalePanelFreezeAndPushRules() {
|
||||
panel.refresh();
|
||||
panel.controlRange(lo, hi);
|
||||
QVERIFY2(near(lo, 1.0) && near(hi, 5.0),
|
||||
"spin boxes frozen while the strip marker is dragged (R1)");
|
||||
"control range frozen while the strip marker is dragged (R1)");
|
||||
view.setColorRange(3.0, 9.0);
|
||||
panel.refresh();
|
||||
panel.controlRange(lo, hi);
|
||||
QVERIFY2(near(lo, 1.0) && near(hi, 5.0),
|
||||
"spin boxes still frozen after a second live range change (R1)");
|
||||
"control range still frozen after a second live range change (R1)");
|
||||
double dw0 = 0.0, dw1 = 0.0;
|
||||
strip->displayedWindow(dw0, dw1);
|
||||
QVERIFY(near(dw0, frozenW0) && near(dw1, frozenW1));
|
||||
@@ -1067,9 +1067,9 @@ void PlottingTest::scalePanelFreezeAndPushRules() {
|
||||
QVERIFY(std::abs(lo - vlo) <= 0.051);
|
||||
QVERIFY(std::abs(hi - vhi) <= 0.051);
|
||||
|
||||
// R2: palette/log changes must NOT push the 1-decimal-rounded spin boxes
|
||||
// into the view (that would fire onColorRangeChanged and pin the 2D
|
||||
// panel override). Only a real min/max edit may change the range.
|
||||
// R2: palette/log changes must NOT push the control range into the view
|
||||
// (that would fire onColorRangeChanged and pin the 2D panel override).
|
||||
// Only an explicit control-range edit may change the range.
|
||||
view.setColorRange(0.408939, 40.8); // e.g. SlsQt2DPlot's auto z range
|
||||
view.repaint();
|
||||
const int callsBefore = rangeCalls;
|
||||
|
||||
Reference in new issue
Block a user