Kate
katescriptdocument.cpp
Go to the documentation of this file.
178 KTextEditor::Cursor KateScriptDocument::fromVirtualCursor(const KTextEditor::Cursor& virtualCursor)
184 KTextEditor::Cursor KateScriptDocument::rfind(int line, int column, const QString& text, int attribute)
186 QScopedPointer<KTextEditor::MovingCursor> cursor(document()->newMovingCursor(KTextEditor::Cursor(line, column)));
189 m_document->highlight()->attributes(static_cast<KateView*>(m_document->activeView())->renderer()->config()->schema());
203 while ((foundAt = textLine->string().left(cursor->column()).lastIndexOf(text, -1, Qt::CaseSensitive)) >= 0) {
222 KTextEditor::Cursor KateScriptDocument::rfind(const KTextEditor::Cursor& cursor, const QString& text, int attribute)
230 m_document->highlight()->attributes(static_cast<KateView*>( m_document->activeView())->renderer()->config()->schema());
248 QScopedPointer<KTextEditor::MovingCursor> cursor(document()->newMovingCursor(KTextEditor::Cursor(line, column)));
254 KTextEditor::Attribute::Ptr a = attributes[document()->plainKateTextLine(cursor->line())->attribute(cursor->column())];
261 KTextEditor::Attribute::Ptr a = attributes[document()->plainKateTextLine(cursor->line())->attribute(cursor->column())];
275 KTextEditor::Cursor KateScriptDocument::anchor(const KTextEditor::Cursor& cursor, QChar character)
358 QString KateScriptDocument::text(const KTextEditor::Cursor& from, const KTextEditor::Cursor& to)
400 while (start > 0 && m_document->highlight()->isInWord(textLine->at(start - 1), textLine->attribute(start - 1))) start--;
401 while (end < len && m_document->highlight()->isInWord(textLine->at(end), textLine->attribute(end))) end++;
496 bool KateScriptDocument::removeText(const KTextEditor::Cursor& from, const KTextEditor::Cursor& to)
682 QList<KTextEditor::Attribute::Ptr> attributes = m_document->highlight()->attributes(static_cast<KateView*>(m_document->activeView())->renderer()->config()->schema());
683 KTextEditor::Attribute::Ptr a = attributes[document()->plainKateTextLine(line)->attribute(column)];
697 bool KateScriptDocument::isAttributeName(const KTextEditor::Cursor& cursor, const QString &name)
virtual const QString & documentName() const
Definition: katedocument.h:828
void align(KateView *view, const KTextEditor::Range &range)
Definition: katedocument.cpp:2908
virtual bool insertLine(int line, const QString &s)
Definition: katedocument.cpp:701
virtual QString highlightingMode() const
Return the name of the currently used mode.
Definition: katedocument.cpp:1494
Q_INVOKABLE int firstColumn(int line)
Definition: katescriptdocument.cpp:556
Q_INVOKABLE KTextEditor::Cursor toVirtualCursor(const KTextEditor::Cursor &cursor)
Definition: katescriptdocument.cpp:158
Q_INVOKABLE int prevNonSpaceColumn(int line, int column)
Definition: katescriptdocument.cpp:568
static Cursor invalid()
Q_INVOKABLE int toVirtualColumn(int line, int column)
Definition: katescriptdocument.cpp:145
Q_INVOKABLE QString commentStart(int attribute)
Definition: katescriptdocument.cpp:638
Q_INVOKABLE KTextEditor::Cursor rfind(int line, int column, const QString &text, int attribute=-1)
Definition: katescriptdocument.cpp:184
bool canComment(int startAttr, int endAttr) const
Definition: katehighlight.cpp:1111
Q_INVOKABLE void align(const KTextEditor::Range &range)
Definition: katescriptdocument.cpp:728
Q_INVOKABLE bool startsWith(int line, const QString &pattern, bool skipWhiteSpaces)
Definition: katescriptdocument.cpp:280
Q_INVOKABLE void joinLines(int startLine, int endLine)
Definition: katescriptdocument.cpp:526
Q_INVOKABLE QString highlightingModeAt(const KTextEditor::Cursor &pos)
Definition: katescriptdocument.cpp:338
virtual KTextEditor::View * activeView() const
Definition: katedocument.h:156
Q_INVOKABLE bool canBreakAt(const QString &character, int attribute)
Definition: katescriptdocument.cpp:623
QString getCommentStart(int attrib=0) const
Definition: katehighlight.cpp:1119
Q_INVOKABLE QString highlightingMode()
Definition: katescriptdocument.cpp:328
Q_INVOKABLE bool isComment(int line, int column)
Definition: katescriptdocument.cpp:71
Q_INVOKABLE bool endsWith(int line, const QString &pattern, bool skipWhiteSpaces)
Definition: katescriptdocument.cpp:293
virtual QString highlightingModeAt(const KTextEditor::Cursor &position)
Definition: katedocument.cpp:5406
Q_INVOKABLE int attribute(int line, int column)
Get the syntax highlighting attribute at a given position in the document.
Definition: katescriptdocument.cpp:658
virtual QStringList embeddedHighlightingModes() const
Definition: katedocument.cpp:5401
Q_INVOKABLE bool isOthers(int line, int column)
Definition: katescriptdocument.cpp:114
Q_INVOKABLE bool removeLine(int line)
Definition: katescriptdocument.cpp:511
Q_INVOKABLE bool wrapLine(int line, int column)
Definition: katescriptdocument.cpp:516
Q_INVOKABLE int defStyleNum(int line, int column)
Definition: katescriptdocument.cpp:49
Q_INVOKABLE KTextEditor::Range wordRangeAt(int line, int column)
Definition: katescriptdocument.cpp:383
bool canBreakAt(QChar c, int attrib=0) const
Definition: katehighlight.cpp:1091
Q_INVOKABLE bool isChar(int line, int column)
Definition: katescriptdocument.cpp:103
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4713
void indent(KTextEditor::Range range, int change)
Definition: katedocument.cpp:2898
Q_INVOKABLE bool isRegionMarker(int line, int column)
Definition: katescriptdocument.cpp:92
KUrl url
Q_INVOKABLE QString firstChar(int line)
Definition: katescriptdocument.cpp:417
QString getCommentEnd(int attrib=0) const
Definition: katehighlight.cpp:1124
Q_INVOKABLE QString attributeName(int line, int column)
Get the name of the syntax highlighting attribute at the given position.
Definition: katescriptdocument.cpp:680
Q_INVOKABLE int lastColumn(int line)
Definition: katescriptdocument.cpp:562
Q_INVOKABLE int nextNonSpaceColumn(int line, int column)
Definition: katescriptdocument.cpp:580
Q_INVOKABLE QString commentMarker(int attribute)
Definition: katescriptdocument.cpp:633
Q_INVOKABLE bool insertText(int line, int column, const QString &s)
Definition: katescriptdocument.cpp:481
virtual bool insertText(const KTextEditor::Cursor &position, const QString &s, bool block=false)
Definition: katedocument.cpp:530
Q_INVOKABLE bool isSpace(int line, int column)
Definition: katescriptdocument.cpp:435
Q_INVOKABLE QStringList embeddedHighlightingModes()
Definition: katescriptdocument.cpp:333
Q_INVOKABLE bool insertLine(int line, const QString &s)
Definition: katescriptdocument.cpp:506
Q_INVOKABLE bool matchesAt(int line, int column, const QString &s)
Definition: katescriptdocument.cpp:445
virtual QChar character(const KTextEditor::Cursor &position) const
Definition: katedocument.cpp:388
QList< KTextEditor::Attribute::Ptr > attributes(const QString &schema)
Definition: katehighlight.cpp:2134
Q_INVOKABLE int prevNonEmptyLine(int line)
Definition: katescriptdocument.cpp:592
Q_INVOKABLE int firstVirtualColumn(int line)
Definition: katescriptdocument.cpp:125
virtual QString variable(const QString &name) const
Definition: katedocument.cpp:4339
static Range invalid()
virtual KTextEditor::Cursor documentEnd() const
Definition: katedocument.cpp:4682
void setDocument(KateDocument *document)
Definition: katescriptdocument.cpp:39
Q_INVOKABLE bool removeText(int fromLine, int fromColumn, int toLine, int toColumn)
Definition: katescriptdocument.cpp:491
Q_INVOKABLE bool isInWord(const QString &character, int attribute)
Definition: katescriptdocument.cpp:618
Q_INVOKABLE QString wordAt(int line, int column)
Definition: katescriptdocument.cpp:373
Range documentRange() const
Q_INVOKABLE bool truncate(int line, int column)
Definition: katescriptdocument.cpp:466
Q_INVOKABLE int lineLength(int line)
Definition: katescriptdocument.cpp:541
Definition: katedocument.h:74
Q_INVOKABLE KTextEditor::Cursor fromVirtualCursor(const KTextEditor::Cursor &virtualCursor)
Definition: katescriptdocument.cpp:178
bool editWrapLine(int line, int col, bool newLine=true, bool *newLineAdded=0)
Wrap line.
Definition: katedocument.cpp:1083
Q_INVOKABLE QString charAt(int line, int column)
Definition: katescriptdocument.cpp:406
virtual int line() const
Q_INVOKABLE KTextEditor::Range documentRange()
Definition: katescriptdocument.cpp:648
QString getWord(const KTextEditor::Cursor &cursor)
Definition: katedocument.cpp:3537
Q_INVOKABLE void indent(KTextEditor::Range range, int change)
Definition: katescriptdocument.cpp:723
QString getCommentSingleLineStart(int attrib=0) const
Definition: katehighlight.cpp:1129
Q_INVOKABLE QString variable(const QString &s)
Definition: katescriptdocument.cpp:702
Q_INVOKABLE bool setText(const QString &s)
Definition: katescriptdocument.cpp:456
Q_INVOKABLE KTextEditor::Cursor documentEnd()
Definition: katescriptdocument.cpp:653
virtual QString setVariable(const QString &name, const QString &value)
Definition: katedocument.cpp:4344
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
KateScriptDocument(QObject *parent=0)
Definition: katescriptdocument.cpp:34
Q_INVOKABLE bool isAttributeName(int line, int column, const QString &name)
Return true is the name of the syntax attribute equals name.
Definition: katescriptdocument.cpp:692
Q_INVOKABLE QString commentEnd(int attribute)
Definition: katescriptdocument.cpp:643
Q_INVOKABLE int lastVirtualColumn(int line)
Definition: katescriptdocument.cpp:135
virtual QString text(const KTextEditor::Range &range, bool blockwise=false) const
Definition: katedocument.cpp:337
Q_INVOKABLE QString setVariable(const QString &s, const QString &v)
Definition: katescriptdocument.cpp:707
Q_INVOKABLE bool canComment(int startAttribute, int endAttribute)
Definition: katescriptdocument.cpp:628
Q_INVOKABLE bool isCode(int line, int column)
Definition: katescriptdocument.cpp:60
Q_INVOKABLE bool isAttribute(int line, int column, int attr)
Return true if the highlight attribute equals attr.
Definition: katescriptdocument.cpp:670
Q_INVOKABLE int nextNonEmptyLine(int line)
Definition: katescriptdocument.cpp:605
Q_INVOKABLE bool isString(int line, int column)
Definition: katescriptdocument.cpp:81
bool isInWord(QChar c, int attrib=0) const
Definition: katehighlight.cpp:1084
const KShortcut & end()
virtual void setColumn(int column)
int column() const
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
virtual bool removeText(const KTextEditor::Range &range, bool block=false)
Definition: katedocument.cpp:633
Q_INVOKABLE KTextEditor::Cursor anchor(int line, int column, QChar character)
Definition: katescriptdocument.cpp:227
bool isModified() const
Q_INVOKABLE QString lastChar(int line)
Definition: katescriptdocument.cpp:426
Q_INVOKABLE int fromVirtualColumn(int line, int virtualColumn)
Definition: katescriptdocument.cpp:164
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.