Kate
katevireplacemode.h
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 * Copyright (C) 2008 Erlend Hamberg <ehamberg@gmail.com> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) version 3. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this library; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KATE_VI_REPLACE_MODE_INCLUDED 00021 #define KATE_VI_REPLACE_MODE_INCLUDED 00022 00023 #include <QKeyEvent> 00024 #include "katevimodebase.h" 00025 00026 class KateViMotion; 00027 class KateView; 00028 class KateViewInternal; 00029 00034 class KateViReplaceMode : public KateViModeBase 00035 { 00036 public: 00037 KateViReplaceMode( KateViInputModeManager *viInputModeManager, KateView * view, KateViewInternal * viewInternal ); 00038 ~KateViReplaceMode(); 00039 00040 bool handleKeypress( const QKeyEvent *e ); 00041 00042 bool commandInsertFromLine( int offset ); 00043 00044 bool commandMoveOneWordLeft(); 00045 bool commandMoveOneWordRight(); 00046 00047 void overwrittenChar( const QChar &s ) { m_overwritten += s; } 00048 void backspace(); 00049 00050 // mappings aren't supported in replace mode 00051 void addMapping( const QString &from, const QString &to ) { Q_UNUSED(from) Q_UNUSED(to) } 00052 const QString getMapping( const QString &from ) const { Q_UNUSED(from) return QString(); } 00053 const QStringList getMappings() const { return QStringList(); } 00054 00055 private: 00056 QString m_overwritten; 00057 }; 00058 00059 #endif
KDE 4.4 API Reference