Changeset 528
- Timestamp:
- Jun 25, 2007, 5:30:10 PM (17 years ago)
- Location:
- trunk/geant4/interfaces/basic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/basic/include/G4UIQt.hh
r527 r528 108 108 G4bool GetHelpChoice(G4int&) ;// have to be implemeted because we heritate from G4VBasicShell 109 109 void ExitHelp();// have to be implemeted because we heritate from G4VBasicShell 110 bool EventFilter(QObject*,QEvent*);110 bool eventFilter(QObject*,QEvent*); 111 111 112 112 private: -
trunk/geant4/interfaces/basic/src/G4UIQt.cc
r527 r528 663 663 @param event Kind of event 664 664 */ 665 bool G4UIQt:: EventFilter(665 bool G4UIQt::eventFilter( // Should stay with a minuscule eventFilter because of Qt 666 666 QObject *aObj 667 667 ,QEvent *aEvent … … 684 684 (e->key() == (Qt::Key_PageUp))) { 685 685 int selection = fCommandHistoryArea->currentRow(); 686 for (int a=0;a<fCommandHistoryArea->count();a++) {687 688 }689 686 if (fCommandHistoryArea->count()) { 690 687 if (selection == -1) { 691 688 selection = fCommandHistoryArea->count()-1; 692 } 693 if (e->key() == (Qt::Key_Down)) { 694 if (selection <(fCommandHistoryArea->count()-1)) 695 selection++; 696 } else if (e->key() == (Qt::Key_PageDown)) { 697 selection = fCommandHistoryArea->count()-1; 698 } else if (e->key() == (Qt::Key_Up)) { 699 if (selection >0) 700 selection --; 701 } else if (e->key() == (Qt::Key_PageUp)) { 702 selection = 0; 689 } else { 690 if (e->key() == (Qt::Key_Down)) { 691 if (selection <(fCommandHistoryArea->count()-1)) 692 selection++; 693 } else if (e->key() == (Qt::Key_PageDown)) { 694 selection = fCommandHistoryArea->count()-1; 695 } else if (e->key() == (Qt::Key_Up)) { 696 if (selection >0) 697 selection --; 698 } else if (e->key() == (Qt::Key_PageUp)) { 699 selection = 0; 700 } 703 701 } 704 702 fCommandHistoryArea->clearSelection();
Note: See TracChangeset
for help on using the changeset viewer.