4 * Copyright 2006 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 2000, 2001 Bernardo Innocenti <bernie@codewiz.org>
6 * This file is part of DevLib - See README.devlib for information.
11 * \author Bernardo Innocenti <bernie@develer.com>
13 * \brief Qt-based emulator framework for embedded applications (implementation)
18 *#* Revision 1.2 2006/01/16 03:51:51 bernie
21 *#* Revision 1.1 2006/01/16 03:37:12 bernie
22 *#* Add emulator skeleton.
29 #include <qapplication.h>
30 #include <cstdlib> // std::exit()
32 /// The global emulator instance.
35 Emulator::Emulator(int &argc, char **argv) :
36 emulApp(new QApplication(argc, argv)),
37 emulWin(new EmulWin(this))
39 emulApp->setMainWidget(emulWin);
46 // we don't delete emulWin because it automatically
47 // deletes itself when closed
58 // do we have a better way to shut down the emulation?
63 /// Main emulator entry point.
64 extern "C" void emul_init(int *argc, char *argv[])
68 // setup global emulator pointer
69 emul = new Emulator(*argc, argv);
72 extern "C" void emul_cleanup()
79 extern "C" void emul_idle()
81 // We process GUI events when the application is idle.
82 emul->emulApp->processEvents();