X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=emul%2Femul.cpp;h=4e8d00fa901fb6639f829495a649f3380e7ad450;hb=HEAD;hp=c68fa8d6754455d7aa6de66b4069d9252e24d34a;hpb=70ef586aed3922433460eaf19125378f8c996743;p=bertos.git diff --git a/emul/emul.cpp b/emul/emul.cpp deleted file mode 100755 index c68fa8d6..00000000 --- a/emul/emul.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - * \file - * - * - * \version $Id$ - * - * \author Bernardo Innocenti - * - * \brief Qt-based emulator framework for embedded applications (implementation) - */ - -/*#* - *#* $Log$ - *#* 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(); -} -