Warning, file /frameworks/ktexteditor/src/inputmode/kateviinputmodefactory.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: KDE Developers
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "kateviinputmodefactory.h"
0008 #include "kateviinputmode.h"
0009 #include "vimode/globalstate.h"
0010 #include <vimode/config/configtab.h>
0011 
0012 #include <KConfig>
0013 #include <KLocalizedString>
0014 
0015 KateViInputModeFactory::KateViInputModeFactory()
0016     : KateAbstractInputModeFactory()
0017     , m_viGlobal(new KateVi::GlobalState())
0018 {
0019 }
0020 
0021 KateAbstractInputMode *KateViInputModeFactory::createInputMode(KateViewInternal *viewInternal)
0022 {
0023     return new KateViInputMode(viewInternal, m_viGlobal.get());
0024 }
0025 
0026 KateConfigPage *KateViInputModeFactory::createConfigPage(QWidget *parent)
0027 {
0028     return new KateVi::ConfigTab(parent, m_viGlobal->mappings());
0029 }
0030 
0031 KTextEditor::View::InputMode KateViInputModeFactory::inputMode()
0032 {
0033     return KTextEditor::View::ViInputMode;
0034 }
0035 
0036 QString KateViInputModeFactory::name()
0037 {
0038     return i18n("Vi Input Mode");
0039 }