X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=emul%2Femulwin.cpp;h=b2bdc62fd3d012df577bbcf196db1ce68ba3833b;hb=972073a11abb5cf0b382b1a74298185ee4a9466a;hp=f03fc06c49aa3343eb656f8b750e263f6c961b7e;hpb=669ef4744ad8c96dbd79e2bd8613bddf1121511f;p=bertos.git diff --git a/emul/emulwin.cpp b/emul/emulwin.cpp index f03fc06c..b2bdc62f 100755 --- a/emul/emulwin.cpp +++ b/emul/emulwin.cpp @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.3 2006/02/15 09:11:17 bernie + *#* Add keyboard emulator. + *#* *#* Revision 1.2 2006/01/16 03:51:51 bernie *#* Fix boilerplate. *#* @@ -27,6 +30,7 @@ #include #include +#include #include #include @@ -40,7 +44,7 @@ #include #include -EmulWin::EmulWin(Emulator *e) : QMainWindow(0, "SarfEmul", WDestructiveClose) +EmulWin::EmulWin(Emulator *e) : QMainWindow(0, "DevLibEmul", WDestructiveClose) { // "File" menu QPopupMenu * file = new QPopupMenu(this); @@ -69,6 +73,16 @@ EmulWin::EmulWin(Emulator *e) : QMainWindow(0, "SarfEmul", WDestructiveClose) // LCD QHBoxLayout *lay_lcd = new QHBoxLayout(box_right, 4); lay_lcd->addWidget(e->emulLCD = new EmulLCD(central)); + + // Keyboard + QHBoxLayout *lay_kbd = new QHBoxLayout(box_right, 4); + lay_kbd->addWidget(e->emulKbd = new EmulKbd(central)); + + // Setup keyboard: Label Keycode Row Col MRow MCol + e->emulKbd->addKey("^", Key_Up, 0, 0, 0, 0); + e->emulKbd->addKey("v", Key_Down, 1, 0, 0, 1); + e->emulKbd->addKey("OK", Key_Return, 0, 1, 0, 2); + e->emulKbd->addKey("ESC", Key_Escape, 1, 1, 0, 3); }