Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix rendering for Vectorscope The rendering of the Vectorscope is broken on Wayland if the size of the Vectorscope is increased. This is caused by using a `QImage` to render the scope traces which is then scaled up. Introduce a new way to paint the vector scope (goniometer) which simply paints lines or points that progressively get dimmer and which does not make use of a QImage anymore. It supports the following features: * Log mode * Zooming * Rendering the drawing performance * Selecting a different color for the traces It does not support: * HQ Mode: The new implementation provides a performance that's equivalent to Non-HQ mode and look similar or better than the HQ mode. * Blurring of old data * Persistence: Might be implemented by using a factor for the dimming Rendering of the samples/trances uses the composition mode "Plus" so that overlapping elements will appear like adding brightness. Painting the grid and lines is done using the normal composition mode "Source Over" so that it simply replaces existing pixels. Painting of the lines/points and the grids and lines is done in a "signal space", i.e. a transform where elements in the interval of [-1, 1] feel "natural". The text is painted in "widget space". * Remove old implementation Remove HQ mode and persistence. Also remove the legacy option again. This removes the models, loading, saving and the GUI controls. Remove all unnecessary members from `VectorView`, adjust the constructor. Move the implementation of `paintLinesMode` into `paintEvent`. Remove methods `paintLegacyMode` and `paintLinesMode`. * Move colors into VectorView Move the colors out of `VecControls` into `VectorView` as they are related to presentation. * Remove friend relationship to VectorView Remove a friend relationship to `VectorView` from `VecControls` by introducing const getters for the models. * Remove VectorView::m_visible Remove the unnecessary member `m_visible` from `VectorView`. It was not initialized and only written to but never read. * Make Vectorscope themeable Make the Vectorscope themeable by introducing Qt properties for the relevant colors. The default theme gets the values from the code whereas the classic theme gets a trace with amber color. * Rename m_colorFG Rename `m_colorFG` to `m_colorTrace`. Adjust the Qt property accordingly. Remove local variable `traceColor` from paint method and use member `m_colorTrace` directly. * Remove m_colorOutline Remove unused member `m_colorOutline`. * Fix horizontal lines on silence Fix the horizontal lines that are rendered on silence. They seem to be produced when rendering lines that start and end at the same point. Therefore we only draw a point if the current and last point are the same. * Add some margin to the VectorView Add some margin to the rendering of the `VectorView` so that the circle does not touch the bounary of the widget. * Clean up the layout of the Vectorscope Clean up the layout of the Vectorscope. The checkboxes are not put on top of the vector view anymore but are organized in a horizontal layout beneath it. This gives a much tidier look.
- Loading branch information