Between the K20D and the K-7, I chose the K-7. The K-7 introduced the current chassis, viewfinder, shutter, 77 segment metering, rear LCD and button layout that Pentax used for the K-5, K-5II, K-5IIs and I think K-30. It's magnesium alloy, really great for comparing with your brother-in-law's consumer-grade Canon. It's a lot smaller and lighter than the K20D, but not quite as small or light as the *ist DS. The K-7 sensor is slightly different than the K20D, modified to make video and live view work, just slightly worse at high ISO noise. I like the size, LCD, metering and live view advantages. I never use the video, burst mode or other differences. It is a worthwhile upgrade over the *ist DS.
The unofficial forum rule is to take what you're willing to spend and add 20%.
If you can do that, the K-5 takes all the great stuff from the K-7 and adds a great sensor. When the K20D and K-7 were new, the biggest complaint was that the Samsung sensor was not great at high ISOs. It was worse than the lower-tier models like the K-x and K-r. Some people bought K-x or K-r models as second cameras just for that high-ISO performance. The K-5 sensor is even better at high ISO settings than the K-x and K-r. That kind of range is really useful for some shots. There are some other upgrades between K-7 and K-5: newer AF system, higher burst mode, better video, more USER modes - but the ISO difference really dwarfs those. It is really worth the cost difference, especially at used prices.
The K-30 is a great midrange model with the huge advantage that you can get it new. You have to look really hard for the few features left off the K-5 series to make it midrange. The really important stuff is there: sensor, viewfinder, two dials, etc. The K-5/K-30 decision is a really hard choice to make.