1 | // ******************************************************************** |
---|
2 | // * License and Disclaimer * |
---|
3 | // * * |
---|
4 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
5 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
6 | // * conditions of the Geant4 Software License, included in the file * |
---|
7 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
8 | // * include a list of copyright holders. * |
---|
9 | // * * |
---|
10 | // * Neither the authors of this software system, nor their employing * |
---|
11 | // * institutes,nor the agencies providing financial support for this * |
---|
12 | // * work make any representation or warranty, express or implied, * |
---|
13 | // * regarding this software system or assume any liability for its * |
---|
14 | // * use. Please see the license in the file LICENSE and URL above * |
---|
15 | // * for the full disclaimer and the limitation of liability. * |
---|
16 | // * * |
---|
17 | // * This code implementation is the result of the scientific and * |
---|
18 | // * technical work of the GEANT4 collaboration. * |
---|
19 | // * By using, copying, modifying or distributing the software (or * |
---|
20 | // * any work based on the software) you agree to acknowledge its * |
---|
21 | // * use in resulting scientific publications, and indicate your * |
---|
22 | // * acceptance of all terms of the Geant4 Software license. * |
---|
23 | // ******************************************************************** |
---|
24 | // |
---|
25 | // |
---|
26 | // $Id: G4UIQt.cc,v 1.14 2007/06/15 11:09:49 $ |
---|
27 | // GEANT4 tag $Name: geant4-08-01 $ |
---|
28 | // |
---|
29 | // L. Garnier |
---|
30 | |
---|
31 | |
---|
32 | #ifdef G4UI_BUILD_QT_SESSION |
---|
33 | |
---|
34 | #include "G4UIQtLineEdit.hh" |
---|
35 | #include <QtGui/qevent.h> |
---|
36 | // #include "G4Types.hh" |
---|
37 | |
---|
38 | // #include <string.h> |
---|
39 | |
---|
40 | // #include "G4UIQt.hh" |
---|
41 | // #include "G4UImanager.hh" |
---|
42 | // #include "G4StateManager.hh" |
---|
43 | // #include "G4UIcommandTree.hh" |
---|
44 | // #include "G4UIcommandStatus.hh" |
---|
45 | |
---|
46 | // #include "G4UIQtLineEdit.hh" |
---|
47 | |
---|
48 | // #include "G4Qt.hh" |
---|
49 | |
---|
50 | // #include <QtGui/qapplication.h> |
---|
51 | // #include <QtGui/qwidget.h> |
---|
52 | // #include <QtGui/qmenu.h> |
---|
53 | // #include <QtGui/qmenubar.h> |
---|
54 | // #include <QtGui/qboxlayout.h> |
---|
55 | // #include <QtGui/qpushbutton.h> |
---|
56 | // #include <QtGui/qlabel.h> |
---|
57 | // #include <QtGui/qsplitter.h> |
---|
58 | // #include <QtGui/qscrollbar.h> |
---|
59 | // #include <QtGui/qdialog.h> |
---|
60 | |
---|
61 | // #include <stdlib.h> |
---|
62 | |
---|
63 | G4UIQtLineEdit::G4UIQtLineEdit ( |
---|
64 | G4UIQt * parent |
---|
65 | ) |
---|
66 | |
---|
67 | /***************************************************************************/ |
---|
68 | /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ |
---|
69 | { |
---|
70 | fParent = parent; |
---|
71 | } |
---|
72 | |
---|
73 | void G4UIQtLineEdit::keyPressEvent(QKeyEvent *e) { |
---|
74 | if (e->key() == (Qt::Key_Down)) { |
---|
75 | printf("****************KEY PRESSED DOWN*****\n"); |
---|
76 | } else if (e->key() == (Qt::Key_PageDown)) { |
---|
77 | printf("****************KEY PRESSED PAGE DOWN*****\n"); |
---|
78 | } else if (e->key() == (Qt::Key_Up)) { |
---|
79 | printf("****************KEY PRESSED UP*****\n"); |
---|
80 | } else if (e->key() == (Qt::Key_PageUp)) { |
---|
81 | printf("****************KEY PRESSED PAGE UP*****\n"); |
---|
82 | } else { |
---|
83 | QLineEdit::keyPressEvent(e); |
---|
84 | } |
---|
85 | } |
---|
86 | |
---|
87 | G4UIQtLineEdit::~G4UIQtLineEdit ( |
---|
88 | ) |
---|
89 | { |
---|
90 | } |
---|
91 | #endif |
---|