Kate
KateAutoIndent Class Reference
Provides Auto-Indent functionality for katepart. More...
#include <kateautoindent.h>
Public Slots | |
virtual void | updateConfig () |
Public Member Functions | |
virtual bool | canProcessLine () const |
virtual bool | canProcessNewLine () const |
KateAutoIndent (KateDocument *doc) | |
virtual uint | modeNumber () const |
virtual void | processChar (QChar c) |
virtual void | processLine (KateDocCursor &) |
virtual void | processNewline (KateDocCursor &cur, bool needContinue) |
virtual void | processSection (const KateDocCursor &, const KateDocCursor &) |
virtual | ~KateAutoIndent () |
Static Public Member Functions | |
static IndenterConfigPage * | configPage (QWidget *parent, uint mode) |
static KateAutoIndent * | createIndenter (KateDocument *doc, uint mode) |
static bool | hasConfigPage (uint mode) |
static QStringList | listModes () |
static QString | modeDescription (uint mode) |
static QString | modeName (uint mode) |
static uint | modeNumber (const QString &name) |
Protected Attributes | |
KateDocument * | doc |
Detailed Description
Provides Auto-Indent functionality for katepart.This baseclass is a real dummy, does nothing beside remembering the document it belongs too, only to have the object around
Definition at line 70 of file kateautoindent.h.
Constructor & Destructor Documentation
KateAutoIndent::KateAutoIndent | ( | KateDocument * | doc | ) |
KateAutoIndent::~KateAutoIndent | ( | ) | [virtual] |
Member Function Documentation
virtual bool KateAutoIndent::canProcessLine | ( | ) | const [inline, virtual] |
Set to true if an actual implementation of 'processLine' is present.
This is used to prevent a needless Undo action from being created.
Reimplemented in KateNormalIndent, KateCSmartIndent, KateXmlIndent, KateCSAndSIndent, KateVarIndent, and KateScriptIndent.
Definition at line 179 of file kateautoindent.h.
virtual bool KateAutoIndent::canProcessNewLine | ( | ) | const [inline, virtual] |
does this indenter support processNewLine
- Returns:
- can you do it?
Reimplemented in KateNormalIndent.
Definition at line 149 of file kateautoindent.h.
IndenterConfigPage * KateAutoIndent::configPage | ( | QWidget * | parent, | |
uint | mode | |||
) | [static] |
Support for a config page.
- Returns:
- config page or 0 if not available.
Definition at line 142 of file kateautoindent.cpp.
KateAutoIndent * KateAutoIndent::createIndenter | ( | KateDocument * | doc, | |
uint | mode | |||
) | [static] |
Static methods to create and list indention modes.
Create an indenter
- Parameters:
-
doc document for the indenter mode indention mode wanted
- Returns:
- created autoindention object
Definition at line 38 of file kateautoindent.cpp.
Config page support.
- Parameters:
-
mode mode index
- Returns:
- true, if the indenter
mode
has a configuration page
Definition at line 134 of file kateautoindent.cpp.
QStringList KateAutoIndent::listModes | ( | ) | [static] |
List all possible modes by name.
- Returns:
- list of modes
Definition at line 58 of file kateautoindent.cpp.
Return the mode description.
- Parameters:
-
mode mode index
- Returns:
- mode index
Definition at line 94 of file kateautoindent.cpp.
Return the mode name given the mode.
- Parameters:
-
mode mode index
- Returns:
- name for this mode index
Definition at line 74 of file kateautoindent.cpp.
virtual uint KateAutoIndent::modeNumber | ( | ) | const [inline, virtual] |
Mode index of this mode.
- Returns:
- modeNumber
Reimplemented in KateNormalIndent, KateCSmartIndent, KatePythonIndent, KateXmlIndent, KateCSAndSIndent, KateVarIndent, and KateScriptIndent.
Definition at line 185 of file kateautoindent.h.
Maps name -> index.
- Parameters:
-
name mode name
- Returns:
- mode index
Definition at line 114 of file kateautoindent.cpp.
virtual void KateAutoIndent::processChar | ( | QChar | c | ) | [inline, virtual] |
Called every time a character is inserted into the document.
- Parameters:
-
c character inserted
Reimplemented in KateNormalIndent, KateCSmartIndent, KateXmlIndent, KateCSAndSIndent, KateVarIndent, and KateScriptIndent.
Definition at line 163 of file kateautoindent.h.
virtual void KateAutoIndent::processLine | ( | KateDocCursor & | ) | [inline, virtual] |
Aligns/indents the given line to the proper indent position.
Reimplemented in KateNormalIndent, KateCSmartIndent, KateXmlIndent, KateCSAndSIndent, KateVarIndent, and KateScriptIndent.
Definition at line 168 of file kateautoindent.h.
virtual void KateAutoIndent::processNewline | ( | KateDocCursor & | cur, | |
bool | needContinue | |||
) | [inline, virtual] |
Called every time a newline character is inserted in the document.
- Parameters:
-
cur The position to start processing. Contains the new cursor position after the indention. needContinue Used to determine whether to calculate a continue indent or not.
Reimplemented in KateNormalIndent, KateCSmartIndent, KatePythonIndent, KateXmlIndent, KateCSAndSIndent, KateVarIndent, and KateScriptIndent.
Definition at line 157 of file kateautoindent.h.
virtual void KateAutoIndent::processSection | ( | const KateDocCursor & | , | |
const KateDocCursor & | ||||
) | [inline, virtual] |
Processes a section of text, indenting each line in between.
Reimplemented in KateNormalIndent, KateCSmartIndent, KateXmlIndent, KateCSAndSIndent, and KateVarIndent.
Definition at line 173 of file kateautoindent.h.
virtual void KateAutoIndent::updateConfig | ( | ) | [inline, virtual, slot] |
Update indenter's configuration (indention width, attributes etc.
)
Reimplemented in KateNormalIndent.
Definition at line 142 of file kateautoindent.h.
Member Data Documentation
KateDocument* KateAutoIndent::doc [protected] |
Definition at line 185 of file kateautoindent.h.
The documentation for this class was generated from the following files: