How to do custom rotation sliders and transformation buttons with python?

This topic may serve as a good starting point:

There is an interesting script and video at the end.