for more explenations read here:
https://kdenlive.org/video-editing-applications-handbook/#trim
I don't know if it can be useful because Flowblade and Kdenlive are both based on MLT but Flowblade is written in Python and not in C++ as Kdenlive is. Aanyway here you can find the code that flowblade uses for three of these trimming operations:
https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/Flowblade/trimmodes.py