Kate
KateScriptDocument Class Reference
#include <katescriptdocument.h>

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 39 of file 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) |
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 |
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 27 of file katescriptdocument.cpp.
Member Function Documentation
KTextEditor::Cursor KateScriptDocument::anchor | ( | int | line, | |
int | column, | |||
QChar | character | |||
) |
Definition at line 123 of file katescriptdocument.cpp.
int KateScriptDocument::attribute | ( | int | i, | |
int | j | |||
) |
Definition at line 421 of file katescriptdocument.cpp.
Definition at line 396 of file katescriptdocument.cpp.
bool KateScriptDocument::canComment | ( | int | i, | |
int | j | |||
) |
Definition at line 401 of file katescriptdocument.cpp.
QString KateScriptDocument::charAt | ( | int | i, | |
int | j | |||
) |
Definition at line 234 of file katescriptdocument.cpp.
bool KateScriptDocument::clear | ( | ) |
Definition at line 274 of file katescriptdocument.cpp.
QString KateScriptDocument::commentEnd | ( | int | i | ) |
Definition at line 416 of file katescriptdocument.cpp.
QString KateScriptDocument::commentMarker | ( | int | i | ) |
Definition at line 406 of file katescriptdocument.cpp.
QString KateScriptDocument::commentStart | ( | int | i | ) |
Definition at line 411 of file katescriptdocument.cpp.
int KateScriptDocument::defStyleNum | ( | int | line, | |
int | column | |||
) |
Definition at line 42 of file katescriptdocument.cpp.
KateDocument * KateScriptDocument::document | ( | ) |
Definition at line 37 of file katescriptdocument.cpp.
void KateScriptDocument::editBegin | ( | ) |
Definition at line 327 of file katescriptdocument.cpp.
void KateScriptDocument::editEnd | ( | ) |
Definition at line 333 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::encoding | ( | ) |
Definition at line 174 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::fileName | ( | ) |
QString KateScriptDocument::firstChar | ( | int | i | ) |
Definition at line 240 of file katescriptdocument.cpp.
int KateScriptDocument::firstColumn | ( | int | i | ) |
Definition at line 339 of file katescriptdocument.cpp.
int KateScriptDocument::firstVirtualColumn | ( | int | line | ) |
Definition at line 86 of file katescriptdocument.cpp.
int KateScriptDocument::fromVirtualColumn | ( | int | line, | |
int | virtualColumn | |||
) |
Definition at line 114 of file katescriptdocument.cpp.
Definition at line 296 of file katescriptdocument.cpp.
Definition at line 286 of file katescriptdocument.cpp.
bool KateScriptDocument::isChar | ( | int | line, | |
int | column | |||
) |
Definition at line 74 of file katescriptdocument.cpp.
bool KateScriptDocument::isCode | ( | int | line, | |
int | column | |||
) |
Definition at line 50 of file katescriptdocument.cpp.
bool KateScriptDocument::isComment | ( | int | line, | |
int | column | |||
) |
Definition at line 56 of file katescriptdocument.cpp.
Definition at line 391 of file katescriptdocument.cpp.
bool KateScriptDocument::isModified | ( | ) |
Definition at line 209 of file katescriptdocument.cpp.
bool KateScriptDocument::isOthers | ( | int | line, | |
int | column | |||
) |
Definition at line 80 of file katescriptdocument.cpp.
bool KateScriptDocument::isRegionMarker | ( | int | line, | |
int | column | |||
) |
Definition at line 68 of file katescriptdocument.cpp.
bool KateScriptDocument::isSpace | ( | int | i, | |
int | j | |||
) |
Definition at line 258 of file katescriptdocument.cpp.
bool KateScriptDocument::isString | ( | int | line, | |
int | column | |||
) |
Definition at line 62 of file katescriptdocument.cpp.
void KateScriptDocument::joinLines | ( | int | i, | |
int | j | |||
) |
Definition at line 306 of file katescriptdocument.cpp.
QString KateScriptDocument::lastChar | ( | int | i | ) |
Definition at line 249 of file katescriptdocument.cpp.
int KateScriptDocument::lastColumn | ( | int | i | ) |
Definition at line 345 of file katescriptdocument.cpp.
int KateScriptDocument::lastVirtualColumn | ( | int | line | ) |
Definition at line 96 of file katescriptdocument.cpp.
int KateScriptDocument::length | ( | ) |
Definition at line 317 of file katescriptdocument.cpp.
QString KateScriptDocument::line | ( | int | i | ) |
Definition at line 224 of file katescriptdocument.cpp.
int KateScriptDocument::lineLength | ( | int | i | ) |
Definition at line 322 of file katescriptdocument.cpp.
int KateScriptDocument::lines | ( | ) |
Definition at line 312 of file katescriptdocument.cpp.
Definition at line 263 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::mimeType | ( | ) |
int KateScriptDocument::nextNonEmptyLine | ( | int | i | ) |
Definition at line 378 of file katescriptdocument.cpp.
int KateScriptDocument::nextNonSpaceColumn | ( | int | i, | |
int | j | |||
) |
Definition at line 358 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonEmptyLine | ( | int | i | ) |
Definition at line 365 of file katescriptdocument.cpp.
int KateScriptDocument::prevNonSpaceColumn | ( | int | i, | |
int | j | |||
) |
Definition at line 351 of file katescriptdocument.cpp.
bool KateScriptDocument::removeLine | ( | int | i | ) |
Definition at line 301 of file katescriptdocument.cpp.
bool KateScriptDocument::removeText | ( | int | i, | |
int | j, | |||
int | k, | |||
int | l | |||
) |
Definition at line 291 of file katescriptdocument.cpp.
void KateScriptDocument::setDocument | ( | KateDocument * | document | ) |
Definition at line 32 of file katescriptdocument.cpp.
Definition at line 269 of file katescriptdocument.cpp.
Definition at line 161 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::text | ( | ) |
QString KateScriptDocument::textRange | ( | int | i, | |
int | j, | |||
int | k, | |||
int | l | |||
) |
Definition at line 219 of file katescriptdocument.cpp.
int KateScriptDocument::toVirtualColumn | ( | int | line, | |
int | column | |||
) |
Definition at line 106 of file katescriptdocument.cpp.
bool KateScriptDocument::truncate | ( | int | i, | |
int | j | |||
) |
Definition at line 279 of file katescriptdocument.cpp.
Q_INVOKABLE QString KateScriptDocument::url | ( | ) |
Definition at line 428 of file katescriptdocument.cpp.
QString KateScriptDocument::wordAt | ( | int | i, | |
int | j | |||
) |
Definition at line 229 of file katescriptdocument.cpp.
Property Documentation
QString KateScriptDocument::encoding [read] |
Definition at line 46 of file katescriptdocument.h.
QString KateScriptDocument::fileName [read] |
Properties are accessible with a nicer syntax from JavaScript.
Definition at line 43 of file katescriptdocument.h.
QString KateScriptDocument::mimeType [read] |
Definition at line 45 of file katescriptdocument.h.
bool KateScriptDocument::modified [read] |
Definition at line 47 of file katescriptdocument.h.
QString KateScriptDocument::text [read, write] |
Definition at line 48 of file katescriptdocument.h.
QString KateScriptDocument::url [read] |
Definition at line 44 of file katescriptdocument.h.
The documentation for this class was generated from the following files: