Skip to content

Diffractogram Rework for including zoom functionality

Trageser requested to merge issue40 into main

In response to user requests (see issues #60 and #61 (closed)) the Dfgram plot in GUI has been reworked and a naturally zooming functionality has been added."Natural zooming" mean that the user draws a zoom rectangle/box around the area they want to zoom in. The zooming will be done after the release the left mouse button. Unzooming is activated by clicking the right mouse button. This zoom function allows to zoom in already zoom areas.

In the Dfgram plot the user also marks areas of the curve as Baseline and Peak areas. Since this is also done by drawing with the mouse the program needs to switch between Zooming, Adding Peaks, Adding Baseline. Most of the already existing system was used. The only new interaction which was introduced is that clicking right mouse button when the user is either adding baseline or peaks will switch to zoom functionality.

The user can switch into adding Peaks or Baseline very similar to earlier by the "+" button, menu entries or using Ctrl+P, Ctrl+B shortcuts.

To give the user at any time feedback what the next mouse click will do the mouse cursor will change accordingly. For this reason two new images have been added and already existing magnifying glass is used again.

Mouse Cursor for adding Baselines (new): add_baseline

Mouse Cursor for adding Peaks (new): add_peak

Mouse Cursor for zooming/unzooming (old): zoom

Also the menu items for adding Baseline/Peak and the corresponding messagebox with instruction has been removed.

There have been two problems while I was working on this:

  • Apparently Qt6 has problems to create mouse cursors form svg files under winows (under linux it works fine). Best solution I found was to change svg files to png ones. If you have a better solution in mind we can change that
  • While working on this some of the qcr scripts broke. I didnt found any good explanation other than a pure incompatibility since Ive changed the GUI in some places. Recording new scripts in exchanging them works. Question is here if you want go with them or do you want a more detailed process for it. We can create a new issue for this if you like. That is also the reason why I will write a DRAFT in the MR title.

screenshot

Resolves #40 (closed) #61 (closed) #66 (closed)

Edited by Wuttke, Joachim

Merge request reports

Loading