Removed unused constructors
Replaced raw pointer with a unique_ptr to clearly pass ownership.
Fixed a bug where we compared if a signed integer is negative (it never is).
Fixed a case where we take the pointer to a pointer we de-reference!
warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
warning C4805: '!=': unsafe mix of type 'int' and type 'bool' in operation
warning C4305: 'argument': truncation from 'double' to 'float'
Remove the following types of build warnings:
warning C4189: local variable is initialized but not referenced
warning C4100: unreferenced parameter
warning C4101: unreferenced local variable
I have only commented out unused variables and used [[maybe_unused]] for unused parameters.
Added support to
* filter workouts by multiple metrics
* rate and tag workouts
* view detailed information about the selected workout
* Preserving user-content in trainDB on rescan for workouts
Fixes#411
QFontMetrics::width was deprecated. This patch replaces all usages
by QFontMetrics::horizontalAdvance.
It also replace three usages of QTextEdit::setTabStopWidth
by QTestEdit::setTabStopDistance.
Changed the background to a lighter color to get the cursor visible again. To achive a good contrast, the text color for the selected line is now black. This combination works for dark and light mode.
.. annotate(hline|vline, "text", style, value) to add a horizontal or
vertical line to the plot for the current series on a UserChart.
style is one of solid, dash, dot, dashdot or dashdotdot which are
the standard Qt pen styles for drawing lines.
I also took the opportunity to refactor how annotations are passed
from the datafilter down to the generic plot. This should make it
far easier to add annotations in the future.
.. fixed a SEGV in the voronoi annotation, which was related to memory
management and the sqrt_nsites variable (honestly, I am amazed it
ever worked).
.. labels in Python and R charts are now broken, will fixup shortly when
worked out how it should work (annotations are related to a series).
.. updated to have a more Qt/C++ friendly interface:
Voronoi *test = new Voronoi();
test->addSite(QPointF(2,5));
test->addSite(QPointF(3,2));
test->addSite(QPointF(6,4));
test->run(QRectF());
delete test;
the output is still written to standard out as a
series of points, lines, vertexes and edges. This
was to enable validation against the original
c program.
.. whilst the original functionality is now embedded a
further update will need to convert the output into
a vector of lines to draw.
will do this as part of adding it to a plot as an
annotation.
.. from C to a C++ class.
Moved the original code to a sundirectory for reference and
moved all the global variables and methods into a new class
called Voronoi.
.. the code still needs more work but wanted to remove the global
variables as there were lots and a big risk they interact
with other parts of the codebase and libraries.
.. kmeans(centers|assignments, k, dim1, dim2 .. dimn)
perform a k means cluster on data with multiple dimensions
and return the centers, or the assignments.
the return values are ordered so they can be displayed
easily in an overview table e.g.
values {
kmeans(centers, 3, metrics(TSS), metrics(IF));
}
.. will look at how we might plot these in charts with either
color coding of points or perhaps voronoi diagrams.
.. with grateful thanks to Greg Hamerly
A fast kmeans algorithm described here:
https://epubs.siam.org/doi/10.1137/1.9781611972801.12
The source repository is also here:
https://github.com/ghamerly/fast-kmeans
NOTE:
The original source has been included largely as-is with
a view to writing a wrapper around it using Qt semantics
for use in GoldenCheetah (e.g. via datafilter)
The original source included multiple kmeans algorithms
we have only kept the `fast' Hamerly variant.
.. the side bar, bottom bar and related buttons were still
following a skeuomorphic design that has long since
fallen into disuse.
.. now have a more muted feel with hover/press colors active
on mouse events.
.. moved the whatsthis button to the far right since this
is quite a common placement in other apps.
.. it is noticeable how we use many many different schemes
for hover/pressed colors across the UI- at some point
this should be unified.
.. also deprecated the segmentcontrol.
.. Makes it easier to identify code that has been snaffled in from
other repositories and check licensing
.. The httpserver is now no longer optional, since it is delivered
as contributed source.
- Fortius read was timing out on some hardware
- If read fails then write fails
- Moved write before read to rectify
- Added windows 10 x64 compatible driver inf built with Zadig
... removing tests,... from LIBKML build
... allowing building of base functionality of LIBKML on Windows with MinGW
... covering the LIBKML functional scope used by GoldenCheetah