• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KateDocument Class Reference

#include <katedocument.h>

Inheritance diagram for KateDocument:
Inheritance graph
[legend]

Public Types

enum  EncodedCharaterInsertionPolicy { EncodeAlways, EncodeWhenPresent, EncodeNever }
 
typedef QList< QPair< int, int > > OffsetList
 
enum  TextTransform { Uppercase, Lowercase, Capitalize }
 
- Public Types inherited from KXMLGUIClient
enum  ReverseStateChange
 
- Public Types inherited from KTextEditor::ParameterizedSessionConfigInterface
enum  SessionConfigParameter
 
- Public Types inherited from KTextEditor::MarkInterface
enum  MarkChangeAction
 
enum  MarkTypes
 
- Public Types inherited from KTextEditor::ModificationInterface
enum  ModifiedOnDiskReason
 
- Public Types inherited from KTextEditor::HighlightInterface
enum  DefaultStyle
 

Public Slots

virtual void addMark (int line, uint markType)
 
virtual bool clear ()
 
void clearDictionaryRanges ()
 
virtual void clearMark (int line)
 
virtual void clearMarks ()
 
virtual bool documentReload ()
 
virtual bool documentSave ()
 
virtual bool documentSaveAs ()
 
bool handleMarkClick (int line)
 
bool handleMarkContextMenu (int line, QPoint position)
 
virtual bool insertLine (int line, const QString &s)
 
virtual bool insertLines (int line, const QStringList &s)
 
virtual bool insertText (const KTextEditor::Cursor &position, const QString &s, bool block=false)
 
virtual bool insertText (const KTextEditor::Cursor &position, const QStringList &text, bool block=false)
 
void messageDestroyed (KTextEditor::Message *message)
 
void onTheFlySpellCheckingEnabled (bool enable)
 
Q_SCRIPTABLE bool print ()
 
bool printDialog ()
 
void redo ()
 
void refreshOnTheFlyCheck (const KTextEditor::Range &range=KTextEditor::Range::invalid())
 
virtual bool removeLine (int line)
 
virtual void removeMark (int line, uint markType)
 
virtual bool removeText (const KTextEditor::Range &range, bool block=false)
 
virtual bool replaceText (const KTextEditor::Range &range, const QString &s, bool block=false)
 
virtual bool replaceText (const KTextEditor::Range &r, const QStringList &l, bool b)
 
void requestMarkTooltip (int line, QPoint position)
 
void revertToDefaultDictionary (const KTextEditor::Range &range)
 
virtual bool save ()
 
void setDefaultDictionary (const QString &dict)
 
void setDictionary (const QString &dict, const KTextEditor::Range &range)
 
virtual void setEditableMarks (uint markMask)
 
virtual void setMark (int line, uint markType)
 
virtual void setMarkDescription (MarkInterface::MarkTypes, const QString &)
 
virtual void setMarkPixmap (MarkInterface::MarkTypes, const QPixmap &)
 
void setPageUpDownMovesCursor (bool on)
 
virtual bool setText (const QString &)
 
virtual bool setText (const QStringList &text)
 
void setWordWrap (bool on)
 
void setWordWrapAt (uint col)
 
virtual void slotModifiedOnDisk (KTextEditor::View *v=0)
 
void slotQueryClose_save (bool *handled, bool *abortClosing)
 
void tagLines (int start, int end)
 
void undo ()
 
- Public Slots inherited from KParts::ReadWritePart
virtual bool save ()
 
void setModified ()
 
bool waitSaveComplete ()
 
- Public Slots inherited from KParts::ReadOnlyPart

Signals

void aboutToDeleteMovingInterfaceContent (KTextEditor::Document *document)
 
void aboutToInvalidateMovingInterfaceContent (KTextEditor::Document *document)
 
void aboutToRemoveText (const KTextEditor::Range &)
 
void annotationModelChanged (KTextEditor::AnnotationModel *, KTextEditor::AnnotationModel *)
 
void charactersSemiInteractivelyInserted (const KTextEditor::Cursor &position, const QString &text)
 
void configChanged ()
 
void defaultDictionaryChanged (KateDocument *document)
 
void dictionaryRangesPresent (bool yesNo)
 
void editLineUnWrapped (int line, int col)
 
void editLineWrapped (int line, int col, int len)
 
void markChanged (KTextEditor::Document *, KTextEditor::Mark, KTextEditor::MarkInterface::MarkChangeAction)
 
void markClicked (KTextEditor::Document *document, KTextEditor::Mark mark, bool &handled)
 
void markContextMenuRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint pos, bool &handled)
 
void marksChanged (KTextEditor::Document *)
 
void markToolTipRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint position, bool &handled)
 
void modifiedOnDisk (KTextEditor::Document *doc, bool isModified, KTextEditor::ModificationInterface::ModifiedOnDiskReason reason)
 
void readWriteChanged (KTextEditor::Document *document)
 
void undoChanged ()
 
void variableChanged (KTextEditor::Document *, const QString &, const QString &)
 
- Signals inherited from KTextEditor::Document
void aboutToClose (KTextEditor::Document *document)
 
void aboutToReload (KTextEditor::Document *document)
 
void documentNameChanged (KTextEditor::Document *document)
 
void documentSavedOrUploaded (KTextEditor::Document *document, bool saveAs)
 
void documentUrlChanged (KTextEditor::Document *document)
 
void exclusiveEditEnd (KTextEditor::Document *document)
 
void exclusiveEditStart (KTextEditor::Document *document)
 
void highlightingModeChanged (KTextEditor::Document *document)
 
void modeChanged (KTextEditor::Document *document)
 
void modifiedChanged (KTextEditor::Document *document)
 
void reloaded (KTextEditor::Document *document)
 
void textChanged (KTextEditor::Document *document, const KTextEditor::Range &oldRange, const KTextEditor::Range &newRange)
 
void textChanged (KTextEditor::Document *document, const KTextEditor::Range &oldRange, const QString &oldText, const KTextEditor::Range &newRange)
 
void textChanged (KTextEditor::Document *document)
 
void textInserted (KTextEditor::Document *document, const KTextEditor::Range &range)
 
void textRemoved (KTextEditor::Document *document, const KTextEditor::Range &range, const QString &oldText)
 
void textRemoved (KTextEditor::Document *document, const KTextEditor::Range &range)
 
void viewCreated (KTextEditor::Document *document, KTextEditor::View *view)
 
- Signals inherited from KParts::ReadWritePart
void sigQueryClose (bool *handled, bool *abortClosing)
 
- Signals inherited from KParts::ReadOnlyPart
void canceled (const QString &errMsg)
 
void completed ()
 
void completed (bool pendingAction)
 
void started (KIO::Job *)
 
void urlChanged (const KUrl &url)
 
- Signals inherited from KParts::Part
void setStatusBarText (const QString &text)
 
void setWindowCaption (const QString &caption)
 
- Signals inherited from KTextEditor::MarkInterface
void markClicked (KTextEditor::Document *document, KTextEditor::Mark mark, bool &handled)
 
void markContextMenuRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint pos, bool &handled)
 
void markToolTipRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint position, bool &handled)
 

Public Member Functions

 KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false, QWidget *parentWidget=0, QObject *=0)
 
 ~KateDocument ()
 
KateView * activeKateView () const
 
virtual KTextEditor::View * activeView () const
 
void addView (KTextEditor::View *)
 
void align (KateView *view, const KTextEditor::Range &range)
 
virtual
KTextEditor::AnnotationModel * 
annotationModel () const
 
void backspace (KateView *view, const KTextEditor::Cursor &)
 
void bomSetByUser ()
 
bool browserView () const
 
KateBuffer & buffer ()
 
void bufferHlChanged ()
 
virtual QChar character (const KTextEditor::Cursor &position) const
 
void clearMisspellingForWord (const QString &word)
 
virtual bool closeUrl ()
 
void comment (KateView *view, uint line, uint column, int change)
 
int computePositionWrtOffsets (const OffsetList &offsetList, int pos)
 
KateDocumentConfig * config ()
 
KateDocumentConfig * config () const
 
virtual QStringList configKeys () const
 
virtual QVariant configValue (const QString &key)
 
bool containsCharacterEncoding (const KTextEditor::Range &range)
 
virtual KTextEditor::View * createView (QWidget *parent)
 
QString decodeCharacters (const KTextEditor::Range &range, KateDocument::OffsetList &decToEncOffsetList, KateDocument::OffsetList &encToDecOffsetList)
 
QString defaultDictionary () const
 
virtual KTextEditor::Attribute::Ptr defaultStyle (const KTextEditor::HighlightInterface::DefaultStyle ds) const
 
int defStyleNum (int line, int column)
 
void del (KateView *view, const KTextEditor::Cursor &)
 
QString dictionaryForMisspelledRange (const KTextEditor::Range &range) const
 
QList< QPair
< KTextEditor::MovingRange
*, QString > > 
dictionaryRanges () const
 
const QByteArray & digest () const
 
virtual void discardDataRecovery ()
 
virtual KTextEditor::Cursor documentEnd () const
 
virtual const QString & documentName () const
 
virtual uint editableMarks () const
 
void editBegin ()
 
void editEnd ()
 
bool editInsertLine (int line, const QString &s)
 
bool editInsertText (int line, int col, const QString &s)
 
bool editMarkLineAutoWrapped (int line, bool autowrapped)
 
virtual KTextEditor::Editor * editor ()
 
bool editRemoveLine (int line)
 
bool editRemoveLines (int from, int to)
 
bool editRemoveText (int line, int col, int len)
 
void editStart ()
 
bool editUnWrapLine (int line, bool removeLine=true, int length=0)
 
bool editWrapLine (int line, int col, bool newLine=true, bool *newLineAdded=0)
 
virtual QStringList embeddedHighlightingModes () const
 
virtual const QString & encoding () const
 
virtual bool endEditing ()
 
QString fileType () const
 
bool findMatchingBracket (KTextEditor::Range &range, int maxLines=-1)
 
int fromVirtualColumn (int line, int column) const
 
int fromVirtualColumn (const KTextEditor::Cursor &) const
 
QString getWord (const KTextEditor::Cursor &cursor)
 
KateHighlighting * highlight () const
 
virtual QString highlightingMode () const
 
virtual QString highlightingModeAt (const KTextEditor::Cursor &position)
 
virtual QStringList highlightingModes () const
 
virtual QString highlightingModeSection (int index) const
 
void ignoreModifiedOnDiskOnce ()
 
void indent (KTextEditor::Range range, int change)
 
void inputMethodEnd ()
 
void inputMethodStart ()
 
void insertTab (KateView *view, const KTextEditor::Cursor &)
 
bool isComment (int line, int column)
 
virtual bool isDataRecoveryAvailable () const
 
bool isEditRunning () const
 
bool isModifiedOnDisc ()
 
bool isOnTheFlySpellCheckingEnabled () const
 
void joinLines (uint first, uint last)
 
Kate::TextLine kateTextLine (uint i)
 
int lastLine () const
 
virtual qint64 lastSavedRevision () const
 
virtual QString line (int line) const
 
virtual QList
< KTextEditor::HighlightInterface::AttributeBlock > 
lineAttributes (const unsigned int line)
 
virtual int lineLength (int line) const
 
virtual int lines () const
 
virtual void lockRevision (qint64 revision)
 
void makeAttribs (bool needInvalidate=true)
 
virtual uint mark (int line)
 
virtual QColor markColor (MarkInterface::MarkTypes) const
 
virtual QString markDescription (MarkInterface::MarkTypes) const
 
virtual QPixmap markPixmap (MarkInterface::MarkTypes) const
 
virtual const QHash< int,
KTextEditor::Mark * > & 
marks ()
 
virtual QString mimeType ()
 
KMimeType::Ptr mimeTypeForContent ()
 
virtual QString mode () const
 
virtual QStringList modes () const
 
virtual QString modeSection (int index) const
 
void newBracketMark (const KTextEditor::Cursor &start, KTextEditor::Range &bm, int maxLines=-1)
 
void newLine (KateView *view)
 
virtual KTextEditor::MovingCursor * newMovingCursor (const KTextEditor::Cursor &position, KTextEditor::MovingCursor::InsertBehavior insertBehavior=KTextEditor::MovingCursor::MoveOnInsert)
 
virtual KTextEditor::MovingRange * newMovingRange (const KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors=KTextEditor::MovingRange::DoNotExpand, KTextEditor::MovingRange::EmptyBehavior emptyBehavior=KTextEditor::MovingRange::AllowEmpty)
 
virtual bool openFile ()
 
virtual bool openUrl (const KUrl &url)
 
bool ownedView (KateView *)
 
bool pageUpDownMovesCursor () const
 
void paste (KateView *view, const QString &text)
 
Kate::TextLine plainKateTextLine (uint i)
 
void popEditState ()
 
virtual bool postMessage (KTextEditor::Message *message)
 
void pushEditState ()
 
virtual bool queryClose ()
 
KTextEditor::Range rangeOnLine (KTextEditor::Range range, int line) const
 
bool readOnly () const
 
virtual void readParameterizedSessionConfig (const KConfigGroup &, unsigned long configParameters)
 
virtual void readSessionConfig (const KConfigGroup &)
 
virtual void recoverData ()
 
uint redoCount () const
 
void rememberUserDidSetIndentationMode ()
 
void removeView (KTextEditor::View *)
 
void repaintViews (bool paintOnlyDirty=true)
 
void replaceCharactersByEncoding (const KTextEditor::Range &range)
 
virtual qint64 revision () const
 
virtual bool saveAs (const KUrl &url)
 
virtual bool saveFile ()
 
virtual QVector
< KTextEditor::Range > 
searchText (const KTextEditor::Range &range, const QString &pattern, const KTextEditor::Search::SearchOptions options)
 
void setActiveView (KTextEditor::View *)
 
virtual void setAnnotationModel (KTextEditor::AnnotationModel *model)
 
virtual void setConfigValue (const QString &key, const QVariant &value)
 
void setDontChangeHlOnSave ()
 
virtual bool setEncoding (const QString &e)
 
virtual bool setHighlightingMode (const QString &name)
 
virtual bool setMode (const QString &name)
 
virtual void setModified (bool m)
 
virtual void setModifiedOnDisk (ModifiedOnDiskReason reason)
 
virtual void setModifiedOnDiskWarning (bool on)
 
virtual void setReadWrite (bool rw=true)
 
void setUndoMergeAllEdits (bool merge)
 
virtual QString setVariable (const QString &name, const QString &value)
 
bool singleViewMode () const
 
virtual bool startEditing ()
 
virtual
KTextEditor::Search::SearchOptions 
supportedSearchOptions () const
 
Kate::SwapFile * swapFile ()
 
virtual QString text (const KTextEditor::Range &range, bool blockwise=false) const
 
virtual QString text () const
 
virtual QStringList textLines (const KTextEditor::Range &range, bool block=false) const
 
virtual int totalCharacters () const
 
int toVirtualColumn (int line, int column) const
 
int toVirtualColumn (const KTextEditor::Cursor &) const
 
void transform (KateView *view, const KTextEditor::Cursor &, TextTransform)
 
virtual void transformCursor (KTextEditor::Cursor &cursor, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)
 
virtual void transformCursor (int &line, int &column, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)
 
virtual void transformRange (KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors, KTextEditor::MovingRange::EmptyBehavior emptyBehavior, qint64 fromRevision, qint64 toRevision=-1)
 
void transpose (const KTextEditor::Cursor &)
 
bool typeChars (KateView *type, const QString &realChars)
 
uint undoCount () const
 
KateUndoManager * undoManager ()
 
virtual void unlockRevision (qint64 revision)
 
void updateConfig ()
 
void updateFileType (const QString &newType, bool user=false)
 
void userSetEncodingForNextReload ()
 
virtual QString variable (const QString &name) const
 
virtual const QList
< KTextEditor::View * > & 
views () const
 
virtual QWidget * widget ()
 
bool wordWrap () const
 
uint wordWrapAt () const
 
bool wrapText (int startLine, int endLine)
 
virtual void writeParameterizedSessionConfig (KConfigGroup &, unsigned long configParameters)
 
virtual void writeSessionConfig (KConfigGroup &)
 
- Public Member Functions inherited from KTextEditor::Document
 Document (QObject *parent=0)
 
virtual ~Document ()
 
virtual bool clear ()=0
 
virtual bool cursorInText (const Cursor &cursor)
 
Range documentRange () const
 
virtual bool documentReload ()=0
 
virtual bool documentSave ()=0
 
virtual bool documentSaveAs ()=0
 
Cursor endOfLine (int line) const
 
virtual bool insertLine (int line, const QString &text)=0
 
virtual bool insertLines (int line, const QStringList &text)=0
 
virtual bool insertText (const Cursor &position, const QString &text, bool block=false)=0
 
virtual bool insertText (const Cursor &position, const QStringList &text, bool block=false)=0
 
virtual bool isEmpty () const
 
bool isOrphaned () const
 
bool openingError () const
 
QString openingErrorMessage () const
 
virtual bool removeLine (int line)=0
 
virtual bool removeText (const Range &range, bool block=false)=0
 
virtual bool replaceText (const Range &range, const QString &text, bool block=false)
 
virtual bool replaceText (const Range &range, const QStringList &text, bool block=false)
 
void setOrphaned (bool value)
 
void setSuppressOpeningErrorDialogs (bool suppress)
 
virtual bool setText (const QStringList &text)=0
 
virtual bool setText (const QString &text)=0
 
bool suppressOpeningErrorDialogs () const
 
- Public Member Functions inherited from KParts::ReadWritePart
 ReadWritePart (QObject *parent=0)
 
virtual ~ReadWritePart ()
 
virtual bool closeUrl (bool promptToSave)
 
bool isModified () const
 
bool isReadWrite () const
 
- Public Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (QObject *parent=0)
 
virtual ~ReadOnlyPart ()
 
OpenUrlArguments arguments () const
 
BrowserExtension * browserExtension () const
 
bool closeStream ()
 
bool isProgressInfoEnabled () const
 
bool openStream (const QString &mimeType, const KUrl &url)
 
void setArguments (const OpenUrlArguments &arguments)
 
void setProgressInfoEnabled (bool show)
 
void showProgressInfo (bool show)
 
KUrl url () const
 
bool writeStream (const QByteArray &data)
 
- Public Member Functions inherited from KParts::Part
 Part (QObject *parent=0)
 
virtual ~Part ()
 
virtual void embed (QWidget *parentWidget)
 
virtual Part * hitTest (QWidget *widget, const QPoint &globalPos)
 
KIconLoader * iconLoader ()
 
bool isSelectable () const
 
PartManager * manager () const
 
void setAutoDeletePart (bool autoDeletePart)
 
void setAutoDeleteWidget (bool autoDeleteWidget)
 
virtual void setManager (PartManager *manager)
 
virtual void setSelectable (bool selectable)
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient ()
 
 KXMLGUIClient (KXMLGUIClient *parent)
 
virtual ~KXMLGUIClient ()
 
QAction * action (const char *name) const
 
virtual QAction * action (const QDomElement &element) const
 
virtual KActionCollection * actionCollection () const
 
void addStateActionDisabled (const QString &state, const QString &action)
 
void addStateActionEnabled (const QString &state, const QString &action)
 
void beginXMLPlug (QWidget *)
 
QList< KXMLGUIClient * > childClients ()
 
KXMLGUIBuilder * clientBuilder () const
 
virtual KComponentData componentData () const
 
virtual QDomDocument domDocument () const
 
void endXMLPlug ()
 
KXMLGUIFactory * factory () const
 
StateChange getActionsToChangeForState (const QString &state)
 
void insertChildClient (KXMLGUIClient *child)
 
virtual QString localXMLFile () const
 
KXMLGUIClient * parentClient () const
 
void plugActionList (const QString &name, const QList< QAction * > &actionList)
 
void prepareXMLUnplug (QWidget *)
 
void reloadXML ()
 
void removeChildClient (KXMLGUIClient *child)
 
void replaceXMLFile (const QString &xmlfile, const QString &localxmlfile, bool merge=false)
 
void setClientBuilder (KXMLGUIBuilder *builder)
 
void setFactory (KXMLGUIFactory *factory)
 
void setXMLGUIBuildDocument (const QDomDocument &doc)
 
void unplugActionList (const QString &name)
 
virtual QString xmlFile () const
 
QDomDocument xmlguiBuildDocument () const
 
- Public Member Functions inherited from KTextEditor::SessionConfigInterface
 SessionConfigInterface ()
 
virtual ~SessionConfigInterface ()
 
- Public Member Functions inherited from KTextEditor::ParameterizedSessionConfigInterface
 ParameterizedSessionConfigInterface ()
 
virtual ~ParameterizedSessionConfigInterface ()
 
- Public Member Functions inherited from KTextEditor::SearchInterface
 SearchInterface ()
 
virtual ~SearchInterface ()
 
virtual QVector
< KTextEditor::Range > 
searchText (const KTextEditor::Range &range, const QString &pattern, const Search::SearchOptions options=Search::Default)=0
 
- Public Member Functions inherited from KTextEditor::MarkInterface
 MarkInterface ()
 
virtual ~MarkInterface ()
 
virtual void addMark (int line, uint markType)=0
 
virtual void clearMark (int line)=0
 
virtual void clearMarks ()=0
 
virtual void markChanged (KTextEditor::Document *document, KTextEditor::Mark mark, KTextEditor::MarkInterface::MarkChangeAction action)=0
 
virtual QString markDescription (MarkTypes mark) const =0
 
virtual QPixmap markPixmap (MarkTypes mark) const =0
 
virtual void marksChanged (KTextEditor::Document *document)=0
 
virtual void removeMark (int line, uint markType)=0
 
virtual void setEditableMarks (uint markMask)=0
 
virtual void setMark (int line, uint markType)=0
 
virtual void setMarkDescription (MarkTypes mark, const QString &text)=0
 
virtual void setMarkPixmap (MarkTypes mark, const QPixmap &pixmap)=0
 
- Public Member Functions inherited from KTextEditor::VariableInterface
 VariableInterface ()
 
virtual ~VariableInterface ()
 
virtual void variableChanged (Document *document, const QString &variable, const QString &value)=0
 
- Public Member Functions inherited from KTextEditor::ModificationInterface
 ModificationInterface ()
 
virtual ~ModificationInterface ()
 
virtual void modifiedOnDisk (KTextEditor::Document *document, bool isModified, KTextEditor::ModificationInterface::ModifiedOnDiskReason reason)=0
 
virtual void slotModifiedOnDisk (View *view=0)=0
 
- Public Member Functions inherited from KTextEditor::ConfigInterface
 ConfigInterface ()
 
virtual ~ConfigInterface ()
 
- Public Member Functions inherited from KTextEditor::AnnotationInterface
virtual ~AnnotationInterface ()
 
- Public Member Functions inherited from KTextEditor::HighlightInterface
 HighlightInterface ()
 
virtual ~HighlightInterface ()
 
- Public Member Functions inherited from KTextEditor::MovingInterface
 MovingInterface ()
 
virtual ~MovingInterface ()
 
void aboutToDeleteMovingInterfaceContent (KTextEditor::Document *document)
 
void aboutToInvalidateMovingInterfaceContent (KTextEditor::Document *document)
 
virtual MovingRange * newMovingRange (const Range &range, MovingRange::InsertBehaviors insertBehaviors=MovingRange::DoNotExpand, MovingRange::EmptyBehavior emptyBehavior=MovingRange::AllowEmpty)=0
 
- Public Member Functions inherited from KTextEditor::RecoveryInterface
 RecoveryInterface ()
 
virtual ~RecoveryInterface ()
 
- Public Member Functions inherited from KTextEditor::MessageInterface
 MessageInterface ()
 
virtual ~MessageInterface ()
 

Static Public Member Functions

static bool checkOverwrite (KUrl u, QWidget *parent)
 
static bool simpleMode ()
 
- Static Public Member Functions inherited from KXMLGUIClient
static QString findMostRecentXMLFile (const QStringList &files, QString &doc)
 
- Static Public Member Functions inherited from KTextEditor::MarkInterface
static int reservedMarkersCount ()
 

Protected Member Functions

void deleteDictionaryRange (KTextEditor::MovingRange *movingRange)
 
void rangeEmpty (KTextEditor::MovingRange *movingRange)
 
void rangeInvalid (KTextEditor::MovingRange *movingRange)
 
- Protected Member Functions inherited from KTextEditor::Document
void setOpeningError (bool errors)
 
void setOpeningErrorMessage (const QString &message)
 
- Protected Member Functions inherited from KParts::ReadWritePart
virtual bool saveToUrl ()
 
- Protected Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (ReadOnlyPartPrivate &dd, QObject *parent)
 
void abortLoad ()
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
bool isLocalFileTemporary () const
 
QString localFilePath () const
 
void setLocalFilePath (const QString &localFilePath)
 
void setLocalFileTemporary (bool temp)
 
void setUrl (const KUrl &url)
 
- Protected Member Functions inherited from KParts::Part
 Part (PartPrivate &dd, QObject *parent)
 
virtual void customEvent (QEvent *event)
 
QWidget * hostContainer (const QString &containerName)
 
void loadPlugins ()
 
virtual void partActivateEvent (PartActivateEvent *event)
 
virtual void partSelectEvent (PartSelectEvent *event)
 
virtual void setWidget (QWidget *widget)
 
- Protected Member Functions inherited from KXMLGUIClient
void loadStandardsXmlFile ()
 
virtual void setComponentData (const KComponentData &componentData)
 
virtual void setDOMDocument (const QDomDocument &document, bool merge=false)
 
virtual void setLocalXMLFile (const QString &file)
 
virtual void setXML (const QString &document, bool merge=false)
 
virtual void setXMLFile (const QString &file, bool merge=false, bool setXMLDoc=true)
 
virtual void stateChanged (const QString &newstate, ReverseStateChange reverse=StateNoReverse)
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

QString m_defaultDictionary
 
QList< QPair
< KTextEditor::MovingRange
*, QString > > 
m_dictionaryRanges
 
KateOnTheFlyChecker * m_onTheFlyChecker
 
KateUndoManager *const m_undoManager
 

Additional Inherited Members

- Protected Slots inherited from KParts::Part
void slotWidgetDestroyed ()
 
- Properties inherited from KParts::ReadOnlyPart
KUrl url
 

Detailed Description

Definition at line 74 of file katedocument.h.

Member Typedef Documentation

typedef QList<QPair<int, int> > KateDocument::OffsetList

Definition at line 1131 of file katedocument.h.

Member Enumeration Documentation

enum KateDocument::EncodedCharaterInsertionPolicy
Enumerator
EncodeAlways 
EncodeWhenPresent 
EncodeNever 

Definition at line 1144 of file katedocument.h.

enum KateDocument::TextTransform
Enumerator
Uppercase 
Lowercase 
Capitalize 

Definition at line 734 of file katedocument.h.

Constructor & Destructor Documentation

KateDocument::KateDocument ( bool  bSingleViewMode = false,
bool  bBrowserView = false,
bool  bReadOnly = false,
QWidget *  parentWidget = 0,
QObject *  parent = 0 
)
explicit

avoid spamming plasma and other window managers with progress dialogs we show such stuff inline in the views!

load handling this is needed to ensure we signal the user if a file ist still loading and to disallow him to edit in that time

Definition at line 111 of file katedocument.cpp.

KateDocument::~KateDocument ( )

we are about to delete cursors/ranges/...

Definition at line 229 of file katedocument.cpp.

Member Function Documentation

void KateDocument::aboutToDeleteMovingInterfaceContent ( KTextEditor::Document *  document)
signal

This signal is emitted before the cursors/ranges/revisions of a document are destroyed as the document is deleted.

Parameters
documentthe document which the interface belongs too which is in the process of being deleted
void KateDocument::aboutToInvalidateMovingInterfaceContent ( KTextEditor::Document *  document)
signal

This signal is emitted before the ranges of a document are invalidated and the revisions are deleted as the document is cleared (for example on load/reload).

While this signal is emitted, still the old document content is around before the clear.

Parameters
documentthe document which the interface belongs too which will invalidate its data
void KateDocument::aboutToRemoveText ( const KTextEditor::Range &  )
signal
KateView * KateDocument::activeKateView ( ) const

Definition at line 4677 of file katedocument.cpp.

virtual KTextEditor::View* KateDocument::activeView ( ) const
inlinevirtual

Implements KTextEditor::Document.

Definition at line 156 of file katedocument.h.

void KateDocument::addMark ( int  line,
uint  markType 
)
virtualslot

Definition at line 1677 of file katedocument.cpp.

void KateDocument::addView ( KTextEditor::View *  view)

Definition at line 2523 of file katedocument.cpp.

void KateDocument::align ( KateView *  view,
const KTextEditor::Range &  range 
)

Definition at line 2908 of file katedocument.cpp.

KTextEditor::AnnotationModel * KateDocument::annotationModel ( ) const
virtual

Implements KTextEditor::AnnotationInterface.

Definition at line 4800 of file katedocument.cpp.

void KateDocument::annotationModelChanged ( KTextEditor::AnnotationModel *  ,
KTextEditor::AnnotationModel *   
)
signal
void KateDocument::backspace ( KateView *  view,
const KTextEditor::Cursor &  c 
)

Definition at line 2725 of file katedocument.cpp.

void KateDocument::bomSetByUser ( )

Set that the BOM marker is forced via the tool menu.

Definition at line 1536 of file katedocument.cpp.

bool KateDocument::browserView ( ) const
inline

Definition at line 139 of file katedocument.h.

KateBuffer& KateDocument::buffer ( )
inline

Get access to buffer of this document.

Is needed to create cursors and ranges for example.

Returns
document buffer

Definition at line 946 of file katedocument.h.

void KateDocument::bufferHlChanged ( )

Definition at line 1519 of file katedocument.cpp.

QChar KateDocument::character ( const KTextEditor::Cursor &  position) const
virtual

Implements KTextEditor::Document.

Definition at line 388 of file katedocument.cpp.

void KateDocument::charactersSemiInteractivelyInserted ( const KTextEditor::Cursor &  position,
const QString &  text 
)
signal
bool KateDocument::checkOverwrite ( KUrl  u,
QWidget *  parent 
)
static

Definition at line 4585 of file katedocument.cpp.

bool KateDocument::clear ( )
virtualslot

Definition at line 509 of file katedocument.cpp.

void KateDocument::clearDictionaryRanges ( )
slot

Definition at line 5042 of file katedocument.cpp.

void KateDocument::clearMark ( int  line)
virtualslot

Definition at line 1661 of file katedocument.cpp.

void KateDocument::clearMarks ( )
virtualslot

Definition at line 1787 of file katedocument.cpp.

void KateDocument::clearMisspellingForWord ( const QString &  word)

Definition at line 5187 of file katedocument.cpp.

bool KateDocument::closeUrl ( )
virtual

reset reloading

reset reloading

delete all KTE::Messages

we are about to invalidate all cursors/ranges/.. => m_buffer->clear will do so

Reimplemented from KParts::ReadWritePart.

Definition at line 2336 of file katedocument.cpp.

void KateDocument::comment ( KateView *  view,
uint  line,
uint  column,
int  change 
)

Definition at line 3301 of file katedocument.cpp.

int KateDocument::computePositionWrtOffsets ( const OffsetList &  offsetList,
int  pos 
)

Definition at line 5254 of file katedocument.cpp.

KateDocumentConfig* KateDocument::config ( )
inline

Configuration.

Definition at line 1009 of file katedocument.h.

KateDocumentConfig* KateDocument::config ( ) const
inline

Definition at line 1010 of file katedocument.h.

void KateDocument::configChanged ( )
signal
QStringList KateDocument::configKeys ( ) const
virtual

Implements KTextEditor::ConfigInterface.

Definition at line 4604 of file katedocument.cpp.

QVariant KateDocument::configValue ( const QString &  key)
virtual

Implements KTextEditor::ConfigInterface.

Definition at line 4609 of file katedocument.cpp.

bool KateDocument::containsCharacterEncoding ( const KTextEditor::Range &  range)

Definition at line 5228 of file katedocument.cpp.

KTextEditor::View * KateDocument::createView ( QWidget *  parent)
virtual

Implements KTextEditor::Document.

Definition at line 292 of file katedocument.cpp.

QString KateDocument::decodeCharacters ( const KTextEditor::Range &  range,
KateDocument::OffsetList &  decToEncOffsetList,
KateDocument::OffsetList &  encToDecOffsetList 
)

The first OffsetList is from decoded to encoded, and the second OffsetList from encoded to decoded.

Definition at line 5266 of file katedocument.cpp.

QString KateDocument::defaultDictionary ( ) const

Definition at line 5032 of file katedocument.cpp.

void KateDocument::defaultDictionaryChanged ( KateDocument *  document)
signal
KTextEditor::Attribute::Ptr KateDocument::defaultStyle ( const KTextEditor::HighlightInterface::DefaultStyle  ds) const
virtual

TODO: move attributes to document, they are not view-dependant

Implements KTextEditor::HighlightInterface.

Definition at line 5354 of file katedocument.cpp.

int KateDocument::defStyleNum ( int  line,
int  column 
)
Returns
-1 if line or column invalid, otherwise one of standard style attribute number

either get char attribute or attribute of context still active at end of line

Definition at line 5451 of file katedocument.cpp.

void KateDocument::del ( KateView *  view,
const KTextEditor::Cursor &  c 
)

Definition at line 2805 of file katedocument.cpp.

void KateDocument::deleteDictionaryRange ( KTextEditor::MovingRange *  movingRange)
protected

Definition at line 5211 of file katedocument.cpp.

QString KateDocument::dictionaryForMisspelledRange ( const KTextEditor::Range &  range) const

Definition at line 5177 of file katedocument.cpp.

QList< QPair< KTextEditor::MovingRange *, QString > > KateDocument::dictionaryRanges ( ) const

Definition at line 5037 of file katedocument.cpp.

void KateDocument::dictionaryRangesPresent ( bool  yesNo)
signal
const QByteArray & KateDocument::digest ( ) const

md5 digest of this document

Returns
md5 digest for this document

Definition at line 4410 of file katedocument.cpp.

void KateDocument::discardDataRecovery ( )
virtual

Implements KTextEditor::RecoveryInterface.

Definition at line 2462 of file katedocument.cpp.

KTextEditor::Cursor KateDocument::documentEnd ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 4682 of file katedocument.cpp.

virtual const QString& KateDocument::documentName ( ) const
inlinevirtual

Implements KTextEditor::Document.

Definition at line 828 of file katedocument.h.

bool KateDocument::documentReload ( )
virtualslot

Reloads the current document from disk if possible.

Definition at line 3805 of file katedocument.cpp.

bool KateDocument::documentSave ( )
virtualslot

Definition at line 3899 of file katedocument.cpp.

bool KateDocument::documentSaveAs ( )
virtualslot

Definition at line 3907 of file katedocument.cpp.

uint KateDocument::editableMarks ( ) const
virtual

Implements KTextEditor::MarkInterface.

Definition at line 1841 of file katedocument.cpp.

void KateDocument::editBegin ( )
inline

Alias for editStart()

Definition at line 213 of file katedocument.h.

void KateDocument::editEnd ( )

End a editor operation.

See also
editStart()

Definition at line 796 of file katedocument.cpp.

bool KateDocument::editInsertLine ( int  line,
const QString &  s 
)

Insert a string at the given line.

Parameters
lineline number
sstring to insert
Returns
true on success

Definition at line 1223 of file katedocument.cpp.

bool KateDocument::editInsertText ( int  line,
int  col,
const QString &  s 
)

Add a string in the given line/column.

Parameters
lineline number
colcolumn
sstring to be inserted
Returns
true on success

Definition at line 971 of file katedocument.cpp.

void KateDocument::editLineUnWrapped ( int  line,
int  col 
)
signal

Emitted each time text from nextLine was upwrapped onto line.

void KateDocument::editLineWrapped ( int  line,
int  col,
int  len 
)
signal

Emmitted when text from line was wrapped at position pos onto line nextLine.

bool KateDocument::editMarkLineAutoWrapped ( int  line,
bool  autowrapped 
)

Mark line as autowrapped.

This is necessary if static word warp is enabled, because we have to know whether to insert a new line or add the wrapped words to the followin line.

Parameters
lineline number
autowrappedautowrapped?
Returns
true on success

Definition at line 1056 of file katedocument.cpp.

KTextEditor::Editor * KateDocument::editor ( )
virtual

Implements KTextEditor::Document.

Definition at line 314 of file katedocument.cpp.

bool KateDocument::editRemoveLine ( int  line)

Remove a line.

Parameters
lineline number
Returns
true on success

Definition at line 1289 of file katedocument.cpp.

bool KateDocument::editRemoveLines ( int  from,
int  to 
)

Definition at line 1294 of file katedocument.cpp.

bool KateDocument::editRemoveText ( int  line,
int  col,
int  len 
)

Remove a string in the given line/column.

Parameters
lineline number
colcolumn
lenlength of text to be removed
Returns
true on success

Definition at line 1012 of file katedocument.cpp.

void KateDocument::editStart ( )

Enclose editor actions with editStart() and editEnd() to group them.

Definition at line 776 of file katedocument.cpp.

bool KateDocument::editUnWrapLine ( int  line,
bool  removeLine = true,
int  length = 0 
)

Unwrap line.

If removeLine is true, we force to join the lines. If removeLine is true, length is ignored (eg not needed).

Parameters
lineline number
removeLineif true, force to remove the next line
Returns
true on success

Definition at line 1153 of file katedocument.cpp.

bool KateDocument::editWrapLine ( int  line,
int  col,
bool  newLine = true,
bool *  newLineAdded = 0 
)

Wrap line.

If newLine is true, ignore the textline's flag KateTextLine::flagAutoWrapped and force a new line. Whether a new line was needed/added you can grab with newLineAdded.

Parameters
lineline number
colcolumn
newLineif true, force a new line
newLineAddedreturn value is true, if new line was added (may be 0)
Returns
true on success

Definition at line 1083 of file katedocument.cpp.

QStringList KateDocument::embeddedHighlightingModes ( ) const
virtual

Implements KTextEditor::HighlightInterface.

Definition at line 5401 of file katedocument.cpp.

const QString & KateDocument::encoding ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 3958 of file katedocument.cpp.

virtual bool KateDocument::endEditing ( )
inlinevirtual

Implements KTextEditor::Document.

Definition at line 225 of file katedocument.h.

QString KateDocument::fileType ( ) const
inline

Definition at line 939 of file katedocument.h.

bool KateDocument::findMatchingBracket ( KTextEditor::Range &  range,
int  maxLines = -1 
)

Definition at line 3588 of file katedocument.cpp.

int KateDocument::fromVirtualColumn ( int  line,
int  column 
) const

Definition at line 2579 of file katedocument.cpp.

int KateDocument::fromVirtualColumn ( const KTextEditor::Cursor &  cursor) const

Definition at line 2589 of file katedocument.cpp.

QString KateDocument::getWord ( const KTextEditor::Cursor &  cursor)

Definition at line 3537 of file katedocument.cpp.

bool KateDocument::handleMarkClick ( int  line)
slot

Returns true if the click on the mark should not be further processed.

Definition at line 1762 of file katedocument.cpp.

bool KateDocument::handleMarkContextMenu ( int  line,
QPoint  position 
)
slot

Returns true if the context-menu event should not further be processed.

Definition at line 1774 of file katedocument.cpp.

KateHighlighting * KateDocument::highlight ( ) const

Definition at line 4702 of file katedocument.cpp.

QString KateDocument::highlightingMode ( ) const
virtual

Return the name of the currently used mode.

Returns
name of the used mode

Implements KTextEditor::Document.

Definition at line 1494 of file katedocument.cpp.

QString KateDocument::highlightingModeAt ( const KTextEditor::Cursor &  position)
virtual

Implements KTextEditor::HighlightInterface.

Definition at line 5406 of file katedocument.cpp.

QStringList KateDocument::highlightingModes ( ) const
virtual

Return a list of the names of all possible modes.

Returns
list of mode names

Implements KTextEditor::Document.

Definition at line 1499 of file katedocument.cpp.

QString KateDocument::highlightingModeSection ( int  index) const
virtual

Returns the name of the section for a highlight given its index in the highlight list (as returned by highlightModes()).

You can use this function to build a tree of the highlight names, organized in sections.

Parameters
namethe name of the highlight for which to find the section name.

Implements KTextEditor::Document.

Definition at line 1509 of file katedocument.cpp.

void KateDocument::ignoreModifiedOnDiskOnce ( )

Definition at line 4697 of file katedocument.cpp.

void KateDocument::indent ( KTextEditor::Range  range,
int  change 
)

Definition at line 2898 of file katedocument.cpp.

void KateDocument::inputMethodEnd ( )

Definition at line 850 of file katedocument.cpp.

void KateDocument::inputMethodStart ( )

Definition at line 845 of file katedocument.cpp.

bool KateDocument::insertLine ( int  line,
const QString &  s 
)
virtualslot

Definition at line 701 of file katedocument.cpp.

bool KateDocument::insertLines ( int  line,
const QStringList &  s 
)
virtualslot

Definition at line 712 of file katedocument.cpp.

void KateDocument::insertTab ( KateView *  view,
const KTextEditor::Cursor &   
)

Definition at line 2913 of file katedocument.cpp.

bool KateDocument::insertText ( const KTextEditor::Cursor &  position,
const QString &  s,
bool  block = false 
)
virtualslot

Definition at line 530 of file katedocument.cpp.

bool KateDocument::insertText ( const KTextEditor::Cursor &  position,
const QStringList &  text,
bool  block = false 
)
virtualslot

Definition at line 624 of file katedocument.cpp.

bool KateDocument::isComment ( int  line,
int  column 
)

Definition at line 5491 of file katedocument.cpp.

bool KateDocument::isDataRecoveryAvailable ( ) const
virtual

Implements KTextEditor::RecoveryInterface.

Definition at line 2451 of file katedocument.cpp.

bool KateDocument::isEditRunning ( ) const

Definition at line 4718 of file katedocument.cpp.

bool KateDocument::isModifiedOnDisc ( )
inline
Returns
whether the document is modified on disk since last saved

Definition at line 837 of file katedocument.h.

bool KateDocument::isOnTheFlySpellCheckingEnabled ( ) const

Definition at line 5172 of file katedocument.cpp.

void KateDocument::joinLines ( uint  first,
uint  last 
)

Unwrap a range of lines.

Definition at line 3496 of file katedocument.cpp.

Kate::TextLine KateDocument::kateTextLine ( uint  i)

Definition at line 4707 of file katedocument.cpp.

int KateDocument::lastLine ( ) const
inline

gets the last line number (lines() - 1)

Definition at line 691 of file katedocument.h.

qint64 KateDocument::lastSavedRevision ( ) const
virtual

Last revision the buffer got successful saved.

Returns
last revision buffer got saved, -1 if none

Implements KTextEditor::MovingInterface.

Definition at line 4752 of file katedocument.cpp.

QString KateDocument::line ( int  line) const
virtual

Implements KTextEditor::Document.

Definition at line 447 of file katedocument.cpp.

QList< KTextEditor::HighlightInterface::AttributeBlock > KateDocument::lineAttributes ( const unsigned int  line)
virtual

TODO: move attributes to document, they are not view-dependant

Implements KTextEditor::HighlightInterface.

Definition at line 5372 of file katedocument.cpp.

int KateDocument::lineLength ( int  line) const
virtual

Implements KTextEditor::Document.

Definition at line 758 of file katedocument.cpp.

int KateDocument::lines ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 753 of file katedocument.cpp.

void KateDocument::lockRevision ( qint64  revision)
virtual

Lock a revision, this will keep it around until released again.

But all revisions will always be cleared on buffer clear() (and therefor load())

Parameters
revisionrevision to lock

Implements KTextEditor::MovingInterface.

Definition at line 4757 of file katedocument.cpp.

void KateDocument::makeAttribs ( bool  needInvalidate = true)

Definition at line 2502 of file katedocument.cpp.

uint KateDocument::mark ( int  line)
virtual

Implements KTextEditor::MarkInterface.

Definition at line 1646 of file katedocument.cpp.

void KateDocument::markChanged ( KTextEditor::Document *  ,
KTextEditor::Mark  ,
KTextEditor::MarkInterface::MarkChangeAction   
)
signal
void KateDocument::markClicked ( KTextEditor::Document *  document,
KTextEditor::Mark  mark,
bool &  handled 
)
signal
QColor KateDocument::markColor ( MarkInterface::MarkTypes  type) const
virtual

Definition at line 1821 of file katedocument.cpp.

void KateDocument::markContextMenuRequested ( KTextEditor::Document *  document,
KTextEditor::Mark  mark,
QPoint  pos,
bool &  handled 
)
signal
QString KateDocument::markDescription ( MarkInterface::MarkTypes  type) const
virtual

Definition at line 1831 of file katedocument.cpp.

QPixmap KateDocument::markPixmap ( MarkInterface::MarkTypes  type) const
virtual

Definition at line 1816 of file katedocument.cpp.

const QHash< int, KTextEditor::Mark * > & KateDocument::marks ( )
virtual

Implements KTextEditor::MarkInterface.

Definition at line 1747 of file katedocument.cpp.

void KateDocument::marksChanged ( KTextEditor::Document *  )
signal
void KateDocument::markToolTipRequested ( KTextEditor::Document *  document,
KTextEditor::Mark  mark,
QPoint  position,
bool &  handled 
)
signal
void KateDocument::messageDestroyed ( KTextEditor::Message *  message)
slot

Definition at line 5543 of file katedocument.cpp.

QString KateDocument::mimeType ( )
virtual
Returns
the name of the mimetype for the document.

This method is using KMimeType::findByUrl, and if the pointer is then still the default MimeType for a nonlocal or unsaved file, uses mimeTypeForContent().

Implements KTextEditor::Document.

Definition at line 1860 of file katedocument.cpp.

KMimeType::Ptr KateDocument::mimeTypeForContent ( )
Returns
a pointer to the KMimeType for this document, found by analyzing the actual content.

Note that this method is not part of the DocumentInfoInterface.

Definition at line 1874 of file katedocument.cpp.

QString KateDocument::mode ( ) const
virtual

Return the name of the currently used mode.

Returns
name of the used mode

Implements KTextEditor::Document.

Definition at line 1468 of file katedocument.cpp.

QStringList KateDocument::modes ( ) const
virtual

Return a list of the names of all possible modes.

Returns
list of mode names

Implements KTextEditor::Document.

Definition at line 1473 of file katedocument.cpp.

QString KateDocument::modeSection ( int  index) const
virtual

Returns the name of the section for a mode given its index in the highlight list (as returned by modes()).

You can use this function to build a tree of the mode names, organized in sections.

Parameters
namethe name of the highlight for which to find the section name.

Implements KTextEditor::Document.

Definition at line 1514 of file katedocument.cpp.

void KateDocument::modifiedOnDisk ( KTextEditor::Document *  doc,
bool  isModified,
KTextEditor::ModificationInterface::ModifiedOnDiskReason  reason 
)
signal

Indicate this file is modified on disk.

Parameters
docthe KTextEditor::Document object that represents the file on disk
isModifiedindicates the file was modified rather than created or deleted
reasonthe reason we are emitting the signal.
void KateDocument::newBracketMark ( const KTextEditor::Cursor &  start,
KTextEditor::Range &  bm,
int  maxLines = -1 
)

Definition at line 3572 of file katedocument.cpp.

void KateDocument::newLine ( KateView *  view)

Definition at line 2659 of file katedocument.cpp.

KTextEditor::MovingCursor * KateDocument::newMovingCursor ( const KTextEditor::Cursor &  position,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior = KTextEditor::MovingCursor::MoveOnInsert 
)
virtual

Create a new moving cursor for this document.

Parameters
positionposition of the moving cursor to create
insertBehaviorinsertion behavior
Returns
new moving cursor for the document

Implements KTextEditor::MovingInterface.

Definition at line 4737 of file katedocument.cpp.

KTextEditor::MovingRange * KateDocument::newMovingRange ( const KTextEditor::Range &  range,
KTextEditor::MovingRange::InsertBehaviors  insertBehaviors = KTextEditor::MovingRange::DoNotExpand,
KTextEditor::MovingRange::EmptyBehavior  emptyBehavior = KTextEditor::MovingRange::AllowEmpty 
)
virtual

Create a new moving range for this document.

Parameters
rangerange of the moving range to create
insertBehaviorsinsertion behaviors
emptyBehaviorbehavior on becoming empty
Returns
new moving range for the document

Definition at line 4742 of file katedocument.cpp.

void KateDocument::onTheFlySpellCheckingEnabled ( bool  enable)
slot

Definition at line 5152 of file katedocument.cpp.

bool KateDocument::openFile ( )
virtual

open the file obtained by the kparts framework the framework abstracts the loading of remote files

Returns
success

we are about to invalidate all cursors/ranges/.. => m_buffer->openFile will do so

Reimplemented from KParts::ReadOnlyPart.

Definition at line 1931 of file katedocument.cpp.

bool KateDocument::openUrl ( const KUrl &  url)
virtual

Reimplemented from KParts::ReadOnlyPart.

Definition at line 2330 of file katedocument.cpp.

bool KateDocument::ownedView ( KateView *  view)

Definition at line 2559 of file katedocument.cpp.

bool KateDocument::pageUpDownMovesCursor ( ) const

Definition at line 3947 of file katedocument.cpp.

void KateDocument::paste ( KateView *  view,
const QString &  text 
)

Definition at line 2828 of file katedocument.cpp.

Kate::TextLine KateDocument::plainKateTextLine ( uint  i)

Definition at line 4713 of file katedocument.cpp.

void KateDocument::popEditState ( )

Definition at line 836 of file katedocument.cpp.

bool KateDocument::postMessage ( KTextEditor::Message *  message)
virtual

Implements KTextEditor::MessageInterface.

Definition at line 5498 of file katedocument.cpp.

bool KateDocument::print ( )
slot

Definition at line 1853 of file katedocument.cpp.

bool KateDocument::printDialog ( )
slot

Definition at line 1848 of file katedocument.cpp.

void KateDocument::pushEditState ( )

Definition at line 831 of file katedocument.cpp.

bool KateDocument::queryClose ( )
virtual

Reimplemented from KParts::ReadWritePart.

Definition at line 4807 of file katedocument.cpp.

void KateDocument::rangeEmpty ( KTextEditor::MovingRange *  movingRange)
protectedvirtual

Reimplemented from KTextEditor::MovingRangeFeedback.

Definition at line 5206 of file katedocument.cpp.

void KateDocument::rangeInvalid ( KTextEditor::MovingRange *  movingRange)
protectedvirtual

Reimplemented from KTextEditor::MovingRangeFeedback.

Definition at line 5201 of file katedocument.cpp.

KTextEditor::Range KateDocument::rangeOnLine ( KTextEditor::Range  range,
int  line 
) const

Definition at line 319 of file katedocument.cpp.

bool KateDocument::readOnly ( ) const
inline

Definition at line 138 of file katedocument.h.

void KateDocument::readParameterizedSessionConfig ( const KConfigGroup &  kconfig,
unsigned long  configParameters 
)
virtual

Implements KTextEditor::ParameterizedSessionConfigInterface.

Definition at line 1548 of file katedocument.cpp.

void KateDocument::readSessionConfig ( const KConfigGroup &  kconfig)
virtual

Implements KTextEditor::SessionConfigInterface.

Definition at line 1543 of file katedocument.cpp.

void KateDocument::readWriteChanged ( KTextEditor::Document *  document)
signal
void KateDocument::recoverData ( )
virtual

Implements KTextEditor::RecoveryInterface.

Definition at line 2456 of file katedocument.cpp.

void KateDocument::redo ( )
slot

Definition at line 1380 of file katedocument.cpp.

uint KateDocument::redoCount ( ) const

Definition at line 1370 of file katedocument.cpp.

void KateDocument::refreshOnTheFlyCheck ( const KTextEditor::Range &  range = KTextEditor::Range::invalid())
slot

Definition at line 5194 of file katedocument.cpp.

void KateDocument::rememberUserDidSetIndentationMode ( )
inline

set indentation mode by user this will remember that a user did set it and will avoid reset on save

Definition at line 952 of file katedocument.h.

bool KateDocument::removeLine ( int  line)
virtualslot

Definition at line 727 of file katedocument.cpp.

void KateDocument::removeMark ( int  line,
uint  markType 
)
virtualslot

Definition at line 1714 of file katedocument.cpp.

bool KateDocument::removeText ( const KTextEditor::Range &  range,
bool  block = false 
)
virtualslot

Definition at line 633 of file katedocument.cpp.

void KateDocument::removeView ( KTextEditor::View *  view)

removes the view from the list of views.

The view is not deleted. That's your job. Or, easier, just delete the view in the first place. It will remove itself. TODO: this could be converted to a private slot connected to the view's destroyed() signal. It is not currently called anywhere except from the KateView destructor.

Definition at line 2540 of file katedocument.cpp.

void KateDocument::repaintViews ( bool  paintOnlyDirty = true)

Definition at line 3559 of file katedocument.cpp.

void KateDocument::replaceCharactersByEncoding ( const KTextEditor::Range &  range)

Definition at line 5322 of file katedocument.cpp.

bool KateDocument::replaceText ( const KTextEditor::Range &  range,
const QString &  s,
bool  block = false 
)
virtualslot

Definition at line 4687 of file katedocument.cpp.

virtual bool KateDocument::replaceText ( const KTextEditor::Range &  r,
const QStringList &  l,
bool  b 
)
inlinevirtualslot

Definition at line 185 of file katedocument.h.

void KateDocument::requestMarkTooltip ( int  line,
QPoint  position 
)
slot

Definition at line 1752 of file katedocument.cpp.

void KateDocument::revertToDefaultDictionary ( const KTextEditor::Range &  range)
slot

Definition at line 5132 of file katedocument.cpp.

qint64 KateDocument::revision ( ) const
virtual

Current revision.

Returns
current revision

Implements KTextEditor::MovingInterface.

Definition at line 4747 of file katedocument.cpp.

bool KateDocument::save ( )
virtualslot

no double save/load we need to allow DocumentPreSavingAs here as state, as save is called in saveAs!

if we are idle, we are now saving

call back implementation for real work

Definition at line 4981 of file katedocument.cpp.

bool KateDocument::saveAs ( const KUrl &  url)
virtual

abort on bad URL that is done in saveAs below, too but we must check it here already to avoid messing up as no signals will be send, then

no double save/load

we enter the pre save as phase

call base implementation for real work

Reimplemented from KParts::ReadWritePart.

Definition at line 5004 of file katedocument.cpp.

bool KateDocument::saveFile ( )
virtual

save the file obtained by the kparts framework the framework abstracts the uploading of remote files

Returns
success

Implements KParts::ReadWritePart.

Definition at line 2076 of file katedocument.cpp.

QVector< KTextEditor::Range > KateDocument::searchText ( const KTextEditor::Range &  range,
const QString &  pattern,
const KTextEditor::Search::SearchOptions  options 
)
virtual

Definition at line 1387 of file katedocument.cpp.

void KateDocument::setActiveView ( KTextEditor::View *  view)

Definition at line 2551 of file katedocument.cpp.

void KateDocument::setAnnotationModel ( KTextEditor::AnnotationModel *  model)
virtual

Implements KTextEditor::AnnotationInterface.

Definition at line 4793 of file katedocument.cpp.

void KateDocument::setConfigValue ( const QString &  key,
const QVariant &  value 
)
virtual

Implements KTextEditor::ConfigInterface.

Definition at line 4633 of file katedocument.cpp.

void KateDocument::setDefaultDictionary ( const QString &  dict)
slot

Definition at line 5137 of file katedocument.cpp.

void KateDocument::setDictionary ( const QString &  dict,
const KTextEditor::Range &  range 
)
slot

Definition at line 5057 of file katedocument.cpp.

void KateDocument::setDontChangeHlOnSave ( )

allow to mark, that we changed hl on user wish and should not reset it atm used for the user visible menu to select highlightings

Definition at line 1531 of file katedocument.cpp.

void KateDocument::setEditableMarks ( uint  markMask)
virtualslot

Definition at line 1836 of file katedocument.cpp.

bool KateDocument::setEncoding ( const QString &  e)
virtual

Implements KTextEditor::Document.

Definition at line 3953 of file katedocument.cpp.

bool KateDocument::setHighlightingMode ( const QString &  name)
virtual

Set the current mode of the document by giving its name.

Parameters
namename of the mode to use for this document
Returns
true on success, otherwise false

Implements KTextEditor::Document.

Definition at line 1484 of file katedocument.cpp.

void KateDocument::setMark ( int  line,
uint  markType 
)
virtualslot

Definition at line 1655 of file katedocument.cpp.

void KateDocument::setMarkDescription ( MarkInterface::MarkTypes  type,
const QString &  description 
)
virtualslot

Definition at line 1811 of file katedocument.cpp.

void KateDocument::setMarkPixmap ( MarkInterface::MarkTypes  type,
const QPixmap &  pixmap 
)
virtualslot

Definition at line 1806 of file katedocument.cpp.

bool KateDocument::setMode ( const QString &  name)
virtual

Set the current mode of the document by giving its name.

Parameters
namename of the mode to use for this document
Returns
true on success, otherwise false

Implements KTextEditor::Document.

Definition at line 1462 of file katedocument.cpp.

void KateDocument::setModified ( bool  m)
virtual

Reimplemented from KParts::ReadWritePart.

Definition at line 2483 of file katedocument.cpp.

void KateDocument::setModifiedOnDisk ( ModifiedOnDiskReason  reason)
virtual

Implements KTextEditor::ModificationInterface.

Definition at line 3786 of file katedocument.cpp.

void KateDocument::setModifiedOnDiskWarning ( bool  on)
virtual

Implements KTextEditor::ModificationInterface.

Definition at line 3800 of file katedocument.cpp.

void KateDocument::setPageUpDownMovesCursor ( bool  on)
slot

Definition at line 3942 of file katedocument.cpp.

void KateDocument::setReadWrite ( bool  rw = true)
virtual

Reimplemented from KParts::ReadWritePart.

Definition at line 2468 of file katedocument.cpp.

bool KateDocument::setText ( const QString &  s)
virtualslot

Definition at line 457 of file katedocument.cpp.

bool KateDocument::setText ( const QStringList &  text)
virtualslot

Definition at line 483 of file katedocument.cpp.

void KateDocument::setUndoMergeAllEdits ( bool  merge)

Definition at line 4723 of file katedocument.cpp.

QString KateDocument::setVariable ( const QString &  name,
const QString &  value 
)
virtual

Definition at line 4344 of file katedocument.cpp.

void KateDocument::setWordWrap ( bool  on)
slot

Definition at line 3922 of file katedocument.cpp.

void KateDocument::setWordWrapAt ( uint  col)
slot

Definition at line 3932 of file katedocument.cpp.

bool KateDocument::simpleMode ( )
static

Definition at line 4787 of file katedocument.cpp.

bool KateDocument::singleViewMode ( ) const
inline

Definition at line 140 of file katedocument.h.

void KateDocument::slotModifiedOnDisk ( KTextEditor::View *  v = 0)
virtualslot

Ask the user what to do, if the file has been modified on disk.

Reimplemented from KTextEditor::Document.

Definition at line 3712 of file katedocument.cpp.

void KateDocument::slotQueryClose_save ( bool *  handled,
bool *  abortClosing 
)
slot

Definition at line 4559 of file katedocument.cpp.

virtual bool KateDocument::startEditing ( )
inlinevirtual

Implements KTextEditor::Document.

Definition at line 224 of file katedocument.h.

KTextEditor::Search::SearchOptions KateDocument::supportedSearchOptions ( ) const
virtual

Implements KTextEditor::SearchInterface.

Definition at line 1432 of file katedocument.cpp.

Kate::SwapFile * KateDocument::swapFile ( )

Definition at line 5442 of file katedocument.cpp.

void KateDocument::tagLines ( int  start,
int  end 
)
slot

Definition at line 3553 of file katedocument.cpp.

QString KateDocument::text ( const KTextEditor::Range &  range,
bool  blockwise = false 
) const
virtual

Implements KTextEditor::Document.

Definition at line 337 of file katedocument.cpp.

QString KateDocument::text ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 332 of file katedocument.cpp.

QStringList KateDocument::textLines ( const KTextEditor::Range &  range,
bool  block = false 
) const
virtual

Implements KTextEditor::Document.

Definition at line 398 of file katedocument.cpp.

int KateDocument::totalCharacters ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 738 of file katedocument.cpp.

int KateDocument::toVirtualColumn ( int  line,
int  column 
) const

Definition at line 2564 of file katedocument.cpp.

int KateDocument::toVirtualColumn ( const KTextEditor::Cursor &  cursor) const

Definition at line 2574 of file katedocument.cpp.

void KateDocument::transform ( KateView *  view,
const KTextEditor::Cursor &  c,
KateDocument::TextTransform  t 
)

Handling uppercase, lowercase and capitalize for the view.

If there is a selection, that is transformed, otherwise for uppercase or lowercase the character right of the cursor is transformed, for capitalize the word under the cursor is transformed.

Definition at line 3383 of file katedocument.cpp.

void KateDocument::transformCursor ( KTextEditor::Cursor &  cursor,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
virtual

Transform a cursor from one revision to an other.

Parameters
cursorcursor to transform
insertBehaviorbehavior of this cursor on insert of text at its position
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision

Implements KTextEditor::MovingInterface.

Definition at line 4772 of file katedocument.cpp.

void KateDocument::transformCursor ( int &  line,
int &  column,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
virtual

Transform a cursor from one revision to an other.

Parameters
lineline number of the cursor to transform
columncolumn number of the cursor to transform
insertBehaviorbehavior of this cursor on insert of text at its position
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision

Implements KTextEditor::MovingInterface.

Definition at line 4767 of file katedocument.cpp.

void KateDocument::transformRange ( KTextEditor::Range &  range,
KTextEditor::MovingRange::InsertBehaviors  insertBehaviors,
KTextEditor::MovingRange::EmptyBehavior  emptyBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
virtual

Transform a range from one revision to an other.

Parameters
rangerange to transform
insertBehaviorsbehavior of this range on insert of text at its position
emptyBehaviorbehavior on becoming empty
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision

Implements KTextEditor::MovingInterface.

Definition at line 4780 of file katedocument.cpp.

void KateDocument::transpose ( const KTextEditor::Cursor &  cursor)

Definition at line 2694 of file katedocument.cpp.

bool KateDocument::typeChars ( KateView *  type,
const QString &  realChars 
)

Type chars in a view.

Will filter out non-printable chars from the realChars array before inserting.

filter out non-printable

Definition at line 2594 of file katedocument.cpp.

void KateDocument::undo ( )
slot

Definition at line 1375 of file katedocument.cpp.

void KateDocument::undoChanged ( )
signal
uint KateDocument::undoCount ( ) const

Definition at line 1365 of file katedocument.cpp.

KateUndoManager* KateDocument::undoManager ( )
inline

Definition at line 338 of file katedocument.h.

void KateDocument::unlockRevision ( qint64  revision)
virtual

Release a revision.

Parameters
revisionrevision to release

Implements KTextEditor::MovingInterface.

Definition at line 4762 of file katedocument.cpp.

void KateDocument::updateConfig ( )

Definition at line 3963 of file katedocument.cpp.

void KateDocument::updateFileType ( const QString &  newType,
bool  user = false 
)

set the indentation mode, if any in the mode... and user did not set it before!

Definition at line 4504 of file katedocument.cpp.

void KateDocument::userSetEncodingForNextReload ( )
inline

User did set encoding for next reload => enforce it!

Definition at line 960 of file katedocument.h.

QString KateDocument::variable ( const QString &  name) const
virtual

Implements KTextEditor::VariableInterface.

Definition at line 4339 of file katedocument.cpp.

void KateDocument::variableChanged ( KTextEditor::Document *  ,
const QString &  ,
const QString &   
)
signal
const QList< KTextEditor::View * > & KateDocument::views ( ) const
virtual

Implements KTextEditor::Document.

Definition at line 309 of file katedocument.cpp.

QWidget * KateDocument::widget ( )
virtual
Returns
The widget defined by this part, set by setWidget().

Reimplemented from KParts::Part.

Definition at line 273 of file katedocument.cpp.

bool KateDocument::wordWrap ( ) const

Definition at line 3927 of file katedocument.cpp.

unsigned int KateDocument::wordWrapAt ( ) const

Definition at line 3937 of file katedocument.cpp.

bool KateDocument::wrapText ( int  startLine,
int  endLine 
)

Remove a line.

Parameters
startLineline to begin wrapping
endLineline to stop wrapping
Returns
true on success

Definition at line 855 of file katedocument.cpp.

void KateDocument::writeParameterizedSessionConfig ( KConfigGroup &  kconfig,
unsigned long  configParameters 
)
virtual

Implements KTextEditor::ParameterizedSessionConfigInterface.

Definition at line 1602 of file katedocument.cpp.

void KateDocument::writeSessionConfig ( KConfigGroup &  kconfig)
virtual

Implements KTextEditor::SessionConfigInterface.

Definition at line 1597 of file katedocument.cpp.

Member Data Documentation

QString KateDocument::m_defaultDictionary
protected

Definition at line 1148 of file katedocument.h.

QList<QPair<KTextEditor::MovingRange*, QString> > KateDocument::m_dictionaryRanges
protected

Definition at line 1149 of file katedocument.h.

KateOnTheFlyChecker* KateDocument::m_onTheFlyChecker
protected

Definition at line 1147 of file katedocument.h.

KateUndoManager* const KateDocument::m_undoManager
protected

Definition at line 344 of file katedocument.h.


The documentation for this class was generated from the following files:
  • katedocument.h
  • katedocument.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal