• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Konsole::KeyboardTranslatorReader

Konsole::KeyboardTranslatorReader Class Reference

#include <KeyboardTranslator.h>

List of all members.


Detailed Description

Parses the contents of a Keyboard Translator (.keytab) file and returns the entries found in it.

Usage example:

  QFile source( "/path/to/keytab" );
  source.open( QIODevice::ReadOnly );

  KeyboardTranslator* translator = new KeyboardTranslator( "name-of-translator" );

  KeyboardTranslatorReader reader(source);
  while ( reader.hasNextEntry() )
      translator->addEntry(reader.nextEntry());

  source.close();

  if ( !reader.parseError() )
  {
      // parsing succeeded, do something with the translator
  } 
  else
  {
      // parsing failed
  }

Definition at line 346 of file KeyboardTranslator.h.


Public Member Functions

 KeyboardTranslatorReader (QIODevice *source)
QString description () const
bool hasNextEntry ()
KeyboardTranslator::Entry nextEntry ()
bool parseError ()

Static Public Member Functions

static KeyboardTranslator::Entry createEntry (const QString &condition, const QString &result)

Constructor & Destructor Documentation

KeyboardTranslatorReader::KeyboardTranslatorReader ( QIODevice *  source  ) 

Constructs a new reader which parses the given source.

Definition at line 220 of file KeyboardTranslator.cpp.


Member Function Documentation

QString KeyboardTranslatorReader::description (  )  const

Returns the description text.

TODO: More documentation

Definition at line 443 of file KeyboardTranslator.cpp.

bool KeyboardTranslatorReader::hasNextEntry (  ) 

Returns true if there is another entry in the source stream.

Definition at line 447 of file KeyboardTranslator.cpp.

KeyboardTranslator::Entry KeyboardTranslatorReader::nextEntry (  ) 

Returns the next entry found in the source stream.

Definition at line 481 of file KeyboardTranslator.cpp.

bool KeyboardTranslatorReader::parseError (  ) 

Returns true if an error occurred whilst parsing the input or false if no error occurred.

Definition at line 492 of file KeyboardTranslator.cpp.

KeyboardTranslator::Entry KeyboardTranslatorReader::createEntry ( const QString &  condition,
const QString &  result 
) [static]

Parses a condition and result string for a translator entry and produces a keyboard translator entry.

The condition and result strings are in the same format as in

Definition at line 451 of file KeyboardTranslator.cpp.


The documentation for this class was generated from the following files:
  • KeyboardTranslator.h
  • KeyboardTranslator.cpp

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal