Code for Waypoint detection

Hi,

I am using QGCS for first time for development and my work is related to waypoints.
If i can get some help where i can find the code and the flow it would increase my productivity.