Big refactoring of Qt part of scigraphics