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

Thanks you for your suggestion! However, I don’t think I have been clear with my problem. The issue I’m having is making custom GUI sliders that will apply a rotation to a segment. I understand how the transformation around a point works and it works great when I use the python console and transforms module. However, I am basically trying to make copies of those transforms rotation sliders in my own module that can rotate a segment around its centroid. This is to make it so the user does not need to keep going back and forth between my module and the transforms module or deal with using python to initialize the rotation around a point.

This is definitely helpful! Now I just have to figure out how to actually execute the function that I want to link up with the slider