Optimization in Educational
use update() instead of repaint() at various places. As per the Qt documentation, it is preferable to call update() instead of repaint(). Calling update() allows qt to optimize by calling paintEvent() only once as needed after several calls to update().
This is my first direct commit to KDE. Thanks Torsten and Bernhard for giuding me through this.