[gens-qt4] GeneralConfigWindow::keyPressEvent(): Reimplemented dialog keypresses... gens-qt4-GeneralConfigWindow-v5
authorDavid Korth <gerbilsoft@verizon.net>
Mon, 7 Feb 2011 10:29:33 +0000 (05:29 -0500)
committerDavid Korth <gerbilsoft@verizon.net>
Mon, 7 Feb 2011 10:29:33 +0000 (05:29 -0500)
commit2eb39b90aacf6dae73a93ee24370019e563b9378
tree9c815fb74412dd74e83a74d785a5266b912546b3
parentc97c64e01fbea5ce73fe3d1bb102d9de880d8a6b
[gens-qt4] GeneralConfigWindow::keyPressEvent(): Reimplemented dialog keypresses for !GCW_APPLY_IMMED.

This allows use of Enter and Escape to accept and cancel changes, respectively.

QMainWindow doesn't have that by default because it's not intended to
be used as a dialog, but we need to use QMainWindow in order to get
the unified titlebar/toolbar on Mac OS X. I basically reimplemented
QDialog::keyPressEvent() in GeneralConfigWindow's keyPressEvent()
handler.

TODO:

- Handle Cmd-Period on Mac?

- Cmd-W triggers the "Close ROM" action. It should close the window.
src/gens-qt4/GeneralConfigWindow.cpp
src/gens-qt4/GeneralConfigWindow.hpp