Yes, they all are to a certain extent. I use old M42 screw mount lenses on my K-7. But if you use any of the automatic modes (Av, Tv, P, etc), you'll need to meter differently.
There was once a tutorial on this at the top of this sub-forum (it was a sticky), but I can't find it anymore. And I also can't figure out where the Articles sub-forum disappeared to. In any case, you'll have to go into the Custom Functions menu of your camera and find the "Using Aperture Ring" setting. Set that to "Permitted". Then you can use any old K-mount or M42 mount lenses you want.
edit: ah, here it is, it's in the Beginner's Section:
https://www.pentaxforums.com/forums/pentax-beginners-corner-q/59272-shooting-...x-dslrs-f.html