Kate
kateviglobal.cpp
Go to the documentation of this file.
58 macroContents.append(KateViKeyParser::self()->decodeKeySequence(m_macroForRegister[macroRegister]));
64 foreach(KateViInputModeManager::Completion completionForMacro, m_macroCompletionsForRegister[macroRegister])
90 m_macroForRegister[macroRegister] = KateViKeyParser::self()->encodeKeySequence(macroContents[macroIndex]);
91 macroCompletionsIndex = readMacroCompletions(macroRegister, macroCompletions, macroCompletionsIndex);
171 void KateViGlobal::addMapping( MappingMode mode, const QString& from, const QString& to, KateViGlobal::MappingRecursion recursion )
186 const QString KateViGlobal::getMapping( MappingMode mode, const QString& from, bool decode ) const
302 void KateViGlobal::storeMacro(QChar macroRegister, const QList< QKeyEvent > macroKeyEventLog, const QList< KateViInputModeManager::Completion > completions)
321 QList< KateViInputModeManager::Completion > KateViGlobal::getMacroCompletions(QChar macroRegister)
326 void KateViGlobal::writeMappingsToConfig(KConfigGroup& config, const QString& mappingModeName, MappingMode mappingMode) const
339 void KateViGlobal::readMappingsFromConfig(const KConfigGroup& config, const QString& mappingModeName, MappingMode mappingMode)
341 const QStringList keys = config.readEntry( mappingModeName + " Mode Mapping Keys", QStringList() );
342 const QStringList mappings = config.readEntry( mappingModeName + " Mode Mappings", QStringList() );
343 const QList<bool> isRecursive = config.readEntry( mappingModeName + " Mode Mappings Recursion", QList<bool>());
360 kDebug( 13070 ) << "Error when reading mappings from " + mappingModeName + " config: number of keys != number of values";
364 int KateViGlobal::readMacroCompletions(QChar macroRegister, const QStringList& encodedMacroCompletions, int macroCompletionsIndex)
377 m_macroCompletionsForRegister[macroRegister].append(decodeMacroCompletionFromConfig(encodedMacroCompletion));
384 QString KateViGlobal::encodeMacroCompletionForConfig(const KateViInputModeManager::Completion& completionForMacro) const
388 if (completionForMacro.completionType() == KateViInputModeManager::Completion::FunctionWithArgs)
392 else if (completionForMacro.completionType() == KateViInputModeManager::Completion::FunctionWithoutArgs)
407 KateViInputModeManager::Completion KateViGlobal::decodeMacroCompletionFromConfig(const QString& encodedMacroCompletion)
410 KateViInputModeManager::Completion::CompletionType completionType = KateViInputModeManager::Completion::PlainText;
422 kDebug(13070) << "Loaded completion: " << completionText << " , " << removeTail << " , " << completionType;
Definition: kateviinputmodemanager.h:50
const QString getMapping(MappingMode mode, const QString &from, bool decode=false) const
Definition: kateviglobal.cpp:186
Definition: katevimodebase.h:50
int length() const
void storeMacro(QChar macroRegister, const QList< QKeyEvent > macroKeyEventLog, const QList< KateViInputModeManager::Completion > completions)
Definition: kateviglobal.cpp:302
Definition: kateviglobal.h:61
const QStringList getMappings(MappingMode mode, bool decode=false) const
Definition: kateviglobal.cpp:196
const T & at(int i) const
Definition: kateviinputmodemanager.h:51
Definition: kateviinputmodemanager.h:54
Definition: kateviinputmodemanager.h:49
QString & remove(int position, int n)
const QChar KeyEventToQChar(const QKeyEvent &keyEvent)
Definition: katevikeyparser.cpp:674
Definition: kateviglobal.h:61
void removeMapping(MappingMode mode, const QString &from)
Definition: kateviglobal.cpp:181
void addMapping(MappingMode mode, const QString &from, const QString &to, MappingRecursion recursion)
Definition: kateviglobal.cpp:171
int size() const
QString completedText() const
Definition: kateviinputmodemanager.cpp:929
QString getMacro(QChar macroRegister)
Get the named macro in a format suitable for passing to feedKeyPresses.
Definition: kateviglobal.cpp:316
QString number(int n, int base)
void append(const T &value)
CompletionType completionType() const
Definition: kateviinputmodemanager.cpp:937
QClipboard * clipboard()
void addToNumberedRegister(const QString &text, OperationMode flag=CharWise)
Definition: kateviglobal.cpp:131
int toInt(bool *ok, int base) const
bool isEmpty() const
bool isEmpty() const
const QString decodeKeySequence(const QString &keys) const
Definition: katevikeyparser.cpp:632
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
bool removeTail() const
Definition: kateviinputmodemanager.cpp:933
int remove(const Key &key)
void pop_back()
const QString encodeKeySequence(const QString &keys) const
Definition: katevikeyparser.cpp:520
QList< Key > keys() const
Definition: kateview.h:77
Definition: kateviinputmodemanager.h:53
Definition: kateviglobal.h:60
void clear()
bool isMappingRecursive(MappingMode mode, const QString &from) const
Definition: kateviglobal.cpp:213
Definition: kateviglobal.h:61
bool contains(QChar ch, Qt::CaseSensitivity cs) const
CompletionType
Definition: kateviinputmodemanager.h:188
Definition: kateviinputmodemanager.h:52
QString text(Mode mode) const
QString & replace(int position, int n, QChar after)
Definition: kateviglobal.h:60
OperationMode getRegisterFlag(const QChar ®) const
Definition: kateviglobal.cpp:126
KateViEmulatedCommandBar * viModeEmulatedCommandBar()
Definition: kateview.cpp:3051
T & last()
static MappingMode mappingModeForCurrentViMode(KateView *view)
Returns CommandModeMapping if the emulated command bar is active, else the mapping mode corresponding...
Definition: kateviglobal.cpp:218
void writeConfig(KConfigGroup &config) const
Definition: kateviglobal.cpp:43
void appendReplaceHistoryItem(const QString &replaceHistoryItem)
Definition: kateviglobal.cpp:282
void appendCommandHistoryItem(const QString &commandHistoryItem)
Definition: kateviglobal.cpp:272
void setText(const QString &text, Mode mode)
void appendSearchHistoryItem(const QString &searchHistoryItem)
Definition: kateviglobal.cpp:257
QList< KateViInputModeManager::Completion > getMacroCompletions(QChar macroRegister)
Definition: kateviglobal.cpp:321
QString getRegisterContent(const QChar ®) const
Definition: kateviglobal.cpp:121
void fillRegister(const QChar ®, const QString &text, OperationMode flag=CharWise)
Definition: kateviglobal.cpp:146
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.