kdecore Library API Documentation

KKeyServer::Key Struct Reference

Represents a key press. More...

#include <kkeyserver_x11.h>

List of all members.

Public Types

enum  { CODE_FOR_QT = 256 }

Public Member Functions

bool init (const KKey &key, bool bQt)
bool isNative () const
uint code () const
uint mod () const
uint sym () const
int keyCodeQt () const
void setKeycodeQt (int keyQt)
Keyoperator= (const KKeyNative &key)
int compare (const Key &key) const
bool operator== (const Key &b) const
bool operator< (const Key &b) const
KKey key () const

Public Attributes

uint m_code
uint m_mod
uint m_sym


Detailed Description

Represents a key press.

See also:
KKey

Definition at line 115 of file kkeyserver_x11.h.


Member Enumeration Documentation

anonymous enum
 

Code for native Keys in Qt.

Definition at line 118 of file kkeyserver_x11.h.


Member Function Documentation

bool KKeyServer::Key::init const KKey key,
bool  bQt
 

Initializes the key with a KKey.

Parameters:
key the key to get the data from
bQt true to take the Qt keycode, false for the native key code
See also:
Qt::Key

KKeyNative

Definition at line 791 of file kkeyserver_x11.cpp.

References m_code, and m_sym.

bool KKeyServer::Key::isNative  )  const [inline]
 

Checks whether the key code is a native code.

Returns:
true if native code of the window system, false if it is a Qt keycode
See also:
Qt::Key

KKeyNative

Definition at line 146 of file kkeyserver_x11.h.

References m_code.

uint KKeyServer::Key::code  )  const [inline]
 

Returns the code of the key.

Returns:
the code of the key
Definition at line 152 of file kkeyserver_x11.h.

References m_code.

uint KKeyServer::Key::mod  )  const [inline]
 

Returns the modifiers of the key.

Returns:
the modifiers of the key
Definition at line 158 of file kkeyserver_x11.h.

References m_mod.

Referenced by key().

uint KKeyServer::Key::sym  )  const [inline]
 

Returns the symbol of the key.

Returns:
the symbol of the key
Definition at line 164 of file kkeyserver_x11.h.

References m_sym.

int KKeyServer::Key::keyCodeQt  )  const [inline]
 

Returns the qt key code.

Returns:
the qt key code
Definition at line 170 of file kkeyserver_x11.h.

References m_sym.

Referenced by key().

void KKeyServer::Key::setKeycodeQt int  keyQt  )  [inline]
 

Sets the qt key code.

Parameters:
keyQt the qt key code
Definition at line 176 of file kkeyserver_x11.h.

References m_code, and m_sym.

Key & KKeyServer::Key::operator= const KKeyNative key  ) 
 

Initializes this key with a KKeyNative.

Returns:
this key
Definition at line 814 of file kkeyserver_x11.cpp.

References m_code, m_mod, and m_sym.

int KKeyServer::Key::compare const Key key  )  const
 

Compares this key with the given Key object.

Returns a negative number if the given Key is larger, 0 if they are equal and a positive number this Key is larger. The returned value is the difference between the symbol, modifier or code, whatever is non-zero first.

Parameters:
key the key to compare with this key
Returns:
a negative number if the given Key is larger, 0 if they are equal and a positive number this Key is larger
Definition at line 820 of file kkeyserver_x11.cpp.

References m_code, m_mod, and m_sym.

Referenced by operator<(), and operator==().

bool KKeyServer::Key::operator== const Key b  )  const [inline]
 

Compares the symbol, modifiers and code of both keys.

See also:
compare()
Definition at line 202 of file kkeyserver_x11.h.

References compare().

bool KKeyServer::Key::operator< const Key b  )  const [inline]
 

Compares the symbol, modifiers and code of both keys.

See also:
compare()
Definition at line 209 of file kkeyserver_x11.h.

References compare().

KKey KKeyServer::Key::key  )  const
 

Converts this Key to a KKey.

Returns:
the KKey
Definition at line 803 of file kkeyserver_x11.cpp.

References keyCodeQt(), m_code, m_mod, m_sym, mod(), and KKeyServer::modXToMod().


Member Data Documentation

uint KKeyServer::Key::m_code
 

The code of the key.

Definition at line 121 of file kkeyserver_x11.h.

Referenced by code(), compare(), init(), isNative(), key(), operator=(), and setKeycodeQt().

uint KKeyServer::Key::m_mod
 

The modifiers of the key.

Definition at line 124 of file kkeyserver_x11.h.

Referenced by compare(), key(), mod(), and operator=().

uint KKeyServer::Key::m_sym
 

The symbol of the key.

Definition at line 127 of file kkeyserver_x11.h.

Referenced by compare(), init(), key(), keyCodeQt(), operator=(), setKeycodeQt(), and sym().


The documentation for this struct was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 17 11:26:50 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003