File indexing completed on 2024-03-24 16:41:30
0001 /************************************************************************** 0002 * Copyright (C) 2010 by Michel Ludwig (michel.ludwig@kdemail.net) * 0003 ***************************************************************************/ 0004 0005 /************************************************************************** 0006 * * 0007 * This program is free software; you can redistribute it and/or modify * 0008 * it under the terms of the GNU General Public License as published by * 0009 * the Free Software Foundation; either version 2 of the License, or * 0010 * (at your option) any later version. * 0011 * * 0012 ***************************************************************************/ 0013 0014 #ifndef EDITORCOMMANDS_H 0015 #define EDITORCOMMANDS_H 0016 0017 #include <QStringList> 0018 0019 #include <KTextEditor/Command> 0020 #include <KTextEditor/Editor> 0021 #include <KTextEditor/View> 0022 0023 class KileInfo; 0024 0025 /** 0026 * Implements bindings for commands like 'w', 'q', etc. for the VI input mode of KatePart. 0027 **/ 0028 class EditorCommands : public KTextEditor::Command { 0029 public: 0030 explicit EditorCommands(KileInfo *info); 0031 virtual ~EditorCommands(); 0032 0033 virtual bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, 0034 const KTextEditor::Range &range = KTextEditor::Range::invalid()) Q_DECL_OVERRIDE; 0035 virtual bool help(KTextEditor::View *view, const QString &cmd, QString &msg) Q_DECL_OVERRIDE; 0036 0037 private: 0038 KileInfo *m_ki; 0039 QStringList m_commandList; 0040 }; 0041 0042 #endif