• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • vimode
katevikeyparser.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2008 Erlend Hamberg <ehamberg@gmail.com>
4  * Copyright (C) 2008 Evgeniy Ivanov <powerfox@kde.ru>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef KATE_VI_KEYPARSER_H_INCLUDED
23 #define KATE_VI_KEYPARSER_H_INCLUDED
24 
25 #include <QChar>
26 #include <QString>
27 #include <QHash>
28 #include "katepartprivate_export.h"
29 
30 class QKeyEvent;
31 
37 class KATEPART_TESTS_EXPORT KateViKeyParser
38 {
39 private:
40  KateViKeyParser();
41 
42 public:
43  static KateViKeyParser* self();
44  ~KateViKeyParser() { m_instance = NULL; }
45 
46  const QString encodeKeySequence( const QString &keys ) const;
47  const QString decodeKeySequence( const QString &keys ) const;
48  QString qt2vi( int key ) const;
49  int vi2qt( const QString &keypress ) const;
50  int encoded2qt(const QString &keypress) const;
51  const QChar KeyEventToQChar(const QKeyEvent &keyEvent);
52 
53 private:
54  void initKeyTables();
55 
56  QHash<int, QString> *m_qt2katevi;
57  QHash<QString, int> *m_katevi2qt;
58  QHash<QString, int> *m_nameToKeyCode;
59  QHash<int, QString> *m_keyCodeToName;
60 
61  static KateViKeyParser *m_instance;
62 };
63 
64 #endif
QChar
KATEPART_TESTS_EXPORT
#define KATEPART_TESTS_EXPORT
Definition: katepartprivate_export.h:36
QHash< int, QString >
katepartprivate_export.h
QString
QKeyEvent
KateViKeyParser
for encoding keypresses w/ modifiers into an internal QChar representation and back again to a descri...
Definition: katevikeyparser.h:37
KateViKeyParser::~KateViKeyParser
~KateViKeyParser()
Definition: katevikeyparser.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal