summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/spline-widget.cpp
AgeCommit message (Collapse)Author
2017-01-29spline-widget: actually use the [xy]_step propertiesStanislaw Halik
2017-01-29spline-widget: fix swapped [xy]stepStanislaw Halik
2017-01-29spline-widget: draw standard background colorStanislaw Halik
2017-01-29spline-widget: remove camel caseStanislaw Halik
My eyes bleed a bit less
2016-12-28spline-widget: speculative valgrind changeStanislaw Halik
2016-12-08spline-widget: improve preview mode for tobiiStanislaw Halik
2016-10-29spline-widget: remove aliasing artifactsStanislaw Halik
We're using QPainterPath and its bezier curves. However, we supply it a plethora of intermediate values to mitigate different results in interpolation.
2016-10-29spline-widget: avoid sqrt in global namespaceStanislaw Halik
2016-10-29spline-widget: revert last commitStanislaw Halik
In the last line of the blocks we're reducing the precision to reduce rounding errors. It's actually proper to use round rather than truncate here.
2016-10-28spline-widget: fix rounding bug introduced in a3b890b9b4opentrack-2.3-rc99p14Stanislaw Halik
Since we're already adding snap_x/2, truncation is the correct choice here.
2016-10-28spline-widget: use round, not trunc when converting pixel to valStanislaw Halik
2016-10-28spline-widget: don't recalculate point valueStanislaw Halik
Only apply snap for closeness check.
2016-10-26spline-widget: fix logic for detecting points being too closeStanislaw Halik
It was still possible to reorder points by dragging one of them. Also get rid of the iteration. It was previously introduced to try converge one of the points to another position. Allow for changing Y value while the point is dragged. Take snap into account. Use newly introduced "iround<t>".
2016-09-16spline-widget: simplify/fix drawing logicStanislaw Halik
The linear things should be drawn in drawFunction() since they change only when some control point is moved and the spline is recalculated anyway. Introduce spline::get_value_no_save to avoid clobbering the tracked value. Draw linear helper before the spline to avoid occluding it. Remove some redundant checks for whether _config exists when all calling sites ensure it already. I still need to de-camel-case these two classes.
2016-09-09spline-widget: simplify alpha calculationStanislaw Halik
2016-09-09spline-widget: fix uninitialized accessStanislaw Halik
Found-by: valgrind
2016-09-05spline-widget: oops, fix tooltip before clicking on widgetStanislaw Halik
2016-09-05spline-widget: stop dragging when alt-tabbing awayStanislaw Halik
Unfortunately now spline widgets grab keyboard focus. Qt doesn't seem to have a better way to detect whether some other application gained focus.
2016-09-05spline-widget: add tooltips, refactorStanislaw Halik
Tooltip shows current cursor/point position. Factor out common functions. Use QPoint/QPointF appropriately. Remove rounding that led to snapping to integral values. Allow for non-integral snapping amounts. Issue: #436
2016-09-05spline-widget: allow for non-integral snap valuesStanislaw Halik
2016-08-23spline-widget: disconnect "recomputed" in dtorStanislaw Halik
In case mem<settings> is still used elsewhere we still have a use-after-free otherwise.
2016-08-23spline-widget: return mem<settings> and not settings&Stanislaw Halik
2016-08-23spline-widget: multiple fixesStanislaw Halik
- add missing locking - bundle and settings ptr are never null following initialization; sentinel objects get created if there's no bundle, thus don't branch outside initialization functions. the sentinel object doesn't load or save to the .ini file - connect spline refresh to any bundle change - connect spline widget refresh to spline refresh - few caveat comments - spline_widget::setConfig now only takes the spline as argument, eliminating most of the complex logic there - clarify spline::set_bundle vs newly introduced spline::recompute
2016-08-17spline-widget: save spline control point list using options apiStanislaw Halik
- spline widgets reload when spline bundle reloads - every bundle reloads when profile gets changed Importing old spline settings hasn't been implemented. Control point positions are stored as raw floats. This is bad.
2016-08-12all: rename modules s#^opentrack-##. and opentrack -> apiStanislaw Halik
Adjust usages.
2016-08-10spline-widget, gui: rename mapping-related files and classesStanislaw Halik
Adjust usages.
2016-08-09spline-widget: only rename filesStanislaw Halik
Adjust usages.