Kate
kateautoindent.cpp
Go to the documentation of this file.
80 return KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().baseName();
91 return i18nc ("Autoindent mode", KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().name().toUtf8());
99 return KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().requiredStyle();
143 kDebug (13060) << "doIndent: line: " << line << " indentDepth: " << indentDepth << " align: " << align;
262 void KateAutoIndent::scriptIndent (KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
298 bool KateAutoIndent::isStyleProvided(const KateIndentScript *script, const KateHighlighting *highlight)
436 void KateAutoIndent::userTypedChar (KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
464 KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject *parent)
480 QAction *action = menu()->addAction( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&") );
virtual QString highlightingMode() const
Return the name of the currently used mode.
Definition: katedocument.cpp:1494
QString & append(QChar ch)
void setIndentationMode(const QString &identationMode)
Definition: kateconfig.cpp:500
static QString modeDescription(int mode)
Return the mode description.
Definition: kateautoindent.cpp:83
void updateConfig()
Update indenter's configuration (indention width, etc.) Is called in the updateConfig() of the docume...
Definition: kateautoindent.cpp:370
int indentationScriptCount()
Definition: katescriptmanager.h:121
QScriptValue i18nc(QScriptContext *context, QScriptEngine *engine)
i18nc("context", "text", arguments [optional])
Definition: katescripthelpers.cpp:210
void rememberUserDidSetIndentationMode()
set indentation mode by user this will remember that a user did set it and will avoid reset on save ...
Definition: katedocument.h:952
void setChecked(bool)
QVariant data() const
void setMode(const QString &name)
Switch indenter Nop if already set to given mode Otherwise switch to given indenter or to "None" if n...
Definition: kateautoindent.cpp:304
int size() const
QAction * addAction(QAction *action)
void indent(KateView *view, const KTextEditor::Range &range)
The document requests the indenter to indent the given range of existing text.
Definition: kateautoindent.cpp:415
static QString modeRequiredStyle(int mode)
Return the syntax highlighting style required to use this mode.
Definition: kateautoindent.cpp:94
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4712
int size() const
const char * name() const
int count(const T &value) const
void append(const T &value)
int toInt(bool *ok) const
KateViewIndentationAction(KateDocument *_doc, const QString &text, QObject *parent)
Definition: kateautoindent.cpp:464
bool editInsertText(int line, int col, const QString &s)
Add a string in the given line/column.
Definition: katedocument.cpp:971
QPair< int, int > indent(KateView *view, const KTextEditor::Cursor &position, QChar typedCharacter, int indentWidth)
Returns a pair where the first value is the indent amount, and the second value is the alignment...
Definition: kateindentscript.cpp:55
KateIndentScript * indentationScript(const QString &scriptname)
Definition: katescriptmanager.h:119
bool isEmpty() const
KateIndentScript * indentationScriptByIndex(int index)
Definition: katescriptmanager.h:122
A specialized class for scripts that are of type KateScriptInformation::IndentationScript.
Definition: kateindentscript.h:94
Definition: kateview.h:77
void setData(const QVariant &userData)
Definition: katedocument.h:74
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void userTypedChar(KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
The user typed some char, the indenter can react on this ' ' will be send as char if the user wraps a...
Definition: kateautoindent.cpp:436
void setUndoMergeAllEdits(bool merge)
Definition: katedocument.cpp:4722
bool changeIndent(const KTextEditor::Range &range, int change)
Function to provide the common indent/unindent/clean indent functionality to the document This should...
Definition: kateautoindent.cpp:381
void setCheckable(bool)
const QString & triggerCharacters()
Definition: kateindentscript.cpp:40
const QString & indentationMode() const
Definition: kateconfig.cpp:492
QList< QAction * > actions() const
bool editRemoveText(int line, int col, int len)
Remove a string in the given line/column.
Definition: katedocument.cpp:1012
const QString & requiredStyle() const
Definition: kateindentscript.h:43
Definition: katehighlight.h:119
const QChar at(int position) const
int length() const
Definition: kateconfig.h:145
void removeAction(QAction *action)
void editStart()
Enclose editor actions with editStart() and editEnd() to group them.
Definition: katedocument.cpp:776
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KateAutoIndent(KateDocument *doc)
Constructor, creates dummy indenter "None".
Definition: kateautoindent.cpp:111
void setEnabled(bool)
static QStringList listModes()
List all possible modes by name, i.e.
Definition: kateautoindent.cpp:45
void checkRequiredStyle()
Check if the current highlighting mode provides the style required by the current indenter...
Definition: kateautoindent.cpp:355
const KateIndentScriptHeader & indentHeader() const
Definition: kateindentscript.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:57 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:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.