X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=emul%2Femul.cpp;h=3d0eb0a49c5b81ae7ac364816fe294a8919af8a4;hb=HEAD;hp=d3336c68f645bde74c8181c157ed3b74491d5f61;hpb=669ef4744ad8c96dbd79e2bd8613bddf1121511f;p=bertos.git diff --git a/emul/emul.cpp b/emul/emul.cpp deleted file mode 100755 index d3336c68..00000000 --- a/emul/emul.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * \file - * - * - * \version $Id$ - * - * \author Bernardo Innocenti - * - * \brief Qt-based emulator framework for embedded applications (implementation) - */ - -/*#* - *#* $Log$ - *#* Revision 1.2 2006/01/16 03:51:51 bernie - *#* Fix boilerplate. - *#* - *#* Revision 1.1 2006/01/16 03:37:12 bernie - *#* Add emulator skeleton. - *#* - *#*/ - -#include "emul.h" -#include "emulwin.h" - -#include -#include // std::exit() - -/// The global emulator instance. -Emulator *emul; - -Emulator::Emulator(int &argc, char **argv) : - emulApp(new QApplication(argc, argv)), - emulWin(new EmulWin(this)) -{ - emulApp->setMainWidget(emulWin); - emulWin->show(); -} - - -Emulator::~Emulator() -{ - // we don't delete emulWin because it automatically - // deletes itself when closed - delete emulApp; -} - - -void Emulator::quit() -{ - // WHAT A KLUDGE! - this->~Emulator(); - emul = NULL; - - // do we have a better way to shut down the emulation? - exit(0); -} - - -/// Main emulator entry point. -extern "C" void emul_init(int *argc, char *argv[]) -{ - ASSERT(!emul); - - // setup global emulator pointer - emul = new Emulator(*argc, argv); -} - -extern "C" void emul_cleanup() -{ - ASSERT(emul); - delete emul; - emul = NULL; -} - -extern "C" void emul_idle() -{ - // We process GUI events when the application is idle. - emul->emulApp->processEvents(); -} -