kkeynative.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __KKEYNATIVE_H
00021 #define __KKEYNATIVE_H
00022
00023 #include <kshortcut.h>
00024
00025 #ifdef Q_WS_X11
00026 typedef union _XEvent XEvent;
00027 #endif
00028
00029 class KKeyNativePrivate;
00034 class KKeyNative
00035 {
00036 public:
00043 KKeyNative();
00044
00045 #ifdef Q_WS_X11
00046
00050 KKeyNative( const XEvent* xevent );
00051 #endif
00052
00057 KKeyNative( const KKey& key );
00058
00062 KKeyNative( const KKeyNative& );
00063
00067 KKeyNative( uint code, uint mod, uint sym );
00068 ~KKeyNative();
00069
00074 void clear();
00075
00082 bool init( const XEvent* xevent );
00083
00089 bool init( const KKey& key );
00090
00096 bool init( const KKeyNative& key );
00097
00103 KKeyNative& operator =( const KKeyNative& key )
00104 { init( key ); return *this; }
00105
00112 int keyCodeQt() const;
00113
00118 KKey key() const;
00119
00125 operator KKey() const { return key(); }
00126
00131 uint code() const;
00132
00137 uint mod() const;
00138
00143 uint sym() const;
00144
00152 bool isNull() const;
00153
00165 int compare( const KKeyNative& key ) const;
00166
00171 bool operator == ( const KKeyNative& key ) const
00172 { return compare( key ) == 0; }
00173
00178 bool operator != ( const KKeyNative& key ) const
00179 { return compare( key ) != 0; }
00180
00185 bool operator < ( const KKeyNative& key ) const
00186 { return compare( key ) < 0; }
00187
00194 static KKeyNative& null();
00195
00196
00201 static bool keyboardHasWinKey();
00202
00208 static uint modX( KKey::ModFlag modFlag );
00209
00215 static uint accelModMaskX();
00216
00222 static uint modXNumLock();
00223
00229 static uint modXLock();
00230
00236 static uint modXScrollLock();
00237
00238 private:
00239 uint m_code, m_mod, m_sym;
00240 KKeyNativePrivate* d;
00241 };
00242
00243 #endif // !__KKEYNATIVE_H
This file is part of the documentation for kdecore Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 23 17:11:36 2004 by
doxygen 1.3.8-20040913 written by
Dimitri van Heesch, © 1997-2003