Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::Core::OKeyPair Class Reference

small class representing a Key with possible modifiers This class holds information about key code and possible modifier state. That is the lowest level of the key input functions. There are also static methods to get special keys. OKeyPair will be used with More...

#include </home/clem/local/src/opie/libopie2/opiecore/okeyconfigmanager.h>

List of all members.

Public Types

typedef QValueList< OKeyPairList

Public Member Functions

 OKeyPair (int key=-1, int modifier=-1)
 ~OKeyPair ()
bool operator== (const OKeyPair &) const
bool operator!= (const OKeyPair &) const
bool isEmpty () const
int keycode () const
int modifier () const
void setKeycode (int)
void setModifier (int)

Static Public Member Functions

static OKeyPair returnKey ()
static OKeyPair leftArrowKey ()
static OKeyPair rightArrowKey ()
static OKeyPair upArrowKey ()
static OKeyPair downArrowKey ()
static OKeyPair emptyKey ()
static OKeyPair::List hardwareKeys ()

Private Attributes

int m_key
int m_mod
Private * d


Detailed Description

small class representing a Key with possible modifiers This class holds information about key code and possible modifier state. That is the lowest level of the key input functions. There are also static methods to get special keys. OKeyPair will be used with

See also:
OKeyConfigItem
Since:
1.2

Definition at line 31 of file okeyconfigmanager.h.


Member Typedef Documentation

typedef QValueList<OKeyPair> Opie::Core::OKeyPair::List
 

Definition at line 33 of file okeyconfigmanager.h.


Constructor & Destructor Documentation

Opie::Core::OKeyPair::OKeyPair int  key = -1,
int  mod = -1
 

The default Constructor of a OKeyPair. A Key and a Modifier ( Alt/Shift/Ctrl ) needs to be supplied. Use Qt::Key for the information. The default arguments create an Empty OKeyPair. If you want to get an empty OKeyPair use the static method for getting the emptyKey()

See also:
OKeyPair OKeyPair::emptyKey()

Definition at line 47 of file okeyconfigmanager.cpp.

Referenced by downArrowKey(), emptyKey(), hardwareKeys(), leftArrowKey(), returnKey(), rightArrowKey(), and upArrowKey().

Opie::Core::OKeyPair::~OKeyPair  ) 
 

The destructor

Definition at line 54 of file okeyconfigmanager.cpp.


Member Function Documentation

OKeyPair Opie::Core::OKeyPair::downArrowKey  )  [static]
 

Return an OKeyPair for the Down Arrow Key without any modifier Key

Definition at line 143 of file okeyconfigmanager.cpp.

References Qt::Key_Down, and OKeyPair().

Referenced by IRCHistoryLineEdit::keyConfigInstance(), and TestMainWindow::TestMainWindow().

OKeyPair Opie::Core::OKeyPair::emptyKey  )  [static]
 

Return an Empty OKeyPair

Definition at line 150 of file okeyconfigmanager.cpp.

References OKeyPair().

Referenced by Opie::Core::OKeyConfigManager::load().

OKeyPair::List Opie::Core::OKeyPair::hardwareKeys  )  [static]
 

This functions uses the Opie::Core::ODevice::buttons for OKeyPairList

See also:
Opie::Core::ODevice

Opie::Core::ODeviceButton

Opie::Core::ODevice::button

Definition at line 162 of file okeyconfigmanager.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::end(), Opie::Core::ODevice::inst(), and OKeyPair().

Referenced by IRCHistoryLineEdit::keyConfigInstance().

bool Opie::Core::OKeyPair::isEmpty  )  const
 

Is this OKeyPair empty/valid?

Definition at line 60 of file okeyconfigmanager.cpp.

References m_key, and m_mod.

Referenced by Opie::Core::OKeyConfigItem::isEmpty().

int Opie::Core::OKeyPair::keycode  )  const
 

get the keycode for this OKeyPair. The Key relates to Qt::Key.

See also:
Qt::Key

setKey

Definition at line 70 of file okeyconfigmanager.cpp.

References m_key.

Referenced by Opie::Core::OKeyConfigManager::keyList(), Opie::Ui::Internal::keyToString(), and Opie::Core::OKeyConfigManager::save().

OKeyPair Opie::Core::OKeyPair::leftArrowKey  )  [static]
 

Return an OKeyPair for the Left Arrow Key without any modifier Key

Definition at line 119 of file okeyconfigmanager.cpp.

References Qt::Key_Left, and OKeyPair().

Referenced by IRCHistoryLineEdit::keyConfigInstance(), and TestMainWindow::TestMainWindow().

int Opie::Core::OKeyPair::modifier  )  const
 

get the modifier key for this OKeyPair. The Modifier State relates to the Qt::ButtonState

See also:
Qt::ButtonState

setModifier

Definition at line 81 of file okeyconfigmanager.cpp.

References m_mod.

Referenced by Opie::Core::OKeyConfigManager::keyList(), Opie::Ui::Internal::keyToString(), and Opie::Core::OKeyConfigManager::save().

bool Opie::Core::OKeyPair::operator!= const OKeyPair pair  )  const
 

Not equal operator. calls the equal operator internally

Definition at line 188 of file okeyconfigmanager.cpp.

bool Opie::Core::OKeyPair::operator== const OKeyPair pair  )  const
 

Equals operator. Check if two OKeyPairs have the same key and modifier

See also:
operator!=

Definition at line 178 of file okeyconfigmanager.cpp.

References m_key, and m_mod.

OKeyPair Opie::Core::OKeyPair::returnKey  )  [static]
 

Return an OKeyPair for the Return Key without any modifier.

Definition at line 111 of file okeyconfigmanager.cpp.

References Qt::Key_Return, and OKeyPair().

Referenced by IRCHistoryLineEdit::keyConfigInstance().

OKeyPair Opie::Core::OKeyPair::rightArrowKey  )  [static]
 

Return an OKeyPair for the Right Arrow Key without any modifier Key

Definition at line 127 of file okeyconfigmanager.cpp.

References Qt::Key_Right, and OKeyPair().

Referenced by TestMainWindow::TestMainWindow().

void Opie::Core::OKeyPair::setKeycode int  key  ) 
 

Set the keycode

Parameters:
key The Keycode to set
See also:
keycode()

Qt::Key

Definition at line 93 of file okeyconfigmanager.cpp.

References m_key.

void Opie::Core::OKeyPair::setModifier int  mod  ) 
 

Set the modifier key

Parameters:
mod the Modifier key
See also:
Qt::ButtonState

modifier()

Definition at line 104 of file okeyconfigmanager.cpp.

References m_mod.

OKeyPair Opie::Core::OKeyPair::upArrowKey  )  [static]
 

Return an OKeyPair for the Up Arrow Key without any modifier Key

Definition at line 135 of file okeyconfigmanager.cpp.

References Qt::Key_Up, and OKeyPair().

Referenced by IRCHistoryLineEdit::keyConfigInstance(), and TestMainWindow::TestMainWindow().


Member Data Documentation

Private* Opie::Core::OKeyPair::d [private]
 

Definition at line 59 of file okeyconfigmanager.h.

int Opie::Core::OKeyPair::m_key [private]
 

Definition at line 57 of file okeyconfigmanager.h.

Referenced by isEmpty(), keycode(), operator==(), and setKeycode().

int Opie::Core::OKeyPair::m_mod [private]
 

Definition at line 58 of file okeyconfigmanager.h.

Referenced by isEmpty(), modifier(), operator==(), and setModifier().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:00:41 2005 for OPIE by  doxygen 1.4.2