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
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
Definition: kateviinputmodemanager.h:51
Definition: kateviinputmodemanager.h:54
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Definition: kateviinputmodemanager.h:49
const QChar KeyEventToQChar(const QKeyEvent &keyEvent)
Definition: katevikeyparser.cpp:661
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
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
QString completedText() const
Definition: kateviinputmodemanager.cpp:909
QString getMacro(QChar macroRegister)
Get the named macro in a format suitable for passing to feedKeyPresses.
Definition: kateviglobal.cpp:316
CompletionType completionType() const
Definition: kateviinputmodemanager.cpp:917
void addToNumberedRegister(const QString &text, OperationMode flag=CharWise)
Definition: kateviglobal.cpp:131
const QString decodeKeySequence(const QString &keys) const
Definition: katevikeyparser.cpp:619
bool removeTail() const
Definition: kateviinputmodemanager.cpp:913
const QString encodeKeySequence(const QString &keys) const
Definition: katevikeyparser.cpp:507
Definition: kateview.h:78
Definition: kateviinputmodemanager.h:53
Definition: kateviglobal.h:60
bool isMappingRecursive(MappingMode mode, const QString &from) const
Definition: kateviglobal.cpp:213
Definition: kateviglobal.h:61
CompletionType
Definition: kateviinputmodemanager.h:178
Definition: kateviinputmodemanager.h:52
Definition: kateviglobal.h:60
OperationMode getRegisterFlag(const QChar ®) const
Definition: kateviglobal.cpp:126
KateViEmulatedCommandBar * viModeEmulatedCommandBar()
Definition: kateview.cpp:2989
KHash2Map< QPersistentModelIndex, int > Mapping
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 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
T readEntry(const QString &key, const T &aDefault) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.