change diagram base class to QMdiWindow