KateScriptDocument

KateScriptDocument Class Reference

#include <katescriptdocument.h>

Inheritance diagram for KateScriptDocument:

Public Member Functions

 KateScriptDocument (QJSEngine *, QObject *parent=nullptr)
 
KTextEditor::Cursor anchor (const KTextEditor::Cursor &cursor, QChar character)
 
Q_INVOKABLE QJSValue anchor (int line, int column, QChar character)
 
Q_INVOKABLE QJSValue anchor (const QJSValue &cursor, QChar character)
 
KTextEditor::Cursor anchorInternal (int line, int column, QChar character)
 
Q_INVOKABLE int attribute (int line, int column)
 
Q_INVOKABLE int attribute (const QJSValue &jscursor)
 
Q_INVOKABLE QString attributeName (int line, int column)
 
Q_INVOKABLE QString attributeName (const QJSValue &jscursor)
 
Q_INVOKABLE bool canBreakAt (const QString &character, int attribute)
 
Q_INVOKABLE bool canComment (int startAttribute, int endAttribute)
 
Q_INVOKABLE QString charAt (int line, int column)
 
Q_INVOKABLE QString charAt (const QJSValue &jscursor)
 
Q_INVOKABLE bool clear ()
 
Q_INVOKABLE QString commentEnd (int attribute)
 
Q_INVOKABLE QString commentMarker (int attribute)
 
Q_INVOKABLE QString commentStart (int attribute)
 
Q_INVOKABLE int defStyleNum (int line, int column)
 
Q_INVOKABLE int defStyleNum (const QJSValue &cursor)
 
KTextEditor::DocumentPrivate * document ()
 
Q_INVOKABLE QJSValue documentEnd ()
 
Q_INVOKABLE QJSValue documentRange ()
 
Q_INVOKABLE void editBegin ()
 
Q_INVOKABLE void editEnd ()
 
Q_INVOKABLE QStringList embeddedHighlightingModes ()
 
Q_INVOKABLE QString encoding ()
 
Q_INVOKABLE bool endsWith (int line, const QString &pattern, bool skipWhiteSpaces)
 
Q_INVOKABLE QString fileName ()
 
Q_INVOKABLE int findTouchedLine (int startLine, bool down)
 
Q_INVOKABLE QString firstChar (int line)
 
Q_INVOKABLE int firstColumn (int line)
 
Q_INVOKABLE int firstVirtualColumn (int line)
 
Q_INVOKABLE int fromVirtualColumn (int line, int virtualColumn)
 
Q_INVOKABLE int fromVirtualColumn (const QJSValue &jscursor)
 
Q_INVOKABLE QJSValue fromVirtualCursor (int line, int column)
 
Q_INVOKABLE QJSValue fromVirtualCursor (const QJSValue &jscursor)
 
Q_INVOKABLE QString highlightingMode ()
 
Q_INVOKABLE QString highlightingModeAt (const QJSValue &pos)
 
Q_INVOKABLE void indent (const QJSValue &jsrange, int change)
 
Q_INVOKABLE bool insertLine (int line, const QString &s)
 
Q_INVOKABLE bool insertText (int line, int column, const QString &s)
 
Q_INVOKABLE bool insertText (const QJSValue &jscursor, const QString &s)
 
Q_INVOKABLE bool isAttribute (int line, int column, int attr)
 
Q_INVOKABLE bool isAttribute (const QJSValue &jscursor, int attr)
 
Q_INVOKABLE bool isAttributeName (int line, int column, const QString &name)
 
Q_INVOKABLE bool isAttributeName (const QJSValue &cursor, const QString &name)
 
Q_INVOKABLE bool isChar (int line, int column)
 
Q_INVOKABLE bool isChar (const QJSValue &cursor)
 
Q_INVOKABLE bool isCode (int line, int column)
 
Q_INVOKABLE bool isCode (const QJSValue &cursor)
 
Q_INVOKABLE bool isComment (int line, int column)
 
Q_INVOKABLE bool isComment (const QJSValue &cursor)
 
Q_INVOKABLE bool isInWord (const QString &character, int attribute)
 
Q_INVOKABLE bool isLineModified (int line)
 
Q_INVOKABLE bool isLineSaved (int line)
 
Q_INVOKABLE bool isLineTouched (int line)
 
Q_INVOKABLE bool isModified ()
 
Q_INVOKABLE bool isOthers (int line, int column)
 
Q_INVOKABLE bool isOthers (const QJSValue &cursor)
 
Q_INVOKABLE bool isRegionMarker (int line, int column)
 
Q_INVOKABLE bool isRegionMarker (const QJSValue &cursor)
 
Q_INVOKABLE bool isSpace (int line, int column)
 
Q_INVOKABLE bool isSpace (const QJSValue &jscursor)
 
Q_INVOKABLE bool isString (int line, int column)
 
Q_INVOKABLE bool isString (const QJSValue &cursor)
 
Q_INVOKABLE bool isValidTextPosition (int line, int column)
 
Q_INVOKABLE bool isValidTextPosition (const QJSValue &cursor)
 
Q_INVOKABLE void joinLines (int startLine, int endLine)
 
Q_INVOKABLE QString lastChar (int line)
 
Q_INVOKABLE int lastColumn (int line)
 
Q_INVOKABLE int lastVirtualColumn (int line)
 
Q_INVOKABLE int length ()
 
Q_INVOKABLE QString line (int line)
 
Q_INVOKABLE int lineLength (int line)
 
Q_INVOKABLE int lines ()
 
Q_INVOKABLE bool matchesAt (int line, int column, const QString &s)
 
Q_INVOKABLE bool matchesAt (const QJSValue &cursor, const QString &s)
 
Q_INVOKABLE QString mimeType ()
 
Q_INVOKABLE int nextNonEmptyLine (int line)
 
Q_INVOKABLE int nextNonSpaceColumn (int line, int column)
 
Q_INVOKABLE int nextNonSpaceColumn (const QJSValue &jscursor)
 
Q_INVOKABLE int prevNonEmptyLine (int line)
 
Q_INVOKABLE int prevNonSpaceColumn (int line, int column)
 
Q_INVOKABLE int prevNonSpaceColumn (const QJSValue &jscursor)
 
Q_INVOKABLE bool removeLine (int line)
 
Q_INVOKABLE bool removeText (int fromLine, int fromColumn, int toLine, int toColumn)
 
Q_INVOKABLE bool removeText (const QJSValue &range)
 
Q_INVOKABLE bool removeText (const QJSValue &jsfrom, const QJSValue &jsto)
 
KTextEditor::Cursor rfind (const KTextEditor::Cursor &cursor, const QString &text, int attribute=-1)
 
Q_INVOKABLE QJSValue rfind (int line, int column, const QString &text, int attribute=-1)
 
Q_INVOKABLE QJSValue rfind (const QJSValue &cursor, const QString &text, int attribute=-1)
 
KTextEditor::Cursor rfindInternal (int line, int column, const QString &text, int attribute=-1)
 
void setDocument (KTextEditor::DocumentPrivate *document)
 
Q_INVOKABLE bool setText (const QString &s)
 
Q_INVOKABLE void setVariable (const QString &s, const QString &v)
 
Q_INVOKABLE bool startsWith (int line, const QString &pattern, bool skipWhiteSpaces)
 
Q_INVOKABLE QString text ()
 
Q_INVOKABLE QString text (int fromLine, int fromColumn, int toLine, int toColumn)
 
Q_INVOKABLE QString text (const QJSValue &jsfrom, const QJSValue &jsto)
 
Q_INVOKABLE QString text (const QJSValue &jsrange)
 
Q_INVOKABLE int toVirtualColumn (int line, int column)
 
Q_INVOKABLE int toVirtualColumn (const QJSValue &cursor)
 
Q_INVOKABLE QJSValue toVirtualCursor (int line, int column)
 
Q_INVOKABLE QJSValue toVirtualCursor (const QJSValue &jscursor)
 
Q_INVOKABLE bool truncate (int line, int column)
 
Q_INVOKABLE bool truncate (const QJSValue &jscursor)
 
Q_INVOKABLE QString url ()
 
Q_INVOKABLE QString variable (const QString &s)
 
Q_INVOKABLE QString wordAt (int line, int column)
 
Q_INVOKABLE QString wordAt (const QJSValue &jscursor)
 
Q_INVOKABLE QJSValue wordRangeAt (int line, int column)
 
Q_INVOKABLE QJSValue wordRangeAt (const QJSValue &jscursor)
 
Q_INVOKABLE bool wrapLine (int line, int column)
 
Q_INVOKABLE bool wrapLine (const QJSValue &cursor)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction 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)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Thinish wrapping around KTextEditor::DocumentPrivate, exposing the methods we want exposed and adding some helper methods.

setDocument must be called before using any other method. This is not checked for the sake of speed.

Definition at line 33 of file katescriptdocument.h.

Member Function Documentation

int KateScriptDocument::attribute ( int  line,
int  column 
)

Get the syntax highlighting attribute at a given position in the document.

Definition at line 756 of file katescriptdocument.cpp.

QString KateScriptDocument::attributeName ( int  line,
int  column 
)

Get the name of the syntax highlighting attribute at the given position.

Definition at line 782 of file katescriptdocument.cpp.

bool KateScriptDocument::isAttribute ( int  line,
int  column,
int  attr 
)

Return true if the highlight attribute equals attr.

Definition at line 771 of file katescriptdocument.cpp.

bool KateScriptDocument::isAttributeName ( int  line,
int  column,
const QString name 
)

Return true is the name of the syntax attribute equals name.

Definition at line 793 of file katescriptdocument.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:56:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.