The interface is taken from Qt/KDE, but the implementation is different, because the Qt implementation depends on some Qt internals.