KateDocument Class Reference
Inheritance diagram for KateDocument:

Detailed Description
Definition at line 77 of file katedocument.h.
Public Types | |
| Uppercase | |
| Lowercase | |
| Capitalize | |
| enum | TextTransform { Uppercase, Lowercase, Capitalize } |
Public Slots | |
| uint | configPages () const |
| KTextEditor::ConfigPage * | configPage (uint number=0, QWidget *parent=0, const char *name=0) |
| QString | configPageName (uint number=0) const |
| QString | configPageFullName (uint number=0) const |
| QPixmap | configPagePixmap (uint number=0, int size=KIcon::SizeSmall) const |
| QString | text () const |
| QString | text (uint startLine, uint startCol, uint endLine, uint endCol) const |
| QString | text (uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const |
| QString | textLine (uint line) const |
| bool | setText (const QString &) |
| bool | clear () |
| bool | insertText (uint line, uint col, const QString &s) |
| bool | insertText (uint line, uint col, const QString &s, bool blockwise) |
| bool | removeText (uint startLine, uint startCol, uint endLine, uint endCol) |
| bool | removeText (uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) |
| bool | insertLine (uint line, const QString &s) |
| bool | removeLine (uint line) |
| uint | numLines () const |
| uint | numVisLines () const |
| uint | length () const |
| int | lineLength (uint line) const |
| void | undo () |
| void | redo () |
| void | clearUndo () |
| void | clearRedo () |
| uint | undoCount () const |
| uint | redoCount () const |
| uint | undoSteps () const |
| void | setUndoSteps (uint steps) |
| KTextEditor::Cursor * | createCursor () |
| QPtrList< KTextEditor::Cursor > | cursors () const |
| bool | searchText (unsigned int startLine, unsigned int startCol, const QString &text, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool casesensitive=true, bool backwards=false) |
| bool | searchText (unsigned int startLine, unsigned int startCol, const QRegExp ®exp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards=false) |
| uint | hlMode () |
| bool | setHlMode (uint mode) |
| uint | hlModeCount () |
| QString | hlModeName (uint mode) |
| QString | hlModeSectionName (uint mode) |
| void | readConfig () |
| void | writeConfig () |
| void | readConfig (KConfig *) |
| void | writeConfig (KConfig *) |
| void | readSessionConfig (KConfig *) |
| void | writeSessionConfig (KConfig *) |
| void | configDialog () |
| uint | mark (uint line) |
| void | setMark (uint line, uint markType) |
| void | clearMark (uint line) |
| void | addMark (uint line, uint markType) |
| void | removeMark (uint line, uint markType) |
| QPtrList< KTextEditor::Mark > | marks () |
| void | clearMarks () |
| void | setPixmap (MarkInterface::MarkTypes, const QPixmap &) |
| void | setDescription (MarkInterface::MarkTypes, const QString &) |
| QString | markDescription (MarkInterface::MarkTypes) |
| QPixmap * | markPixmap (MarkInterface::MarkTypes) |
| QColor | markColor (MarkInterface::MarkTypes) |
| void | setMarksUserChangable (uint markMask) |
| uint | editableMarks () |
| bool | printDialog () |
| bool | print () |
| void | tagLines (int start, int end) |
| void | tagLines (KateTextCursor start, KateTextCursor end) |
| void | exportAs (const QString &) |
| void | slotModifiedOnDisk (Kate::View *v=0) |
| void | reloadFile () |
| void | setEncoding (const QString &e) |
| QString | encoding () const |
| void | setWordWrap (bool on) |
| bool | wordWrap () |
| void | setWordWrapAt (uint col) |
| uint | wordWrapAt () |
| void | setPageUpDownMovesCursor (bool on) |
| bool | pageUpDownMovesCursor () |
| void | flush () |
| void | applyWordWrap () |
| void | slotQueryClose_save (bool *handled, bool *abortClosing) |
| bool | setSelection (uint startLine, uint startCol, uint endLine, uint endCol) |
| bool | clearSelection () |
| bool | hasSelection () const |
| QString | selection () const |
| bool | removeSelectedText () |
| bool | selectAll () |
| int | selStartLine () |
| int | selStartCol () |
| int | selEndLine () |
| int | selEndCol () |
| bool | blockSelectionMode () |
| bool | setBlockSelectionMode (bool on) |
| bool | toggleBlockSelectionMode () |
Signals | |
| void | textChanged () |
| void | charactersInteractivelyInserted (int, int, const QString &) |
| void | charactersSemiInteractivelyInserted (int, int, const QString &) |
| void | backspacePressed () |
| void | editTextInserted (uint line, uint col, uint len) |
| void | editTextRemoved (uint line, uint col, uint len) |
| void | editLineWrapped (uint line, uint col, uint len) |
| void | editLineUnWrapped (uint line, uint col) |
| void | editLineInserted (uint line) |
| void | editLineRemoved (uint line) |
| void | undoChanged () |
| void | textInserted (int line, int column) |
| void | hlChanged () |
| void | marksChanged () |
| void | markChanged (KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction) |
| void | variableChanged (const QString &, const QString &) |
| void | modifiedChanged () |
| void | preHighlightChanged (uint) |
| void | modStateChanged (Kate::Document *doc) |
| void | nameChanged (Kate::Document *doc) |
| void | fileNameChanged () |
| void | codeFoldingUpdated () |
| void | aboutToRemoveText (const KateTextRange &) |
| void | textRemoved () |
| void | selectionChanged () |
DCOP Member Functions | |
| uint | documentNumber () const |
Public Member Functions | |
| KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false, QWidget *parentWidget=0, const char *widgetName=0, QObject *=0, const char *=0) | |
| ~KateDocument () | |
| bool | closeURL () |
| void | unloadAllPlugins () |
| void | enableAllPluginsGUI (KateView *view) |
| void | disableAllPluginsGUI (KateView *view) |
| void | loadPlugin (uint pluginIndex) |
| void | unloadPlugin (uint pluginIndex) |
| void | enablePluginGUI (KTextEditor::Plugin *plugin, KateView *view) |
| void | enablePluginGUI (KTextEditor::Plugin *plugin) |
| void | disablePluginGUI (KTextEditor::Plugin *plugin, KateView *view) |
| void | disablePluginGUI (KTextEditor::Plugin *plugin) |
| bool | readOnly () const |
| bool | browserView () const |
| bool | singleViewMode () const |
| KateBrowserExtension * | browserExtension () |
| KTextEditor::View * | createView (QWidget *parent, const char *name) |
| QPtrList< KTextEditor::View > | views () const |
| KateView * | activeView () const |
| void | editStart (bool withUndo=true) |
| void | editBegin () |
| void | editEnd () |
| bool | editInsertText (uint line, uint col, const QString &s) |
| bool | editRemoveText (uint line, uint col, uint len) |
| bool | editMarkLineAutoWrapped (uint line, bool autowrapped) |
| bool | editWrapLine (uint line, uint col, bool newLine=true, bool *newLineAdded=0) |
| bool | editUnWrapLine (uint line, bool removeLine=true, uint length=0) |
| bool | editInsertLine (uint line, const QString &s) |
| bool | editRemoveLine (uint line) |
| bool | wrapText (uint startLine, uint endLine) |
| void | bufferHlChanged () |
| KateArbitraryHighlight * | arbitraryHL () const |
| QString | mimeType () |
| long | fileSize () |
| QString | niceFileSize () |
| KMimeType::Ptr | mimeTypeForContent () |
| QString | variable (const QString &name) const |
| bool | openURL (const KURL &url) |
| bool | save () |
| bool | saveAs (const KURL &url) |
| bool | openFile (KIO::Job *job) |
| bool | openFile () |
| bool | saveFile () |
| void | setReadWrite (bool readwrite=true) |
| void | setModified (bool m) |
| Kate::ConfigPage * | colorConfigPage (QWidget *) |
| Kate::ConfigPage * | fontConfigPage (QWidget *) |
| Kate::ConfigPage * | indentConfigPage (QWidget *) |
| Kate::ConfigPage * | selectConfigPage (QWidget *) |
| Kate::ConfigPage * | editConfigPage (QWidget *) |
| Kate::ConfigPage * | keysConfigPage (QWidget *) |
| Kate::ConfigPage * | hlConfigPage (QWidget *) |
| Kate::ConfigPage * | viewDefaultsConfigPage (QWidget *) |
| Kate::ConfigPage * | saveConfigPage (QWidget *) |
| Kate::ActionMenu * | hlActionMenu (const QString &, QObject *=0, const char *=0) |
| Kate::ActionMenu * | exportActionMenu (const QString &, QObject *=0, const char *=0) |
| bool | typeChars (KateView *type, const QString &chars) |
| uint | lastLine () const |
| uint | configFlags () |
| void | setConfigFlags (uint flags) |
| void | repaintViews (bool paintOnlyDirty=true) |
| KateHighlighting * | highlight () |
| KateHighlighting * | highlight () const |
| void | addView (KTextEditor::View *) |
| void | removeView (KTextEditor::View *) |
| void | addSuperCursor (class KateSuperCursor *, bool privateC) |
| void | removeSuperCursor (class KateSuperCursor *, bool privateC) |
| bool | ownedView (KateView *) |
| bool | isLastView (int numViews) |
| uint | currentColumn (const KateTextCursor &) |
| void | newLine (KateTextCursor &, KateViewInternal *) |
| void | backspace (KateView *view, const KateTextCursor &) |
| void | del (KateView *view, const KateTextCursor &) |
| void | transpose (const KateTextCursor &) |
| void | paste (KateView *view) |
| void | insertIndentChars (KateView *view) |
| void | indent (KateView *view, uint line, int change) |
| void | comment (KateView *view, uint line, uint column, int change) |
| void | align (KateView *view, uint line) |
| void | transform (KateView *view, const KateTextCursor &, TextTransform) |
| void | joinLines (uint first, uint last) |
| QString | getWord (const KateTextCursor &cursor) |
| void | tagAll () |
| void | newBracketMark (const KateTextCursor &start, KateBracketRange &bm, int maxLines=-1) |
| bool | findMatchingBracket (KateTextCursor &start, KateTextCursor &end, int maxLines=-1) |
| QString | docName () |
| void | setDocName (QString docName) |
| void | lineInfo (KateLineInfo *info, unsigned int line) |
| KateCodeFoldingTree * | foldingTree () |
| bool | isModifiedOnDisc () |
| void | isModOnHD (bool=false) |
| void | setModifiedOnDisk (int reason) |
| uint | getRealLine (unsigned int virtualLine) |
| uint | getVirtualLine (unsigned int realLine) |
| uint | visibleLines () |
| KateTextLine::Ptr | kateTextLine (uint i) |
| KateTextLine::Ptr | plainKateTextLine (uint i) |
| void | updateFileType (int newType, bool user=false) |
| int | fileType () const |
| void | makeAttribs (bool needInvalidate=true) |
| void | setEncodingSticky (bool e) |
| KateDocumentConfig * | config () |
| void | updateConfig () |
| bool | setTabInterceptor (KateKeyInterceptorFunctor *interceptor) |
| bool | removeTabInterceptor (KateKeyInterceptorFunctor *interceptor) |
| bool | invokeTabInterceptor (KKey) |
Static Public Member Functions | |
| static bool | checkOverwrite (KURL u) |
| static void | setDefaultEncoding (const QString &encoding) |
Protected Slots | |
| void | testTemplateCode () |
| void | dumpRegionTree () |
Protected Member Functions | |
| virtual bool | insertTemplateTextImplementation (uint line, uint column, const QString &templateString, const QMap< QString, QString > &initialValues, QWidget *parentWindow=0) |
Protected Attributes | |
| KateKeyInterceptorFunctor * | m_tabInterceptor |
Friends | |
| class | KateViewInternal |
| class | KateRenderer |
| class | KateTemplateHandler |
Member Function Documentation
| Kate::ConfigPage* KateDocument::colorConfigPage | ( | QWidget * | ) | [inline, virtual] |
| KateDocumentConfig* KateDocument::config | ( | ) | [inline] |
| QString KateDocument::docName | ( | ) | [inline, virtual] |
Returns the document name.
Reimplemented from Kate::Document.
Definition at line 757 of file katedocument.h.
| void KateDocument::editBegin | ( | ) | [inline] |
| Kate::ConfigPage* KateDocument::editConfigPage | ( | QWidget * | ) | [inline, virtual] |
| void KateDocument::editEnd | ( | ) |
| bool KateDocument::editInsertLine | ( | uint | line, | |
| const QString & | s | |||
| ) |
Insert a string at the given line.
- Parameters:
-
line line number s string to insert
- Returns:
- true on success
Definition at line 1395 of file katedocument.cpp.
| bool KateDocument::editInsertText | ( | uint | line, | |
| uint | col, | |||
| const QString & | s | |||
| ) |
Add a string in the given line/column.
- Parameters:
-
line line number col column s string to be inserted
- Returns:
- true on success
Definition at line 1159 of file katedocument.cpp.
| void KateDocument::editLineInserted | ( | uint | line | ) | [signal] |
Emitted whenever a line is inserted before line, becoming itself line @ line.
| void KateDocument::editLineRemoved | ( | uint | line | ) | [signal] |
Emitted when a line is deleted.
| void KateDocument::editLineUnWrapped | ( | uint | line, | |
| uint | col | |||
| ) | [signal] |
Emitted each time text from nextLine was upwrapped onto line.
| void KateDocument::editLineWrapped | ( | uint | line, | |
| uint | col, | |||
| uint | len | |||
| ) | [signal] |
Emmitted when text from line was wrapped at position pos onto line nextLine.
| bool KateDocument::editMarkLineAutoWrapped | ( | uint | 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:
-
line line number autowrapped autowrapped?
- Returns:
- true on success
Definition at line 1227 of file katedocument.cpp.
| bool KateDocument::editRemoveLine | ( | uint | line | ) |
Remove a line.
- Parameters:
-
line line number
- Returns:
- true on success
Definition at line 1441 of file katedocument.cpp.
| bool KateDocument::editRemoveText | ( | uint | line, | |
| uint | col, | |||
| uint | len | |||
| ) |
Remove a string in the given line/column.
- Parameters:
-
line line number col column len length of text to be removed
- Returns:
- true on success
Definition at line 1200 of file katedocument.cpp.
| void KateDocument::editStart | ( | bool | withUndo = true |
) |
Enclose editor actions with editStart() and editEnd() to group them.
- Parameters:
-
withUndo if true, add undo history
Definition at line 907 of file katedocument.cpp.
| void KateDocument::editTextInserted | ( | uint | line, | |
| uint | col, | |||
| uint | len | |||
| ) | [signal] |
Emitted each time text is inserted into a pre-existing line, including appends.
Does not include newly inserted lines at the moment. ### needed?
| void KateDocument::editTextRemoved | ( | uint | line, | |
| uint | col, | |||
| uint | len | |||
| ) | [signal] |
Emitted each time text is removed from a line, including truncates and space removal.
| bool KateDocument::editUnWrapLine | ( | uint | line, | |
| bool | removeLine = true, |
|||
| uint | 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:
-
line line number removeLine if true, force to remove the next line length length of the line
