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
)
37 case QEvent::MouseButtonPress
:
38 s
= "MouseButtonPress";
40 case QEvent::MouseButtonRelease
:
41 s
= "MouseButtonRelease";
43 case QEvent::MouseButtonDblClick
:
44 s
= "MouseButtonClick";
46 case QEvent::MouseMove
:
49 case QEvent::KeyPress
:
52 case QEvent::KeyRelease
:
58 case QEvent::FocusOut
:
94 case QEvent::Reparent
:
97 case QEvent::ShowMinimized
:
100 case QEvent::ShowNormal
:
103 case QEvent::WindowActivate
:
104 s
= "WindowActivate";
106 case QEvent::WindowDeactivate
:
107 s
= "WindowDeactivate";
109 case QEvent::ShowToParent
:
112 case QEvent::HideToParent
:
115 case QEvent::ShowMaximized
:
124 case QEvent::AccelAvailable
:
125 s
= "AccelAvailable";
127 case QEvent::WindowTitleChange
:
130 case QEvent::WindowIconChange
:
133 case QEvent::ParentFontChange
:
134 s
= "ParentFontChange";
136 case QEvent::ApplicationFontChange
:
137 s
= "ApplicationFontChange";
139 case QEvent::ParentPaletteChange
:
140 s
= "ParentPaletteChange";
142 case QEvent::ApplicationPaletteChange
:
143 s
= "ApplicationPaletteChange";
145 case QEvent::Clipboard
:
151 case QEvent::SockAct
:
154 case QEvent::ShortcutOverride
:
157 case QEvent::DragEnter
:
160 case QEvent::DragMove
:
163 case QEvent::DragLeave
:
169 case QEvent::DragResponse
:
172 case QEvent::ChildInserted
:
175 case QEvent::ChildRemoved
:
178 case QEvent::LayoutHint
:
181 case QEvent::ShowWindowRequest
:
182 s
= "ShowWindowRequest";
184 case QEvent::ActivateControl
:
185 s
= "ActivateControl";
187 case QEvent::DeactivateControl
:
188 s
= "DeactivateControl";
195 s
= "Undefined Event, value = " + QString::number( e
->type() );