You already received some good advice. Let me provide a different perspective.
- The K-5 and K-r cameras are new and their prices will not drop soon.
- Both the K-7 and K-x are well respected cameras. You will not get wrong with either.
- The K-x is an entry level dSLR.
- The K-7 is a semi-pro dSLR. You are unlikely to reach its full potential very rapidly.
- I would recommend a WR camea body: K-7 or K-5, if you shot in cold conditions, in the snow, rain, dirt.....
- The K-5 and K-7 are very solid bodies to add to the WR.
- In terms of Image quality (IQ), there is little difference between K-x and K-7 with the same lens. Some say that the K-7 might be slightly superior at low ISOs (that represents 85% of all shootings) while the K-x is acnowledge to be superior for ISOs above 1600.
- Invest in "good glass", that is a high quality lenses. A couple of good lenses will make a "hell" of a difference. There has been some thread and discussion on this:
https://www.pentaxforums.com/forums/pentax-dslr-discussion/119399-more-camera-better-glass.html
and the overwhelming response was: "good glass".
- Lastly go to your local store and try both the K-x and K-7 before deciding. The hand feel is extremely important. The K-x body is smaller than then K-7 body. Although I have small hands, I prefered the K-7 handgrip to that of the K-x. People with large hand might not like either k-7 or K-x, but their compact size is an asset, in my opinion.
Hope that the comment will assist...