From: Joachim S. <qk...@us...> - 2005-03-06 01:27:21
|
Update of /cvsroot/lmuse/muse/muse/liste In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30479/muse/liste Modified Files: Tag: REL07 listedit.h listedit.cpp Log Message: added support to close the waveedit and listedit dialog with a "esc" can this be done better? it's working here but i had to edit the respective classes and add another virtual void memberfunction - hope i did this correct ;-) the other change was a patch because i've added the wrong graphic to the popup Index: listedit.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/liste/listedit.cpp,v retrieving revision 1.11.2.2 retrieving revision 1.11.2.3 diff -C2 -d -r1.11.2.2 -r1.11.2.3 *** listedit.cpp 31 Dec 2004 15:12:35 -0000 1.11.2.2 --- listedit.cpp 6 Mar 2005 01:27:07 -0000 1.11.2.3 *************** *** 724,725 **** --- 724,737 ---- } + //--------------------------------------------------------- + // viewKeyPressEvent + //--------------------------------------------------------- + + void ListEdit::keyPressEvent(QKeyEvent* event) + { + int key = event->key(); + if (key == Key_Escape) { + close(); + return; + } + } Index: listedit.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/liste/listedit.h,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** listedit.h 24 Apr 2004 14:58:52 -0000 1.3 --- listedit.h 6 Mar 2005 01:27:07 -0000 1.3.2.1 *************** *** 41,44 **** --- 41,45 ---- Q_OBJECT virtual void closeEvent(QCloseEvent*); + virtual void keyPressEvent(QKeyEvent*); void initShortcuts(); QAction *insertNote, *insertSysEx, *insertCtrl, *insertMeta, *insertCAfter, *insertPAfter; |