ported plotdialog to qt4