Kate
#include <katescriptdocument.h>
Public Member Functions | |
KateScriptDocument (QObject *parent=0) | |
Q_INVOKABLE void | align (const KTextEditor::Range &range) |
Q_INVOKABLE KTextEditor::Cursor | anchor (int line, int column, QChar character) |
Q_INVOKABLE KTextEditor::Cursor | anchor (const KTextEditor::Cursor &cursor, QChar character) |
Q_INVOKABLE int | attribute (int line, int column) |
Q_INVOKABLE int | attribute (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE QString | attributeName (int line, int column) |
Q_INVOKABLE QString | attributeName (const KTextEditor::Cursor &cursor) |
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 KTextEditor::Cursor &cursor) |
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 KTextEditor::Cursor &cursor) |
KateDocument * | document () |
Q_INVOKABLE KTextEditor::Cursor | documentEnd () |
Q_INVOKABLE KTextEditor::Range | 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 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 KTextEditor::Cursor &virtualCursor) |
Q_INVOKABLE KTextEditor::Cursor | fromVirtualCursor (const KTextEditor::Cursor &virtualCursor) |
Q_INVOKABLE QString | highlightingMode () |
Q_INVOKABLE QString | highlightingModeAt (const KTextEditor::Cursor &pos) |
Q_INVOKABLE void | indent (KTextEditor::Range range, 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 KTextEditor::Cursor &cursor, const QString &s) |
Q_INVOKABLE bool | isAttribute (int line, int column, int attr) |
Q_INVOKABLE bool | isAttribute (const KTextEditor::Cursor &cursor, int attr) |
Q_INVOKABLE bool | isAttributeName (int line, int column, const QString &name) |
Q_INVOKABLE bool | isAttributeName (const KTextEditor::Cursor &cursor, const QString &name) |
Q_INVOKABLE bool | isChar (int line, int column) |
Q_INVOKABLE bool | isChar (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isCode (int line, int column) |
Q_INVOKABLE bool | isCode (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isComment (int line, int column) |
Q_INVOKABLE bool | isComment (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isInWord (const QString &character, int attribute) |
Q_INVOKABLE bool | isModified () |
Q_INVOKABLE bool | isOthers (int line, int column) |
Q_INVOKABLE bool | isOthers (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isRegionMarker (int line, int column) |
Q_INVOKABLE bool | isRegionMarker (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isSpace (int line, int column) |
Q_INVOKABLE bool | isSpace (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | isString (int line, int column) |
Q_INVOKABLE bool | isString (const KTextEditor::Cursor &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 KTextEditor::Cursor &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 KTextEditor::Cursor &cursor) |
Q_INVOKABLE int | prevNonEmptyLine (int line) |
Q_INVOKABLE int | prevNonSpaceColumn (int line, int column) |
Q_INVOKABLE int | prevNonSpaceColumn (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | removeLine (int line) |
Q_INVOKABLE bool | removeText (int fromLine, int fromColumn, int toLine, int toColumn) |
Q_INVOKABLE bool | removeText (const KTextEditor::Cursor &from, const KTextEditor::Cursor &to) |
Q_INVOKABLE bool | removeText (const KTextEditor::Range &range) |
Q_INVOKABLE KTextEditor::Cursor | rfind (int line, int column, const QString &text, int attribute=-1) |
Q_INVOKABLE KTextEditor::Cursor | rfind (const KTextEditor::Cursor &cursor, const QString &text, int attribute=-1) |
void | setDocument (KateDocument *document) |
Q_INVOKABLE bool | setText (const QString &s) |
Q_INVOKABLE QString | 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 KTextEditor::Cursor &from, const KTextEditor::Cursor &to) |
Q_INVOKABLE QString | text (const KTextEditor::Range &range) |
Q_INVOKABLE int | toVirtualColumn (int line, int column) |
Q_INVOKABLE int | toVirtualColumn (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE KTextEditor::Cursor | toVirtualCursor (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | truncate (int line, int column) |
Q_INVOKABLE bool | truncate (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE QString | url () |
Q_INVOKABLE QString | variable (const QString &s) |
Q_INVOKABLE QString | wordAt (int line, int column) |
Q_INVOKABLE QString | wordAt (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE KTextEditor::Range | wordRangeAt (int line, int column) |
Q_INVOKABLE KTextEditor::Range | wordRangeAt (const KTextEditor::Cursor &cursor) |
Q_INVOKABLE bool | wrapLine (int line, int column) |
Q_INVOKABLE bool | wrapLine (const KTextEditor::Cursor &cursor) |
Detailed Description
Thinish wrapping around KateDocument, exposing the methods we want exposed and adding some helper methods.
We inherit from QScriptable to have more thight access to the scripting engine.
setDocument must be called before using any other method. This is not checked for the sake of speed.
Definition at line 46 of file katescriptdocument.h.
Constructor & Destructor Documentation
KateScriptDocument::KateScriptDocument | ( | QObject * | parent = 0 | ) |
Definition at line 34 of file katescriptdocument.cpp.
Member Function Documentation
void KateScriptDocument::align | ( | const KTextEditor::Range & | range | ) |
Definition at line 728 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::anchor | ( | int | line, |
int | column, | ||
QChar | character | ||
) |
Definition at line 227 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::anchor | ( | const KTextEditor::Cursor & | cursor, |
QChar | character | ||
) |
Definition at line 275 of file katescriptdocument.cpp.
int KateScriptDocument::attribute | ( | int | line, |
int | column | ||
) |
Get the syntax highlighting attribute at a given position in the document.
Definition at line 658 of file katescriptdocument.cpp.
int KateScriptDocument::attribute | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 665 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 680 of file katescriptdocument.cpp.
QString KateScriptDocument::attributeName | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 687 of file katescriptdocument.cpp.
Definition at line 623 of file katescriptdocument.cpp.
bool KateScriptDocument::canComment | ( | int | startAttribute, |
int | endAttribute | ||
) |
Definition at line 628 of file katescriptdocument.cpp.
QString KateScriptDocument::charAt | ( | int | line, |
int | column | ||
) |
Definition at line 406 of file katescriptdocument.cpp.
QString KateScriptDocument::charAt | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 411 of file katescriptdocument.cpp.
bool KateScriptDocument::clear | ( | ) |
Definition at line 461 of file katescriptdocument.cpp.
QString KateScriptDocument::commentEnd | ( | int | attribute | ) |
Definition at line 643 of file katescriptdocument.cpp.
QString KateScriptDocument::commentMarker | ( | int | attribute | ) |
Definition at line 633 of file katescriptdocument.cpp.
QString KateScriptDocument::commentStart | ( | int | attribute | ) |
Definition at line 638 of file katescriptdocument.cpp.
int KateScriptDocument::defStyleNum | ( | int | line, |
int | column | ||
) |
Definition at line 49 of file katescriptdocument.cpp.
int KateScriptDocument::defStyleNum | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 54 of file katescriptdocument.cpp.
KateDocument * KateScriptDocument::document | ( | ) |
Definition at line 44 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::documentEnd | ( | ) |
Definition at line 653 of file katescriptdocument.cpp.
KTextEditor::Range KateScriptDocument::documentRange | ( | ) |
Definition at line 648 of file katescriptdocument.cpp.
void KateScriptDocument::editBegin | ( | ) |
Definition at line 546 of file katescriptdocument.cpp.
void KateScriptDocument::editEnd | ( | ) |
Definition at line 551 of file katescriptdocument.cpp.
QStringList KateScriptDocument::embeddedHighlightingModes | ( | ) |
Definition at line 333 of file katescriptdocument.cpp.
QString KateScriptDocument::encoding | ( | ) |
Definition at line 323 of file katescriptdocument.cpp.
Definition at line 293 of file katescriptdocument.cpp.
QString KateScriptDocument::fileName | ( | ) |
Definition at line 308 of file katescriptdocument.cpp.
QString KateScriptDocument::firstChar | ( | int | line | ) |
Definition at line 417 of file katescriptdocument.cpp.
int KateScriptDocument::firstColumn | ( | int | line | ) |
Definition at line 556 of file katescriptdocument.cpp.
int KateScriptDocument::firstVirtualColumn | ( | int | line | ) |
Definition at line 125 of file katescriptdocument.cpp.
int KateScriptDocument::fromVirtualColumn | ( | int | line, |
int | virtualColumn | ||
) |
Definition at line 164 of file katescriptdocument.cpp.
int KateScriptDocument::fromVirtualColumn | ( | const KTextEditor::Cursor & | virtualCursor | ) |
Definition at line 173 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::fromVirtualCursor | ( | const KTextEditor::Cursor & | virtualCursor | ) |
Definition at line 178 of file katescriptdocument.cpp.
QString KateScriptDocument::highlightingMode | ( | ) |
Definition at line 328 of file katescriptdocument.cpp.
QString KateScriptDocument::highlightingModeAt | ( | const KTextEditor::Cursor & | pos | ) |
Definition at line 338 of file katescriptdocument.cpp.
void KateScriptDocument::indent | ( | KTextEditor::Range | range, |
int | change | ||
) |
Definition at line 723 of file katescriptdocument.cpp.
Definition at line 506 of file katescriptdocument.cpp.
Definition at line 481 of file katescriptdocument.cpp.
bool KateScriptDocument::insertText | ( | const KTextEditor::Cursor & | cursor, |
const QString & | s | ||
) |
Definition at line 486 of file katescriptdocument.cpp.
bool KateScriptDocument::isAttribute | ( | int | line, |
int | column, | ||
int | attr | ||
) |
Return true if the highlight attribute equals attr
.
Definition at line 670 of file katescriptdocument.cpp.
bool KateScriptDocument::isAttribute | ( | const KTextEditor::Cursor & | cursor, |
int | attr | ||
) |
Definition at line 675 of file katescriptdocument.cpp.
Return true is the name of the syntax attribute equals name
.
Definition at line 692 of file katescriptdocument.cpp.
bool KateScriptDocument::isAttributeName | ( | const KTextEditor::Cursor & | cursor, |
const QString & | name | ||
) |
Definition at line 697 of file katescriptdocument.cpp.
bool KateScriptDocument::isChar | ( | int | line, |
int | column | ||
) |
Definition at line 103 of file katescriptdocument.cpp.
bool KateScriptDocument::isChar | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 109 of file katescriptdocument.cpp.
bool KateScriptDocument::isCode | ( | int | line, |
int | column | ||
) |
Definition at line 60 of file katescriptdocument.cpp.
bool KateScriptDocument::isCode | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 66 of file katescriptdocument.cpp.
bool KateScriptDocument::isComment | ( | int | line, |
int | column | ||
) |
Definition at line 71 of file katescriptdocument.cpp.
bool KateScriptDocument::isComment | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 76 of file katescriptdocument.cpp.
Definition at line 618 of file katescriptdocument.cpp.
bool KateScriptDocument::isModified | ( | ) |
Definition at line 343 of file katescriptdocument.cpp.
bool KateScriptDocument::isOthers | ( | int | line, |
int | column | ||
) |
Definition at line 114 of file katescriptdocument.cpp.
bool KateScriptDocument::isOthers | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 120 of file katescriptdocument.cpp.
bool KateScriptDocument::isRegionMarker | ( | int | line, |
int | column | ||
) |
Definition at line 92 of file katescriptdocument.cpp.
bool KateScriptDocument::isRegionMarker | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 98 of file katescriptdocument.cpp.
bool KateScriptDocument::isSpace | ( | int | line, |
int | column | ||
) |
Definition at line 435 of file katescriptdocument.cpp.
bool KateScriptDocument::isSpace | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 440 of file katescriptdocument.cpp.
bool KateScriptDocument::isString | ( | int | line, |
int | column | ||
) |
Definition at line 81 of file katescriptdocument.cpp.
bool KateScriptDocument::isString | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 87 of file katescriptdocument.cpp.
void KateScriptDocument::joinLines | ( | int | startLine, |
int | endLine | ||
) |
Definition at line 526 of file katescriptdocument.cpp.
QString KateScriptDocument::lastChar | ( | int | line | ) |
Definition at line 426 of file katescriptdocument.cpp.
int KateScriptDocument::lastColumn | ( | int | line | ) |
Definition at line 562 of file katescriptdocument.cpp.
int KateScriptDocument::lastVirtualColumn | ( | int | line | ) |
Definition at line 135 of file katescriptdocument.cpp.
int KateScriptDocument::length | ( | ) |
Definition at line 536 of file katescriptdocument.cpp.
QString KateScriptDocument::line | ( | int | line | ) |
Definition at line 368 of file katescriptdocument.cpp.
int KateScriptDocument::lineLength | ( | int | line | ) |
Definition at line 541 of file katescriptdocument.cpp.
int KateScriptDocument::lines | ( | ) |
Definition at line 531 of file katescriptdocument.cpp.
Definition at line 445 of file katescriptdocument.cpp.
bool KateScriptDocument::matchesAt | ( | const KTextEditor::Cursor & | cursor, |
const QString & | s | ||
) |
Definition at line 451 of file katescriptdocument.cpp.
QString KateScriptDocument::mimeType | ( | ) |
Definition at line 318 of file katescriptdocument.cpp.
int KateScriptDocument::nextNonEmptyLine | ( | int | line | ) |
Definition at line 605 of file katescriptdocument.cpp.
int KateScriptDocument::nextNonSpaceColumn | ( | int | line, |
int | column | ||
) |
Definition at line 580 of file katescriptdocument.cpp.
int KateScriptDocument::nextNonSpaceColumn | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 587 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonEmptyLine | ( | int | line | ) |
Definition at line 592 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonSpaceColumn | ( | int | line, |
int | column | ||
) |
Definition at line 568 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonSpaceColumn | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 575 of file katescriptdocument.cpp.
bool KateScriptDocument::removeLine | ( | int | line | ) |
Definition at line 511 of file katescriptdocument.cpp.
bool KateScriptDocument::removeText | ( | int | fromLine, |
int | fromColumn, | ||
int | toLine, | ||
int | toColumn | ||
) |
Definition at line 491 of file katescriptdocument.cpp.
bool KateScriptDocument::removeText | ( | const KTextEditor::Cursor & | from, |
const KTextEditor::Cursor & | to | ||
) |
Definition at line 496 of file katescriptdocument.cpp.
bool KateScriptDocument::removeText | ( | const KTextEditor::Range & | range | ) |
Definition at line 501 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::rfind | ( | int | line, |
int | column, | ||
const QString & | text, | ||
int | attribute = -1 |
||
) |
Definition at line 184 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::rfind | ( | const KTextEditor::Cursor & | cursor, |
const QString & | text, | ||
int | attribute = -1 |
||
) |
Definition at line 222 of file katescriptdocument.cpp.
void KateScriptDocument::setDocument | ( | KateDocument * | document | ) |
Definition at line 39 of file katescriptdocument.cpp.
Definition at line 456 of file katescriptdocument.cpp.
Definition at line 707 of file katescriptdocument.cpp.
Definition at line 280 of file katescriptdocument.cpp.
QString KateScriptDocument::text | ( | ) |
Definition at line 348 of file katescriptdocument.cpp.
QString KateScriptDocument::text | ( | int | fromLine, |
int | fromColumn, | ||
int | toLine, | ||
int | toColumn | ||
) |
Definition at line 353 of file katescriptdocument.cpp.
QString KateScriptDocument::text | ( | const KTextEditor::Cursor & | from, |
const KTextEditor::Cursor & | to | ||
) |
Definition at line 358 of file katescriptdocument.cpp.
QString KateScriptDocument::text | ( | const KTextEditor::Range & | range | ) |
Definition at line 363 of file katescriptdocument.cpp.
int KateScriptDocument::toVirtualColumn | ( | int | line, |
int | column | ||
) |
Definition at line 145 of file katescriptdocument.cpp.
int KateScriptDocument::toVirtualColumn | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 153 of file katescriptdocument.cpp.
KTextEditor::Cursor KateScriptDocument::toVirtualCursor | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 158 of file katescriptdocument.cpp.
bool KateScriptDocument::truncate | ( | int | line, |
int | column | ||
) |
Definition at line 466 of file katescriptdocument.cpp.
bool KateScriptDocument::truncate | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 476 of file katescriptdocument.cpp.
QString KateScriptDocument::url | ( | ) |
Definition at line 313 of file katescriptdocument.cpp.
Definition at line 702 of file katescriptdocument.cpp.
QString KateScriptDocument::wordAt | ( | int | line, |
int | column | ||
) |
Definition at line 373 of file katescriptdocument.cpp.
QString KateScriptDocument::wordAt | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 378 of file katescriptdocument.cpp.
KTextEditor::Range KateScriptDocument::wordRangeAt | ( | int | line, |
int | column | ||
) |
Definition at line 383 of file katescriptdocument.cpp.
KTextEditor::Range KateScriptDocument::wordRangeAt | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 388 of file katescriptdocument.cpp.
bool KateScriptDocument::wrapLine | ( | int | line, |
int | column | ||
) |
Definition at line 516 of file katescriptdocument.cpp.
bool KateScriptDocument::wrapLine | ( | const KTextEditor::Cursor & | cursor | ) |
Definition at line 521 of file katescriptdocument.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.