Kate
KateScriptDocument Class Reference
Thinish wrapping around KateDocument, exposing the methods we want exposed and adding some helper methods. More...
#include <katescriptdocument.h>

Public Member Functions | |
Q_INVOKABLE KTextEditor::Cursor | anchor (int line, int column, QChar character) |
Q_INVOKABLE int | attribute (int i, int j) |
Q_INVOKABLE bool | canBreakAt (const QString &s, int i) |
Q_INVOKABLE bool | canComment (int i, int j) |
Q_INVOKABLE QString | charAt (int i, int j) |
Q_INVOKABLE bool | clear () |
Q_INVOKABLE QString | commentEnd (int i) |
Q_INVOKABLE QString | commentMarker (int i) |
Q_INVOKABLE QString | commentStart (int i) |
Q_INVOKABLE int | defStyleNum (int line, int column) |
KateDocument * | document () |
Q_INVOKABLE void | editBegin () |
Q_INVOKABLE void | editEnd () |
Q_INVOKABLE QString | encoding () |
Q_INVOKABLE bool | endsWith (int line, const QString &pattern, bool skipWhiteSpaces) |
Q_INVOKABLE QString | fileName () |
Q_INVOKABLE QString | firstChar (int i) |
Q_INVOKABLE int | firstColumn (int i) |
Q_INVOKABLE int | firstVirtualColumn (int line) |
Q_INVOKABLE int | fromVirtualColumn (int line, int virtualColumn) |
Q_INVOKABLE bool | insertLine (int i, const QString &s) |
Q_INVOKABLE bool | insertText (int i, int j, const QString &s) |
Q_INVOKABLE bool | isChar (int line, int column) |
Q_INVOKABLE bool | isCode (int line, int column) |
Q_INVOKABLE bool | isComment (int line, int column) |
Q_INVOKABLE bool | isInWord (const QString &s, int i) |
Q_INVOKABLE bool | isModified () |
Q_INVOKABLE bool | isOthers (int line, int column) |
Q_INVOKABLE bool | isRegionMarker (int line, int column) |
Q_INVOKABLE bool | isSpace (int i, int j) |
Q_INVOKABLE bool | isString (int line, int column) |
Q_INVOKABLE void | joinLines (int i, int j) |
KateScriptDocument (QObject *parent=0) | |
Q_INVOKABLE QString | lastChar (int i) |
Q_INVOKABLE int | lastColumn (int i) |
Q_INVOKABLE int | lastVirtualColumn (int line) |
Q_INVOKABLE int | length () |
Q_INVOKABLE QString | line (int i) |
Q_INVOKABLE int | lineLength (int i) |
Q_INVOKABLE int | lines () |
Q_INVOKABLE bool | matchesAt (int i, int j, const QString &s) |
Q_INVOKABLE QString | mimeType () |
Q_INVOKABLE int | nextNonEmptyLine (int i) |
Q_INVOKABLE int | nextNonSpaceColumn (int i, int j) |
Q_INVOKABLE int | prevNonEmptyLine (int i) |
Q_INVOKABLE int | prevNonSpaceColumn (int i, int j) |
Q_INVOKABLE bool | removeLine (int i) |
Q_INVOKABLE bool | removeText (int i, int j, int k, int l) |
Q_INVOKABLE QScriptValue | rfind (int line, int column, const QString &text, int attribute=-1) |
void | setDocument (KateDocument *document) |
Q_INVOKABLE bool | setText (const QString &s) |
Q_INVOKABLE bool | startsWith (int line, const QString &pattern, bool skipWhiteSpaces) |
Q_INVOKABLE QString | text () |
Q_INVOKABLE QString | textRange (int i, int j, int k, int l) |
Q_INVOKABLE int | toVirtualColumn (int line, int column) |
Q_INVOKABLE bool | truncate (int i, int j) |
Q_INVOKABLE QString | url () |
Q_INVOKABLE QString | variable (const QString &s) |
Q_INVOKABLE QString | wordAt (int i, int j) |
Properties | |
QString | encoding |
QString | fileName |
QString | mimeType |
bool | modified |
QString | text |
QString | url |
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 40 of file katescriptdocument.h.
Constructor & Destructor Documentation
KateScriptDocument::KateScriptDocument | ( | QObject * | parent = 0 |
) |
This file is part of the KDE libraries Copyright (C) 2008 Paul Giannaros <paul@giannaros.org>.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) version 3.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Definition at line 29 of file katescriptdocument.cpp.
Member Function Documentation
KTextEditor::Cursor KateScriptDocument::anchor | ( | int | line, | |
int | column, | |||
QChar | character | |||
) |
Definition at line 170 of file katescriptdocument.cpp.
int KateScriptDocument::attribute | ( | int | i, | |
int | j | |||
) |
Definition at line 468 of file katescriptdocument.cpp.
bool KateScriptDocument::canBreakAt | ( | const QString & | s, | |
int | i | |||
) |
Definition at line 443 of file katescriptdocument.cpp.
bool KateScriptDocument::canComment | ( | int | i, | |
int | j | |||
) |
Definition at line 448 of file katescriptdocument.cpp.
QString KateScriptDocument::charAt | ( | int | i, | |
int | j | |||
) |
Definition at line 281 of file katescriptdocument.cpp.
bool KateScriptDocument::clear | ( | ) |
Definition at line 321 of file katescriptdocument.cpp.
QString KateScriptDocument::commentEnd | ( | int | i | ) |
Definition at line 463 of file katescriptdocument.cpp.
QString KateScriptDocument::commentMarker | ( | int | i | ) |
Definition at line 453 of file katescriptdocument.cpp.
QString KateScriptDocument::commentStart | ( | int | i | ) |
Definition at line 458 of file katescriptdocument.cpp.
int KateScriptDocument::defStyleNum | ( | int | line, | |
int | column | |||
) |
Definition at line 44 of file katescriptdocument.cpp.
KateDocument * KateScriptDocument::document | ( | ) |
Definition at line 39 of file katescriptdocument.cpp.
void KateScriptDocument::editBegin | ( | ) |
Definition at line 374 of file katescriptdocument.cpp.
void KateScriptDocument::editEnd | ( | ) |
Definition at line 380 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::encoding | ( | ) |
bool KateScriptDocument::endsWith | ( | int | line, | |
const QString & | pattern, | |||
bool | skipWhiteSpaces | |||
) |
Definition at line 221 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::fileName | ( | ) |
QString KateScriptDocument::firstChar | ( | int | i | ) |
Definition at line 287 of file katescriptdocument.cpp.
int KateScriptDocument::firstColumn | ( | int | i | ) |
Definition at line 386 of file katescriptdocument.cpp.
int KateScriptDocument::firstVirtualColumn | ( | int | line | ) |
Definition at line 88 of file katescriptdocument.cpp.
int KateScriptDocument::fromVirtualColumn | ( | int | line, | |
int | virtualColumn | |||
) |
Definition at line 116 of file katescriptdocument.cpp.
bool KateScriptDocument::insertLine | ( | int | i, | |
const QString & | s | |||
) |
Definition at line 343 of file katescriptdocument.cpp.
bool KateScriptDocument::insertText | ( | int | i, | |
int | j, | |||
const QString & | s | |||
) |
Definition at line 333 of file katescriptdocument.cpp.
bool KateScriptDocument::isChar | ( | int | line, | |
int | column | |||
) |
Definition at line 76 of file katescriptdocument.cpp.
bool KateScriptDocument::isCode | ( | int | line, | |
int | column | |||
) |
Definition at line 52 of file katescriptdocument.cpp.
bool KateScriptDocument::isComment | ( | int | line, | |
int | column | |||
) |
Definition at line 58 of file katescriptdocument.cpp.
bool KateScriptDocument::isInWord | ( | const QString & | s, | |
int | i | |||
) |
Definition at line 438 of file katescriptdocument.cpp.
bool KateScriptDocument::isModified | ( | ) |
Definition at line 256 of file katescriptdocument.cpp.
bool KateScriptDocument::isOthers | ( | int | line, | |
int | column | |||
) |
Definition at line 82 of file katescriptdocument.cpp.
bool KateScriptDocument::isRegionMarker | ( | int | line, | |
int | column | |||
) |
Definition at line 70 of file katescriptdocument.cpp.
bool KateScriptDocument::isSpace | ( | int | i, | |
int | j | |||
) |
Definition at line 305 of file katescriptdocument.cpp.
bool KateScriptDocument::isString | ( | int | line, | |
int | column | |||
) |
Definition at line 64 of file katescriptdocument.cpp.
void KateScriptDocument::joinLines | ( | int | i, | |
int | j | |||
) |
Definition at line 353 of file katescriptdocument.cpp.
QString KateScriptDocument::lastChar | ( | int | i | ) |
Definition at line 296 of file katescriptdocument.cpp.
int KateScriptDocument::lastColumn | ( | int | i | ) |
Definition at line 392 of file katescriptdocument.cpp.
int KateScriptDocument::lastVirtualColumn | ( | int | line | ) |
Definition at line 98 of file katescriptdocument.cpp.
int KateScriptDocument::length | ( | ) |
Definition at line 364 of file katescriptdocument.cpp.
QString KateScriptDocument::line | ( | int | i | ) |
Definition at line 271 of file katescriptdocument.cpp.
int KateScriptDocument::lineLength | ( | int | i | ) |
Definition at line 369 of file katescriptdocument.cpp.
int KateScriptDocument::lines | ( | ) |
Definition at line 359 of file katescriptdocument.cpp.
bool KateScriptDocument::matchesAt | ( | int | i, | |
int | j, | |||
const QString & | s | |||
) |
Definition at line 310 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::mimeType | ( | ) |
int KateScriptDocument::nextNonEmptyLine | ( | int | i | ) |
Definition at line 425 of file katescriptdocument.cpp.
int KateScriptDocument::nextNonSpaceColumn | ( | int | i, | |
int | j | |||
) |
Definition at line 405 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonEmptyLine | ( | int | i | ) |
Definition at line 412 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonSpaceColumn | ( | int | i, | |
int | j | |||
) |
Definition at line 398 of file katescriptdocument.cpp.
bool KateScriptDocument::removeLine | ( | int | i | ) |
Definition at line 348 of file katescriptdocument.cpp.
bool KateScriptDocument::removeText | ( | int | i, | |
int | j, | |||
int | k, | |||
int | l | |||
) |
Definition at line 338 of file katescriptdocument.cpp.
QScriptValue KateScriptDocument::rfind | ( | int | line, | |
int | column, | |||
const QString & | text, | |||
int | attribute = -1 | |||
) |
Definition at line 125 of file katescriptdocument.cpp.
void KateScriptDocument::setDocument | ( | KateDocument * | document | ) |
Definition at line 34 of file katescriptdocument.cpp.
bool KateScriptDocument::setText | ( | const QString & | s | ) |
Definition at line 316 of file katescriptdocument.cpp.
bool KateScriptDocument::startsWith | ( | int | line, | |
const QString & | pattern, | |||
bool | skipWhiteSpaces | |||
) |
Definition at line 208 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::text | ( | ) |
QString KateScriptDocument::textRange | ( | int | i, | |
int | j, | |||
int | k, | |||
int | l | |||
) |
Definition at line 266 of file katescriptdocument.cpp.
int KateScriptDocument::toVirtualColumn | ( | int | line, | |
int | column | |||
) |
Definition at line 108 of file katescriptdocument.cpp.
bool KateScriptDocument::truncate | ( | int | i, | |
int | j | |||
) |
Definition at line 326 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::url | ( | ) |
Definition at line 475 of file katescriptdocument.cpp.
QString KateScriptDocument::wordAt | ( | int | i, | |
int | j | |||
) |
Definition at line 276 of file katescriptdocument.cpp.
Property Documentation
QString KateScriptDocument::encoding [read] |
Definition at line 47 of file katescriptdocument.h.
QString KateScriptDocument::fileName [read] |
Properties are accessible with a nicer syntax from JavaScript.
Definition at line 44 of file katescriptdocument.h.
QString KateScriptDocument::mimeType [read] |
Definition at line 46 of file katescriptdocument.h.
bool KateScriptDocument::modified [read] |
Definition at line 48 of file katescriptdocument.h.
QString KateScriptDocument::text [read, write] |
Definition at line 49 of file katescriptdocument.h.
QString KateScriptDocument::url [read] |
Definition at line 45 of file katescriptdocument.h.
The documentation for this class was generated from the following files: