KTextEditor
document.cpp
Go to the documentation of this file.
176 return (cursor.column()>=0) && (cursor.column()<=lineLength(cursor.line())); // = because new line isn't usually contained in line length
ReadWritePart(QObject *parent=0)
static Cursor start()
Returns a cursor representing the start of any document - i.e., line 0, column 0.
Definition cursor.cpp:57
bool insertLine(int line, const QString &text)
Definition document.cpp:105
bool setEncoding(const QString &encoding)
Definition document.cpp:60
DocumentAdaptor(Document *document)
Definition document.cpp:30
bool insertLines(int line, const QStringList &text)
Definition document.cpp:109
bool insertTextLines(const QPoint &cursor, const QStringList &text, bool block)
Definition document.cpp:97
bool setTextLines(const QStringList &text)
Definition document.cpp:52
bool insertText(const QPoint &cursor, const QString &text, bool block)
Definition document.cpp:93
bool cursorInText(const QPoint &cursor)
Definition document.cpp:101
virtual bool removeText(const Range &range, bool block=false)=0
Remove the text specified in range.
bool suppressOpeningErrorDialogs() const
Definition document.cpp:145
bool openingError() const
True, eg if the file for opening could not be read This doesn't have to handle the KPart job cancled ...
Definition document.cpp:149
bool isOrphaned() const
since in kate part opening an non existend local file, doesn't cause an error anymore,...
Definition document.cpp:165
virtual bool replaceText(const Range &range, const QString &text, bool block=false)
Replace text from range with specified text.
Definition document.cpp:179
virtual int lineLength(int line) const =0
Get the length of a given line in characters.
virtual bool cursorInText(const Cursor &cursor)
Checks whether the cursor specifies a valid position in a document.
Definition document.cpp:173
void setSuppressOpeningErrorDialogs(bool suppress)
by default dialogs should be displayed.
Definition document.cpp:141
virtual bool insertText(const Cursor &position, const QString &text, bool block=false)=0
Insert text at position.
virtual Cursor documentEnd() const =0
End position of the document.
QString openingErrorMessage() const
Definition document.cpp:153
void setOpeningErrorMessage(const QString &message)
Definition document.cpp:161
An object representing a section of text, from one Cursor to another.
Definition range.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.