My question is slightly related.

I'd like to write a script which automates the process of
doing an "apm -s " (sleep) followed by a lock screen.

How do I execute the KDE lock screen functionality from the command line? I am unable to determine what the name of that command is.