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

Kate

Public Slots | Public Member Functions | Static Public Member Functions | List of all members
KateAutoIndent Class Reference

#include <kateautoindent.h>

Inheritance diagram for KateAutoIndent:
Inheritance graph
[legend]

Public Slots

void reloadScript ()
 

Public Member Functions

 KateAutoIndent (KateDocument *doc)
 
 ~KateAutoIndent ()
 
bool changeIndent (const KTextEditor::Range &range, int change)
 
void checkRequiredStyle ()
 
void indent (KateView *view, const KTextEditor::Range &range)
 
const QString & modeName () const
 
void setMode (const QString &name)
 
void updateConfig ()
 
void userTypedChar (KateView *view, const KTextEditor::Cursor &position, QChar typedChar)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static QStringList listIdentifiers ()
 
static QStringList listModes ()
 
static int modeCount ()
 
static QString modeDescription (int mode)
 
static QString modeName (int mode)
 
static uint modeNumber (const QString &name)
 
static QString modeRequiredStyle (int mode)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

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 40 of file kateautoindent.h.

Constructor & Destructor Documentation

KateAutoIndent::KateAutoIndent ( KateDocument *  doc)
explicit

Constructor, creates dummy indenter "None".

Parameters
docparent document

Definition at line 111 of file kateautoindent.cpp.

KateAutoIndent::~KateAutoIndent ( )

Destructor.

Definition at line 121 of file kateautoindent.cpp.

Member Function Documentation

bool KateAutoIndent::changeIndent ( const KTextEditor::Range &  range,
int  change 
)

Function to provide the common indent/unindent/clean indent functionality to the document This should be generic for all indenters, internally it uses the doIndent function.

This works equal for all indenters, even for "none" or the scripts

Parameters
rangerange of text to change indent for
changelevel of indents to add or remove, zero will still trigger cleaning of indentation and removal of extra spaces, if option set
Returns
true on success, otherwise false

Definition at line 381 of file kateautoindent.cpp.

void KateAutoIndent::checkRequiredStyle ( )

Check if the current highlighting mode provides the style required by the current indenter.

If not, deactivate the indenter by changing to "normal" mode.

Definition at line 355 of file kateautoindent.cpp.

void KateAutoIndent::indent ( KateView *  view,
const KTextEditor::Range &  range 
)

The document requests the indenter to indent the given range of existing text.

This may happen to indent text pasted or to reindent existing text. For "none" and "normal" this is a nop, for the scripts, the expression will be asked for indent level for each line

Parameters
viewthe view the user work at
rangethe range of text to indent...

Definition at line 415 of file kateautoindent.cpp.

QStringList KateAutoIndent::listIdentifiers ( )
static

List all possible names, i.e.

"cstyle", "xml", ...

Returns
list of indenter identifiers

Definition at line 55 of file kateautoindent.cpp.

QStringList KateAutoIndent::listModes ( )
static

List all possible modes by name, i.e.

"C Style", "XML Style", ...

Returns
list of modes

Definition at line 45 of file kateautoindent.cpp.

int KateAutoIndent::modeCount ( )
static

count of modes

Returns
number of existing modes

Definition at line 65 of file kateautoindent.cpp.

QString KateAutoIndent::modeDescription ( int  mode)
static

Return the mode description.

Parameters
modemode index
Returns
mode index

Definition at line 83 of file kateautoindent.cpp.

QString KateAutoIndent::modeName ( int  mode)
static

Return the mode name given the mode.

Parameters
modemode index
Returns
name for this mode index

Definition at line 72 of file kateautoindent.cpp.

const QString& KateAutoIndent::modeName ( ) const
inline

mode name

Definition at line 177 of file kateautoindent.h.

uint KateAutoIndent::modeNumber ( const QString &  name)
static

Maps name -> index.

Parameters
namemode name
Returns
mode index

Definition at line 102 of file kateautoindent.cpp.

QString KateAutoIndent::modeRequiredStyle ( int  mode)
static

Return the syntax highlighting style required to use this mode.

Parameters
modemode index
Returns
required style, or empty if the mode doesn't require any style

Definition at line 94 of file kateautoindent.cpp.

void KateAutoIndent::reloadScript ( )
slot

Definition at line 253 of file kateautoindent.cpp.

void KateAutoIndent::setMode ( const QString &  name)

Switch indenter Nop if already set to given mode Otherwise switch to given indenter or to "None" if no suitable found...

Parameters
nameindention mode wanted

Definition at line 304 of file kateautoindent.cpp.

void KateAutoIndent::updateConfig ( )

Update indenter's configuration (indention width, etc.) Is called in the updateConfig() of the document and after creation of the indenter...

Definition at line 370 of file kateautoindent.cpp.

void KateAutoIndent::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 line.

Parameters
viewthe view the user work at
positioncurrent cursor position, after the inserted char...
typedCharthe inserted char

Definition at line 436 of file kateautoindent.cpp.


The documentation for this class was generated from the following files:
  • kateautoindent.h
  • kateautoindent.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:00 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
  • 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