Port of the original BDSup2Sub to C++ and Qt.