don't discard iframe children.
[kdelibs.git] / khtml / java / kqeventutil.cpp
blob42d80638ad8c8f42b027be58ba98450c1997d52a
1 // -*- c++ -*-
2 /* This file is part of the KDE project
4 * Copyright (C) 2000 Wynn Wilkes <wynnw@caldera.com>
5 * 2002 Till Krech <till@snafu.de>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
22 #include "kqeventutil.h"
23 #include <QtGui/QKeyEvent>
25 QString KQEventUtil::getQtEventName( QEvent* e )
27 QString s;
29 switch( e->type() )
31 case QEvent::None:
32 s = "None";
33 break;
34 case QEvent::Timer:
35 s = "Timer";
36 break;
37 case QEvent::MouseButtonPress:
38 s = "MouseButtonPress";
39 break;
40 case QEvent::MouseButtonRelease:
41 s = "MouseButtonRelease";
42 break;
43 case QEvent::MouseButtonDblClick:
44 s = "MouseButtonClick";
45 break;
46 case QEvent::MouseMove:
47 s = "MouseMove";
48 break;
49 case QEvent::KeyPress:
50 s = "KeyPress";
51 break;
52 case QEvent::KeyRelease:
53 s = "KeyRelease";
54 break;
55 case QEvent::FocusIn:
56 s = "FocusIn";
57 break;
58 case QEvent::FocusOut:
59 s = "FocusOut";
60 break;
61 case QEvent::Enter:
62 s = "Enter";
63 break;
64 case QEvent::Leave:
65 s = "Leave";
66 break;
67 case QEvent::Paint:
68 s = "Paint";
69 break;
70 case QEvent::Move:
71 s = "Move";
72 break;
73 case QEvent::Resize:
74 s = "Resize";
75 break;
76 case QEvent::Create:
77 s = "Create";
78 break;
79 case QEvent::Destroy:
80 s = "Destroy";
81 break;
82 case QEvent::Show:
83 s = "Show";
84 break;
85 case QEvent::Hide:
86 s = "Hide";
87 break;
88 case QEvent::Close:
89 s = "Close";
90 break;
91 case QEvent::Quit:
92 s = "Quit";
93 break;
94 case QEvent::Reparent:
95 s = "Reparent";
96 break;
97 case QEvent::ShowMinimized:
98 s = "ShowMinimized";
99 break;
100 case QEvent::ShowNormal:
101 s = "ShowNormal";
102 break;
103 case QEvent::WindowActivate:
104 s = "WindowActivate";
105 break;
106 case QEvent::WindowDeactivate:
107 s = "WindowDeactivate";
108 break;
109 case QEvent::ShowToParent:
110 s = "ShowToParent";
111 break;
112 case QEvent::HideToParent:
113 s = "HideToParent";
114 break;
115 case QEvent::ShowMaximized:
116 s = "ShowMaximized";
117 break;
118 case QEvent::Accel:
119 s = "Accel";
120 break;
121 case QEvent::Wheel:
122 s = "Wheel";
123 break;
124 case QEvent::AccelAvailable:
125 s = "AccelAvailable";
126 break;
127 case QEvent::WindowTitleChange:
128 s = "CaptionChange";
129 break;
130 case QEvent::WindowIconChange:
131 s = "IconChange";
132 break;
133 case QEvent::ParentFontChange:
134 s = "ParentFontChange";
135 break;
136 case QEvent::ApplicationFontChange:
137 s = "ApplicationFontChange";
138 break;
139 case QEvent::ParentPaletteChange:
140 s = "ParentPaletteChange";
141 break;
142 case QEvent::ApplicationPaletteChange:
143 s = "ApplicationPaletteChange";
144 break;
145 case QEvent::Clipboard:
146 s = "Clipboard";
147 break;
148 case QEvent::Speech:
149 s = "Speech";
150 break;
151 case QEvent::SockAct:
152 s = "SockAct";
153 break;
154 case QEvent::ShortcutOverride:
155 s = "AccelOverride";
156 break;
157 case QEvent::DragEnter:
158 s = "DragEnter";
159 break;
160 case QEvent::DragMove:
161 s = "DragMove";
162 break;
163 case QEvent::DragLeave:
164 s = "DragLeave";
165 break;
166 case QEvent::Drop:
167 s = "Drop";
168 break;
169 case QEvent::DragResponse:
170 s = "DragResponse";
171 break;
172 case QEvent::ChildInserted:
173 s = "ChildInserted";
174 break;
175 case QEvent::ChildRemoved:
176 s = "ChildRemoved";
177 break;
178 case QEvent::LayoutHint:
179 s = "LayoutHint";
180 break;
181 case QEvent::ShowWindowRequest:
182 s = "ShowWindowRequest";
183 break;
184 case QEvent::ActivateControl:
185 s = "ActivateControl";
186 break;
187 case QEvent::DeactivateControl:
188 s = "DeactivateControl";
189 break;
190 case QEvent::User:
191 s = "User Event";
192 break;
194 default:
195 s = "Undefined Event, value = " + QString::number( e->type() );
196 break;
199 return s;