• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • sources
  • kde-4.12
  • applications
  • kate
  • part
  • utils
kateautoindent.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2003 Jesse Yurkovich <yurkjes@iit.edu>
3  Copyright (C) 2004 >Anders Lund <anders@alweb.dk> (KateVarIndent class)
4  Copyright (C) 2005 Dominik Haumann <dhdev@gmx.de> (basic support for config page)
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #include "kateautoindent.h"
22 #include "kateautoindent.moc"
23 
24 #include "kateconfig.h"
25 #include "katehighlight.h"
26 #include "kateglobal.h"
27 #include "kateindentscript.h"
28 #include "katescriptmanager.h"
29 #include "kateview.h"
30 #include "kateextendedattribute.h"
31 #include "katedocument.h"
32 // #include "katebuffer.h"
33 
34 #include <klocale.h>
35 #include <kdebug.h>
36 #include <kmenu.h>
37 
38 #include <cctype>
39 
40 const QString MODE_NONE = QLatin1String("none");
41 const QString MODE_NORMAL = QLatin1String("normal");
42 
43 //BEGIN KateAutoIndent
44 
45 QStringList KateAutoIndent::listModes ()
46 {
47  QStringList l;
48 
49  for (int i = 0; i < modeCount(); ++i)
50  l << modeDescription(i);
51 
52  return l;
53 }
54 
55 QStringList KateAutoIndent::listIdentifiers ()
56 {
57  QStringList l;
58 
59  for (int i = 0; i < modeCount(); ++i)
60  l << modeName(i);
61 
62  return l;
63 }
64 
65 int KateAutoIndent::modeCount ()
66 {
67  // inbuild modes + scripts
68  return 2 + KateGlobal::self()->scriptManager()->indentationScriptCount();
69 }
70 
71 
72 QString KateAutoIndent::modeName (int mode)
73 {
74  if (mode == 0 || mode >= modeCount ())
75  return MODE_NONE;
76 
77  if (mode == 1)
78  return MODE_NORMAL;
79 
80  return KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().baseName();
81 }
82 
83 QString KateAutoIndent::modeDescription (int mode)
84 {
85  if (mode == 0 || mode >= modeCount ())
86  return i18nc ("Autoindent mode", "None");
87 
88  if (mode == 1)
89  return i18nc ("Autoindent mode", "Normal");
90 
91  return i18nc ("Autoindent mode", KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().name().toUtf8());
92 }
93 
94 QString KateAutoIndent::modeRequiredStyle(int mode)
95 {
96  if (mode == 0 || mode == 1 || mode >= modeCount())
97  return QString();
98 
99  return KateGlobal::self()->scriptManager()->indentationScriptByIndex(mode-2)->indentHeader().requiredStyle();
100 }
101 
102 uint KateAutoIndent::modeNumber (const QString &name)
103 {
104  for (int i = 0; i < modeCount(); ++i)
105  if (modeName(i) == name)
106  return i;
107 
108  return 0;
109 }
110 
111 KateAutoIndent::KateAutoIndent (KateDocument *_doc)
112  : QObject(_doc), doc(_doc), m_script (0)
113 {
114  // don't call updateConfig() here, document might is not ready for that....
115 
116  // on script reload, the script pointer is invalid -> force reload
117  connect(KateGlobal::self()->scriptManager(), SIGNAL(reloaded()),
118  this, SLOT(reloadScript()));
119 }
120 
121 KateAutoIndent::~KateAutoIndent ()
122 {
123 }
124 
125 QString KateAutoIndent::tabString (int length, int align) const
126 {
127  QString s;
128  length = qMin (length, 256); // sanity check for large values of pos
129  int spaces = qBound(0, align - length, 256);
130 
131  if (!useSpaces)
132  {
133  s.append (QString (length / tabWidth, '\t'));
134  length = length % tabWidth;
135  }
136  s.append(QString(length + spaces, ' '));
137 
138  return s;
139 }
140 
141 bool KateAutoIndent::doIndent(int line, int indentDepth, int align)
142 {
143  kDebug (13060) << "doIndent: line: " << line << " indentDepth: " << indentDepth << " align: " << align;
144 
145  Kate::TextLine textline = doc->plainKateTextLine(line);
146 
147  // textline not found, cu
148  if (!textline)
149  return false;
150 
151  // sanity check
152  if (indentDepth < 0)
153  indentDepth = 0;
154 
155  const QString oldIndentation = textline->leadingWhitespace();
156 
157  // Preserve existing "tabs then spaces" alignment if and only if:
158  // - no alignment was passed to doIndent and
159  // - we aren't using spaces for indentation and
160  // - we aren't rounding indentation up to the next multiple of the indentation width and
161  // - we aren't using a combination to tabs and spaces for alignment, or in other words
162  // the indent width is a multiple of the tab width.
163  bool preserveAlignment = !useSpaces && keepExtra && indentWidth % tabWidth == 0;
164  if (align == 0 && preserveAlignment)
165  {
166  // Count the number of consecutive spaces at the end of the existing indentation
167  int i = oldIndentation.size() - 1;
168  while (i >= 0 && oldIndentation.at(i) == ' ')
169  --i;
170  // Use the passed indentDepth as the alignment, and set the indentDepth to
171  // that value minus the number of spaces found (but don't let it get negative).
172  align = indentDepth;
173  indentDepth = qMax(0, align - (oldIndentation.size() - 1 - i));
174  }
175 
176  QString indentString = tabString(indentDepth, align);
177 
178  // Modify the document *ONLY* if smth has really changed!
179  if (oldIndentation != indentString)
180  {
181  // remove leading whitespace, then insert the leading indentation
182  doc->editStart ();
183  doc->editRemoveText (line, 0, oldIndentation.length());
184  doc->editInsertText (line, 0, indentString);
185  doc->editEnd ();
186  }
187 
188  return true;
189 }
190 
191 bool KateAutoIndent::doIndentRelative(int line, int change)
192 {
193  kDebug (13060) << "doIndentRelative: line: " << line << " change: " << change;
194 
195  Kate::TextLine textline = doc->plainKateTextLine(line);
196 
197  // get indent width of current line
198  int indentDepth = textline->indentDepth (tabWidth);
199  int extraSpaces = indentDepth % indentWidth;
200 
201  // add change
202  indentDepth += change;
203 
204  // if keepExtra is off, snap to a multiple of the indentWidth
205  if (!keepExtra && extraSpaces > 0)
206  {
207  if (change < 0)
208  indentDepth += indentWidth - extraSpaces;
209  else
210  indentDepth -= extraSpaces;
211  }
212 
213  // do indent
214  return doIndent(line, indentDepth);
215 }
216 
217 void KateAutoIndent::keepIndent ( int line )
218 {
219  // no line in front, no work...
220  if (line <= 0)
221  return;
222 
223  // keep indentation: find line with content
224  int nonEmptyLine = line - 1;
225  while (nonEmptyLine >= 0) {
226  if (doc->lineLength(nonEmptyLine) > 0) {
227  break;
228  }
229  --nonEmptyLine;
230  }
231  Kate::TextLine prevTextLine = doc->plainKateTextLine(nonEmptyLine);
232  Kate::TextLine textLine = doc->plainKateTextLine(line);
233 
234  // textline not found, cu
235  if (!prevTextLine || !textLine)
236  return;
237 
238  const QString previousWhitespace = prevTextLine->leadingWhitespace();
239 
240  // remove leading whitespace, then insert the leading indentation
241  doc->editStart ();
242 
243  if (!keepExtra)
244  {
245  const QString currentWhitespace = textLine->leadingWhitespace();
246  doc->editRemoveText (line, 0, currentWhitespace.length());
247  }
248 
249  doc->editInsertText (line, 0, previousWhitespace);
250  doc->editEnd ();
251 }
252 
253 void KateAutoIndent::reloadScript()
254 {
255  // small trick to force reload
256  m_script = 0; // prevent dangling pointer
257  QString currentMode = m_mode;
258  m_mode = QString();
259  setMode(currentMode);
260 }
261 
262 void KateAutoIndent::scriptIndent (KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
263 {
264  // start edit
265  doc->pushEditState();
266  doc->editStart();
267 
268  QPair<int, int> result = m_script->indent (view, position, typedChar, indentWidth);
269  int newIndentInChars = result.first;
270 
271  // handle negative values special
272  if (newIndentInChars < -1) {
273  // do nothing atm
274  }
275 
276  // reuse indentation of the previous line, just like the "normal" indenter
277  else if (newIndentInChars == -1)
278  {
279  // keep indent of previous line
280  keepIndent (position.line());
281  }
282 
283  // get align
284  else {
285  int align = result.second;
286  if (align > 0)
287  kDebug (13060) << "Align: " << align;
288 
289  // we got a positive or zero indent to use...
290  doIndent (position.line(), newIndentInChars, align);
291  }
292 
293  // end edit in all cases
294  doc->editEnd ();
295  doc->popEditState();
296 }
297 
298 bool KateAutoIndent::isStyleProvided(const KateIndentScript *script, const KateHighlighting *highlight)
299 {
300  QString requiredStyle = script->indentHeader().requiredStyle();
301  return (requiredStyle.isEmpty() || requiredStyle == highlight->style());
302 }
303 
304 void KateAutoIndent::setMode (const QString &name)
305 {
306  // bail out, already set correct mode...
307  if (m_mode == name)
308  return;
309 
310  // cleanup
311  m_script = 0;
312 
313  // first, catch easy stuff... normal mode and none, easy...
314  if ( name.isEmpty() || name == MODE_NONE )
315  {
316  m_mode = MODE_NONE;
317  return;
318  }
319 
320  if ( name == MODE_NORMAL )
321  {
322  m_mode = MODE_NORMAL;
323  return;
324  }
325 
326  // handle script indenters, if any for this name...
327  KateIndentScript *script = KateGlobal::self()->scriptManager()->indentationScript(name);
328  if ( script )
329  {
330  if (isStyleProvided(script, doc->highlight()))
331  {
332  m_script = script;
333  m_mode = name;
334 
335  kDebug( 13060 ) << "mode: " << name << "accepted";
336  return;
337  }
338  else
339  {
340  kWarning( 13060 ) << "mode" << name <<
341  "requires a different highlight style: document style '" << doc->highlightingMode() << "'"
342  ", but script require '" << script->indentHeader().requiredStyle() << "'"
343  ;
344  }
345  }
346  else
347  {
348  kWarning( 13060 ) << "mode" << name << "does not exist";
349  }
350 
351  // Fall back to normal
352  m_mode = MODE_NORMAL;
353 }
354 
355 void KateAutoIndent::checkRequiredStyle()
356 {
357  if (m_script)
358  {
359  if (!isStyleProvided(m_script, doc->highlight()))
360  {
361  kDebug( 13060 ) << "mode" << m_mode <<
362  "requires a different highlight style: document style '" << doc->highlightingMode() << "'"
363  ", but script require '" << m_script->indentHeader().requiredStyle() << "'"
364  ;
365  doc->config()->setIndentationMode(MODE_NORMAL);
366  }
367  }
368 }
369 
370 void KateAutoIndent::updateConfig ()
371 {
372  KateDocumentConfig *config = doc->config();
373 
374  useSpaces = config->replaceTabsDyn();
375  keepExtra = config->keepExtraSpaces();
376  tabWidth = config->tabWidth();
377  indentWidth = config->indentationWidth();
378 }
379 
380 
381 bool KateAutoIndent::changeIndent (const KTextEditor::Range &range, int change)
382 {
383  QList<int> skippedLines;
384 
385  // loop over all lines given...
386  for (int line = range.start().line () < 0 ? 0 : range.start().line ();
387  line <= qMin (range.end().line (), doc->lines()-1); ++line)
388  {
389  // don't indent empty lines
390  if (doc->line(line).isEmpty())
391  {
392  skippedLines.append (line);
393  continue;
394  }
395  // don't indent the last line when the cursor is on the first column
396  if (line == range.end().line() && range.end().column() == 0)
397  {
398  skippedLines.append (line);
399  continue;
400  }
401 
402  doIndentRelative(line, change * indentWidth);
403  }
404 
405  if (skippedLines.count() > range.numberOfLines())
406  {
407  // all lines were empty, so indent them nevertheless
408  foreach (int line, skippedLines)
409  doIndentRelative(line, change * indentWidth);
410  }
411 
412  return true;
413 }
414 
415 void KateAutoIndent::indent (KateView *view, const KTextEditor::Range &range)
416 {
417  // no script, do nothing...
418  if (!m_script)
419  return;
420 
421  // we want one undo action >= START
422  doc->setUndoMergeAllEdits(true);
423 
424  // loop over all lines given...
425  for (int line = range.start().line () < 0 ? 0 : range.start().line ();
426  line <= qMin (range.end().line (), doc->lines()-1); ++line)
427  {
428  // let the script indent for us...
429  scriptIndent (view, KTextEditor::Cursor (line, 0), QChar());
430  }
431 
432  // we want one undo action => END
433  doc->setUndoMergeAllEdits(false);
434 }
435 
436 void KateAutoIndent::userTypedChar (KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
437 {
438  // normal mode
439  if (m_mode == MODE_NORMAL)
440  {
441  // only indent on new line, per default
442  if (typedChar != '\n')
443  return;
444 
445  // keep indent of previous line
446  keepIndent (position.line());
447  return;
448  }
449 
450  // no script, do nothing...
451  if (!m_script)
452  return;
453 
454  // does the script allow this char as trigger?
455  if (typedChar != '\n' && !m_script->triggerCharacters().contains(typedChar))
456  return;
457 
458  // let the script indent for us...
459  scriptIndent (view, position, typedChar);
460 }
461 //END KateAutoIndent
462 
463 //BEGIN KateViewIndentAction
464 KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject *parent)
465  : KActionMenu (text, parent), doc(_doc)
466 {
467  connect(menu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
468  actionGroup = new QActionGroup(menu());
469 }
470 
471 void KateViewIndentationAction::slotAboutToShow()
472 {
473  QStringList modes = KateAutoIndent::listModes ();
474 
475  menu()->clear ();
476  foreach (QAction *action, actionGroup->actions()) {
477  actionGroup->removeAction(action);
478  }
479  for (int z=0; z<modes.size(); ++z) {
480  QAction *action = menu()->addAction( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&") );
481  actionGroup->addAction(action);
482  action->setCheckable( true );
483  action->setData( z );
484 
485  QString requiredStyle = KateAutoIndent::modeRequiredStyle(z);
486  action->setEnabled(requiredStyle.isEmpty() || requiredStyle == doc->highlight()->style());
487 
488  if ( doc->config()->indentationMode() == KateAutoIndent::modeName (z) )
489  action->setChecked( true );
490  }
491 
492  disconnect( menu(), SIGNAL(triggered(QAction*)), this, SLOT(setMode(QAction*)) );
493  connect( menu(), SIGNAL(triggered(QAction*)), this, SLOT(setMode(QAction*)) );
494 }
495 
496 void KateViewIndentationAction::setMode (QAction *action)
497 {
498  // set new mode
499  doc->config()->setIndentationMode(KateAutoIndent::modeName (action->data().toInt()));
500  doc->rememberUserDidSetIndentationMode ();
501 }
502 //END KateViewIndentationAction
503 
504 // kate: space-indent on; indent-width 2; replace-tabs on;
KateDocument::line
virtual QString line(int line) const
Definition: katedocument.cpp:447
KateViewIndentationAction::slotAboutToShow
void slotAboutToShow()
Definition: kateautoindent.cpp:471
KateDocument::highlightingMode
virtual QString highlightingMode() const
Return the name of the currently used mode.
Definition: katedocument.cpp:1494
KTextEditor::Range::start
Cursor & start()
KateDocument::config
KateDocumentConfig * config()
Configuration.
Definition: katedocument.h:1009
katehighlight.h
kateview.h
KateDocumentConfig::keepExtraSpaces
bool keepExtraSpaces() const
Definition: kateconfig.cpp:570
KateDocumentConfig::setIndentationMode
void setIndentationMode(const QString &identationMode)
Definition: kateconfig.cpp:459
KateAutoIndent::modeDescription
static QString modeDescription(int mode)
Return the mode description.
Definition: kateautoindent.cpp:83
KateAutoIndent::updateConfig
void updateConfig()
Update indenter's configuration (indention width, etc.) Is called in the updateConfig() of the docume...
Definition: kateautoindent.cpp:370
MODE_NORMAL
const QString MODE_NORMAL
Definition: kateautoindent.cpp:41
kdebug.h
KateDocument::highlight
KateHighlighting * highlight() const
Definition: katedocument.cpp:4702
KateScriptManager::indentationScriptCount
int indentationScriptCount()
Definition: katescriptmanager.h:121
Kate::Script::i18nc
QScriptValue i18nc(QScriptContext *context, QScriptEngine *engine)
i18nc("context", "text", arguments [optional])
Definition: katescripthelpers.cpp:210
KateDocument::rememberUserDidSetIndentationMode
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
KateDocument::lineLength
virtual int lineLength(int line) const
Definition: katedocument.cpp:758
kateautoindent.h
KateAutoIndent::setMode
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
katedocument.h
name
const char * name(StandardAction id)
KateAutoIndent::indent
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
KateAutoIndent::modeRequiredStyle
static QString modeRequiredStyle(int mode)
Return the syntax highlighting style required to use this mode.
Definition: kateautoindent.cpp:94
kateextendedattribute.h
KateGlobal::self
static KateGlobal * self()
Kate Part Internal stuff ;)
Definition: kateglobal.cpp:462
KateHighlighting::style
const QString & style() const
Definition: katehighlight.h:158
kateindentscript.h
QString
KateAutoIndent::listIdentifiers
static QStringList listIdentifiers()
List all possible names, i.e.
Definition: kateautoindent.cpp:55
QObject
kDebug
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KTextEditor::Cursor
klocale.h
KateDocument::plainKateTextLine
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4713
config
KSharedConfigPtr config()
KateDocumentConfig::replaceTabsDyn
bool replaceTabsDyn() const
Definition: kateconfig.cpp:696
KateDocument::popEditState
void popEditState()
Definition: katedocument.cpp:836
KateDocument::pushEditState
void pushEditState()
Definition: katedocument.cpp:831
KateViewIndentationAction::KateViewIndentationAction
KateViewIndentationAction(KateDocument *_doc, const QString &text, QObject *parent)
Definition: kateautoindent.cpp:464
KateDocument::editInsertText
bool editInsertText(int line, int col, const QString &s)
Add a string in the given line/column.
Definition: katedocument.cpp:971
kmenu.h
KateIndentScript::indent
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
kateglobal.h
KateScriptManager::indentationScript
KateIndentScript * indentationScript(const QString &scriptname)
Definition: katescriptmanager.h:119
QStringList
KateDocument::lines
virtual int lines() const
Definition: katedocument.cpp:753
KateScriptManager::indentationScriptByIndex
KateIndentScript * indentationScriptByIndex(int index)
Definition: katescriptmanager.h:122
KateAutoIndent::modeNumber
static uint modeNumber(const QString &name)
Maps name -> index.
Definition: kateautoindent.cpp:102
KateIndentScript
A specialized class for scripts that are of type KateScriptInformation::IndentationScript.
Definition: kateindentscript.h:94
KActionMenu::menu
KMenu * menu()
KateView
Definition: kateview.h:78
KTextEditor::Range
KateIndentScriptHeader::baseName
const QString & baseName() const
Definition: kateindentscript.h:58
KateDocument
Definition: katedocument.h:74
KateAutoIndent::userTypedChar
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
KateAutoIndent::modeCount
static int modeCount()
count of modes
Definition: kateautoindent.cpp:65
KateDocument::setUndoMergeAllEdits
void setUndoMergeAllEdits(bool merge)
Definition: katedocument.cpp:4723
KateAutoIndent::changeIndent
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
KateIndentScript::triggerCharacters
const QString & triggerCharacters()
Definition: kateindentscript.cpp:40
KateDocumentConfig::indentationMode
const QString & indentationMode() const
Definition: kateconfig.cpp:451
KateDocumentConfig::indentationWidth
int indentationWidth() const
Definition: kateconfig.cpp:427
replace
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
KTextEditor::Cursor::line
virtual int line() const
KAction::triggered
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
KActionMenu
KateDocument::editRemoveText
bool editRemoveText(int line, int col, int len)
Remove a string in the given line/column.
Definition: katedocument.cpp:1012
KateAutoIndent::modeName
const QString & modeName() const
mode name
Definition: kateautoindent.h:177
KateIndentScriptHeader::requiredStyle
const QString & requiredStyle() const
Definition: kateindentscript.h:43
KateDocument::editEnd
void editEnd()
End a editor operation.
Definition: katedocument.cpp:796
KTextEditor::Range::end
Cursor & end()
KateHighlighting
Definition: katehighlight.h:119
Kate::TextLine
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
KTextEditor::Range::numberOfLines
int numberOfLines() const
kWarning
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KateDocumentConfig
Definition: kateconfig.h:145
QPair
katescriptmanager.h
KateDocument::editStart
void editStart()
Enclose editor actions with editStart() and editEnd() to group them.
Definition: katedocument.cpp:776
KateDocumentConfig::tabWidth
int tabWidth() const
Definition: kateconfig.cpp:403
kateconfig.h
KTextEditor::Cursor::column
int column() const
KateAutoIndent::KateAutoIndent
KateAutoIndent(KateDocument *doc)
Constructor, creates dummy indenter "None".
Definition: kateautoindent.cpp:111
KateAutoIndent::~KateAutoIndent
~KateAutoIndent()
Destructor.
Definition: kateautoindent.cpp:121
MODE_NONE
const QString MODE_NONE
Definition: kateautoindent.cpp:40
QAction
KateAutoIndent::listModes
static QStringList listModes()
List all possible modes by name, i.e.
Definition: kateautoindent.cpp:45
KateAutoIndent::reloadScript
void reloadScript()
Definition: kateautoindent.cpp:253
KateAutoIndent::checkRequiredStyle
void checkRequiredStyle()
Check if the current highlighting mode provides the style required by the current indenter...
Definition: kateautoindent.cpp:355
QList< int >
KateGlobal::scriptManager
KateScriptManager * scriptManager()
Global script collection.
Definition: kateglobal.h:320
KateIndentScript::indentHeader
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

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal