4 * Copyright 2006 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 2000, 2001 Bernardo Innocenti <bernie@codewiz.org>
11 * \author Bernardo Innocenti <bernie@develer.com>
13 * \brief Qt-based emulator framework for embedded applications (implementation)
18 *#* Revision 1.1 2006/01/16 03:37:12 bernie
19 *#* Add emulator skeleton.
26 #include <qapplication.h>
27 #include <cstdlib> // std::exit()
29 /// The global emulator instance.
32 Emulator::Emulator(int &argc, char **argv) :
33 emulApp(new QApplication(argc, argv)),
34 emulWin(new EmulWin(this))
36 emulApp->setMainWidget(emulWin);
43 // we don't delete emulWin because it automatically
44 // deletes itself when closed
55 // do we have a better way to shut down the emulation?
60 /// Main emulator entry point.
61 extern "C" void emul_init(int *argc, char *argv[])
65 // setup global emulator pointer
66 emul = new Emulator(*argc, argv);
69 extern "C" void emul_cleanup()
76 extern "C" void emul_idle()
78 // We process GUI events when the application is idle.
79 emul->emulApp->processEvents();