P4P, I see it in this order: Duran, Leonard, Hagler, Hearns.
I hear a lot of people saying since boxer A beat boxer B, boxer A is better. Now, in some situations, that type of thinking would be true, but not in this case. Duran was a natural lightweight, Leonard/Hearns were at their best at 147, and Hagler easily spent his whole career at middleweight. Rating them based on their head-to-head matchups would be unfair.
In a p4p sense, i rate Duran tops for his utter dominance of the lightweight division, beating some great opposition such as Buchanan and DeJesus--who would both be all-time great lightweights, if they didn't have the misfortune of campaigning at the same time as Duran. Actually, they already are all-time greats, but that's another topic. At 135, Duran was pretty much a perfect fighting machine. The fact that he could move up and hold his own with the rest of the heavier fab 4, beating them in Leonard's case, enhances the legend he wrote at lightweight.
Leonard is next having beaten Hearns (in their lone bout at 147, both their best weight), a lesser version of Duran, and Hagler, in my opinion. Though his number of fights were limited compared to others, he made up for it by fighting the very best out there. And his skill was undeniable.
3rd would be Hagler, for his dominance of the middleweight division. Leonard is ahead of Hagler because of superior opposition and having won their matchup, despite being past his prime.
Hearns was probably the most physically gifted of the four, with a huge reach/height, crushing power, blinding speed, and even the boxing ability to outbox Leonard for large portions of their fights. However, his chin was capable of being dented (though it wasn't as bad as people make it out to be) and he was too inconsistent to be ranked ahead of the previous three.