KTextEditor
document.cpp
Go to the documentation of this file.
97 bool DocumentAdaptor::insertTextLines(const QPoint& cursor,const QStringList& text, bool block) {
176 return (cursor.column()>=0) && (cursor.column()<=lineLength(cursor.line())); // = because new line isn't usually contained in line length
179 bool KTextEditor::Document::replaceText( const Range & range, const QString & text, bool block )
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
virtual bool insertText(const Cursor &position, const QString &text, bool block=false)=0
Insert text at position.
bool isOrphaned() const
since in kate part opening an non existend local file, doesn't cause an error anymore, a new field for storing if the local document is an orphan is needed.
Definition: document.cpp:165
bool insertLine(int line, const QString &text)
Definition: document.cpp:105
bool cursorInText(const QPoint &cursor)
Definition: document.cpp:101
virtual Cursor documentEnd() const =0
End position of the document.
void setSuppressOpeningErrorDialogs(bool suppress)
by default dialogs should be displayed.
Definition: document.cpp:141
void setOpeningErrorMessage(const QString &message)
Definition: document.cpp:161
DocumentAdaptor(Document *document)
Definition: document.cpp:30
static Cursor start()
Returns a cursor representing the start of any document - i.e., line 0, column 0. ...
Definition: cursor.cpp:57
virtual bool setText(const QString &text)=0
Set the given text as new document content.
virtual bool insertLine(int line, const QString &text)=0
Insert line(s) at the given line number.
bool insertLines(int line, const QStringList &text)
Definition: document.cpp:109
virtual bool insertLines(int line, const QStringList &text)=0
Insert line(s) at the given line number.
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
virtual bool removeText(const Range &range, bool block=false)=0
Remove the text specified in range.
bool insertText(const QPoint &cursor, const QString &text, bool block)
Definition: document.cpp:93
A KParts derived class representing a text document.
Definition: document.h:111
QString text() const
bool insertTextLines(const QPoint &cursor, const QStringList &text, bool block)
Definition: document.cpp:97
bool setTextLines(const QStringList &text)
Definition: document.cpp:52
virtual bool cursorInText(const Cursor &cursor)
Checks whether the cursor specifies a valid position in a document.
Definition: document.cpp:173
An object representing a section of text, from one Cursor to another.
Definition: range.h:54
bool setEncoding(const QString &encoding)
Definition: document.cpp:60
int totalCharacters() const
virtual int line() const
Retrieve the line on which this cursor is situated.
Definition: cursor.cpp:62
int lines() const
virtual bool setEncoding(const QString &encoding)=0
This signal is emitted whenever the readWrite state of a document changes.
const QString & encoding() const
Cursor endOfLine(int line) const
Get the end cursor position of line line.
Definition: document.h:425
virtual int totalCharacters() const =0
Get the count of characters in the document.
virtual int lineLength(int line) const =0
Get the length of a given line in characters.
bool suppressOpeningErrorDialogs() const
Definition: document.cpp:145
virtual const QString & encoding() const =0
Get the current chosen encoding.
virtual bool replaceText(const Range &range, const QString &text, bool block=false)
Replace text from range with specified text.
Definition: document.cpp:179
QString openingErrorMessage() const
Definition: document.cpp:153
virtual bool documentSaveAs()=0
Save the current file to another location.
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Wed Aug 22 2018 19:48:14 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2018 The KDE developers.
Generated on Wed Aug 22 2018 19:48:14 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.