main_window: convert it to a dialog window

Using a QtMainWindow leads to problem with last version of pyqt:
it looks like the signal are not anymore generated... which is
annoying!
Moreover it is more logical to use a QDialog window.
main: add confirmation box before exiting the plugin
Conversion to use the new types.py classes