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
Cursor & start()
void setIndentationMode(const QString &identationMode)
Definition: kateconfig.cpp:459
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 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
const char * name(StandardAction id)
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
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4713
KSharedConfigPtr config()
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
KateIndentScript * indentationScriptByIndex(int index)
Definition: katescriptmanager.h:122
A specialized class for scripts that are of type KateScriptInformation::IndentationScript.
Definition: kateindentscript.h:94
KMenu * menu()
Definition: kateview.h:78
Definition: katedocument.h:74
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:4723
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
const QString & triggerCharacters()
Definition: kateindentscript.cpp:40
const QString & indentationMode() const
Definition: kateconfig.cpp:451
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
virtual int line() const
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
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
Cursor & end()
Definition: katehighlight.h:119
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
int numberOfLines() const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Definition: kateconfig.h:145
void editStart()
Enclose editor actions with editStart() and editEnd() to group them.
Definition: katedocument.cpp:776
int column() const
KateAutoIndent(KateDocument *doc)
Constructor, creates dummy indenter "None".
Definition: kateautoindent.cpp:111
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 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:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.