Kate
kateviglobal.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries and the Kate part. 00002 * 00003 * Copyright (C) 2008 Erlend Hamberg <ehamberg@gmail.com> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KATE_VI_GLOBAL_H_INCLUDED 00022 #define KATE_VI_GLOBAL_H_INCLUDED 00023 00024 #include <QMap> 00025 #include <QHash> 00026 #include <QList> 00027 #include <QString> 00028 #include <QChar> 00029 #include "kateviinputmodemanager.h" 00030 00031 class KConfigGroup; 00032 00033 class KateViGlobal 00034 { 00035 public: 00036 KateViGlobal(); 00037 ~KateViGlobal(); 00038 00039 void writeConfig( KConfigGroup &config ) const; 00040 void readConfig( const KConfigGroup &config ); 00041 QString getRegisterContent( const QChar ® ) const; 00042 void addToNumberedRegister( const QString &text ); 00043 void fillRegister( const QChar ®, const QString &text); 00044 const QMap<QChar, QString>* getRegisters() { return m_registers; } 00045 00046 void clearMappings( ViMode mode ); 00047 void addMapping( ViMode mode, const QString &from, const QString &to ); 00048 const QString getMapping( ViMode mode, const QString &from, bool decode = false ) const; 00049 const QStringList getMappings( ViMode mode, bool decode = false ) const; 00050 00051 private: 00052 // registers 00053 QList<QString> *m_numberedRegisters; 00054 QMap<QChar, QString> *m_registers; 00055 QChar m_defaultRegister; 00056 QString m_registerTemp; 00057 00058 // mappings 00059 QHash <QString, QString> m_normalModeMappings; 00060 }; 00061 00062 #endif
KDE 4.6 API Reference