KTextEditor

kateviinputmodefactory.cpp
1/*
2 SPDX-FileCopyrightText: KDE Developers
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "kateviinputmodefactory.h"
8#include "kateviinputmode.h"
9#include "vimode/globalstate.h"
10#include <vimode/config/configtab.h>
11
12#include <KConfig>
13#include <KLocalizedString>
14
15KateViInputModeFactory::KateViInputModeFactory()
16 : KateAbstractInputModeFactory()
17 , m_viGlobal(new KateVi::GlobalState())
18{
19}
20
21KateAbstractInputMode *KateViInputModeFactory::createInputMode(KateViewInternal *viewInternal)
22{
23 return new KateViInputMode(viewInternal, m_viGlobal.get());
24}
25
26KateConfigPage *KateViInputModeFactory::createConfigPage(QWidget *parent)
27{
28 return new KateVi::ConfigTab(parent, m_viGlobal->mappings());
29}
30
31KTextEditor::View::InputMode KateViInputModeFactory::inputMode()
32{
34}
35
36QString KateViInputModeFactory::name()
37{
38 return i18n("Vi Input Mode");
39}
InputMode
Possible input modes.
Definition view.h:286
@ ViInputMode
Vi mode.
Definition view.h:288
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.