--- np2/x11/qt/Attic/qtmain.cpp 2003/11/26 15:08:42 1.1 +++ np2/x11/qt/Attic/qtmain.cpp 2004/01/23 14:35:46 1.3 @@ -11,7 +11,9 @@ #include "qt/xnp2.h" #include "qt/qtdraw.h" +#if QT_VERSION >= 300 #include +#endif #include #include #include @@ -99,12 +101,27 @@ gui_qt_widget_quit(void) } void +gui_qt_event_process(void) +{ + + // XXX Nothing to do +} + +void gui_qt_set_window_title(const char* str) { np2EmulationWindow->setCaption(str); } +void +gui_qt_messagebox(const char *title, const char *msg) +{ + + printf("%s\n", title); + printf(msg); +} + // toolkit data gui_toolkit_t qt_toolkit = { gui_qt_get_toolkit, @@ -114,7 +131,9 @@ gui_toolkit_t qt_toolkit = { gui_qt_widget_show, gui_qt_widget_mainloop, gui_qt_widget_quit, + gui_qt_event_process, gui_qt_set_window_title, + gui_qt_messagebox, }; @@ -174,7 +193,12 @@ void emulationWindow::mainLoop() { - if (!QApplication::eventLoop()->hasPendingEvents()) { +#if QT_VERSION >= 300 + if (!QApplication::eventLoop()->hasPendingEvents()) +#else + if (!hasPendingEvents()) +#endif + { mainloop(0); } }