* 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.
* changed font sizes to better values
* rename gui_templates.h to FontHelper.h
* replace hardcoded values with constants
* make knob labels use small font
* code review from michael
* more consolidation
* Fix text problem in Vectorscope
Fix a problem with cutoff text in Vectorscope. During the constructor
call of `LedCheckBox` the method `LedCheckBox::onTextUpdated` is
triggered which sets a fixed size that fits the pixmap and the text.
After instantiating the two instances in `VecControlsDialog` the
constructor then set a minimum size which overrode the fixed size that
was previously set. This then led to text that was cutoff.
---------
Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de>
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
* Update ringbuffer submodule to fix includes
* Remove cyclic includes
* Remove Qt include prefixes
* Include C++ versions of C headers
E.g.: assert.h -> cassert
* Move CLIP_BORDER_WIDTH into ClipView
This allows to remove includes to TrackView.h in ClipView cpp files.
* Elliminate useless includes
This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):
```
include-what-you-use;
-Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
-Xiwyu;--keep=*/xmmintrin.h;
-Xiwyu;--keep=*/lmmsconfig.h;
-Xiwyu;--keep=*/weak_libjack.h;
-Xiwyu;--keep=*/sys/*;
-Xiwyu;--keep=*/debug.h;
-Xiwyu;--keep=*/SDL/*;
-Xiwyu;--keep=*/alsa/*;
-Xiwyu;--keep=*/FL/x.h;
-Xiwyu;--keep=*/MidiApple.h;
-Xiwyu;--keep=*/MidiWinMM.h;
-Xiwyu;--keep=*/AudioSoundIo.h
```
* Fixup: Remove empty #if-#ifdef pairs
* Remove LMMS_HAVE_STD(LIB|INT)_H