planet.kde.org

Week 2 : Refactor and Review

This is a weekly update from my Google Summer of Code 2026 project with KDE, improving effect widgets in Kdenlive. Week 2 was about getting feedback and doing it right. After opening the draft MR for the Curves Widget, my mentor Jean-Baptiste reviewed the approach and suggested a cleaner architecture. The original implementation packed all 4 channel parameters into a single compound parameter. JB's feedback: each channel should be its own separate av_curve parameter in the effect XML, and AssetParameterView should share one CurveParamWidget across all of them; similar to how m_mainKeyframeWidget works for keyframe parameters. This was a significant refactor but the result is much cleaner: avfilter_curves.xml now has 4 separate parameters; av.master, av.r, av.g, av.b, each with its own name and description AssetParameterView creates the CurveParamWidget on the first av_curve param, then calls addAvCurveTab() for each subsequent one Each tab is tied to its own model index; valueChanged fires per-parameter independently serializeAllChannels() is gone entirely;each channel just emits its own value All four tabs (All, R, G, B) are working correctly. Per-channel state is preserved when switching tabs. Project save and restore works. The MR is now updated with the refactored approach and waiting for JB's review. The All tab applies a curve to all channels simultaneously: Week 2 : Refactor and Review Switching to the R tab adjusts only the red channel independently: Week 2 : Refactor and Review Week 3 is already underway; the MR is pushed and waiting for JB's review. More updates next Sunday...