• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Kate

KateDocument Class Reference

#include <katedocument.h>

Inheritance diagram for KateDocument:

Inheritance graph
[legend]

List of all members.


Public Types

enum  TextTransform { Uppercase, Lowercase, Capitalize }

Public Slots

void addMark (uint line, uint markType)
void applyWordWrap ()
bool blockSelectionMode ()
bool clear ()
void clearMark (uint line)
void clearMarks ()
void clearRedo ()
bool clearSelection ()
void clearUndo ()
void configDialog ()
KTextEditor::ConfigPage * configPage (uint number=0, QWidget *parent=0, const char *name=0)
QString configPageFullName (uint number=0) const
QString configPageName (uint number=0) const
QPixmap configPagePixmap (uint number=0, int size=KIcon::SizeSmall) const
uint configPages () const
KTextEditor::Cursor * createCursor ()
QPtrList< KTextEditor::Cursor > cursors () const
uint editableMarks ()
QString encoding () const
void exportAs (const QString &)
void flush ()
bool hasSelection () const
uint hlMode ()
uint hlModeCount ()
QString hlModeName (uint mode)
QString hlModeSectionName (uint mode)
bool insertLine (uint line, const QString &s)
bool insertText (uint line, uint col, const QString &s, bool blockwise)
bool insertText (uint line, uint col, const QString &s)
uint length () const
int lineLength (uint line) const
uint mark (uint line)
QColor markColor (MarkInterface::MarkTypes)
QString markDescription (MarkInterface::MarkTypes)
QPixmap * markPixmap (MarkInterface::MarkTypes)
QPtrList< KTextEditor::Mark > marks ()
uint numLines () const
uint numVisLines () const
bool pageUpDownMovesCursor ()
bool print ()
bool printDialog ()
void readConfig (KConfig *)
void readConfig ()
void readSessionConfig (KConfig *)
void redo ()
uint redoCount () const
void reloadFile ()
bool removeLine (uint line)
void removeMark (uint line, uint markType)
bool removeSelectedText ()
bool removeText (uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise)
bool removeText (uint startLine, uint startCol, uint endLine, uint endCol)
bool searchText (unsigned int startLine, unsigned int startCol, const QRegExp &regexp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards=false)
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 selectAll ()
QString selection () const
int selEndCol ()
int selEndLine ()
int selStartCol ()
int selStartLine ()
bool setBlockSelectionMode (bool on)
void setDescription (MarkInterface::MarkTypes, const QString &)
void setEncoding (const QString &e)
bool setHlMode (uint mode)
void setMark (uint line, uint markType)
void setMarksUserChangable (uint markMask)
void setPageUpDownMovesCursor (bool on)
void setPixmap (MarkInterface::MarkTypes, const QPixmap &)
bool setSelection (uint startLine, uint startCol, uint endLine, uint endCol)
bool setText (const QString &)
void setUndoSteps (uint steps)
void setWordWrap (bool on)
void setWordWrapAt (uint col)
void slotModifiedOnDisk (Kate::View *v=0)
void slotQueryClose_save (bool *handled, bool *abortClosing)
void tagLines (KateTextCursor start, KateTextCursor end)
void tagLines (int start, int end)
QString text (uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise) const
QString text (uint startLine, uint startCol, uint endLine, uint endCol) const
QString text () const
QString textLine (uint line) const
bool toggleBlockSelectionMode ()
void undo ()
uint undoCount () const
uint undoSteps () const
bool wordWrap ()
uint wordWrapAt ()
void writeConfig (KConfig *)
void writeConfig ()
void writeSessionConfig (KConfig *)

Signals

void aboutToRemoveText (const KateTextRange &)
void backspacePressed ()
void charactersInteractivelyInserted (int, int, const QString &)
void charactersSemiInteractivelyInserted (int, int, const QString &)
void codeFoldingUpdated ()
void editLineInserted (uint line)
void editLineRemoved (uint line)
void editLineUnWrapped (uint line, uint col)
void editLineWrapped (uint line, uint col, uint len)
void editTextInserted (uint line, uint col, uint len)
void editTextRemoved (uint line, uint col, uint len)
void fileNameChanged ()
void hlChanged ()
void markChanged (KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)
void marksChanged ()
void modifiedChanged ()
void modStateChanged (Kate::Document *doc)
void nameChanged (Kate::Document *doc)
void preHighlightChanged (uint)
void selectionChanged ()
void textChanged ()
void textInserted (int line, int column)
void textRemoved ()
void undoChanged ()
void variableChanged (const QString &, const QString &)

Public Member Functions

KateView * activeView () const
void addSuperCursor (class KateSuperCursor *, bool privateC)
void addView (KTextEditor::View *)
void align (KateView *view, uint line)
KateArbitraryHighlight * arbitraryHL () const
void backspace (KateView *view, const KateTextCursor &)
KateBrowserExtension * browserExtension ()
bool browserView () const
void bufferHlChanged ()
bool closeURL ()
Kate::ConfigPage * colorConfigPage (QWidget *)
void comment (KateView *view, uint line, uint column, int change)
KateDocumentConfig * config ()
uint configFlags ()
KTextEditor::View * createView (QWidget *parent, const char *name)
uint currentColumn (const KateTextCursor &)
void del (KateView *view, const KateTextCursor &)
void disableAllPluginsGUI (KateView *view)
void disablePluginGUI (KTextEditor::Plugin *plugin)
void disablePluginGUI (KTextEditor::Plugin *plugin, KateView *view)
QString docName ()
void editBegin ()
Kate::ConfigPage * editConfigPage (QWidget *)
void editEnd ()
bool editInsertLine (uint line, const QString &s)
bool editInsertText (uint line, uint col, const QString &s)
bool editMarkLineAutoWrapped (uint line, bool autowrapped)
bool editRemoveLine (uint line)
bool editRemoveText (uint line, uint col, uint len)
void editStart (bool withUndo=true)
bool editUnWrapLine (uint line, bool removeLine=true, uint length=0)
bool editWrapLine (uint line, uint col, bool newLine=true, bool *newLineAdded=0)
void enableAllPluginsGUI (KateView *view)
void enablePluginGUI (KTextEditor::Plugin *plugin)
void enablePluginGUI (KTextEditor::Plugin *plugin, KateView *view)
Kate::ActionMenu * exportActionMenu (const QString &, QObject *=0, const char *=0)
long fileSize ()
int fileType () const
bool findMatchingBracket (KateTextCursor &start, KateTextCursor &end, int maxLines=-1)
KateCodeFoldingTree * foldingTree ()
Kate::ConfigPage * fontConfigPage (QWidget *)
uint getRealLine (unsigned int virtualLine)
uint getVirtualLine (unsigned int realLine)
QString getWord (const KateTextCursor &cursor)
KateHighlighting * highlight () const
KateHighlighting * highlight ()
Kate::ActionMenu * hlActionMenu (const QString &, QObject *=0, const char *=0)
Kate::ConfigPage * hlConfigPage (QWidget *)
void indent (KateView *view, uint line, int change)
Kate::ConfigPage * indentConfigPage (QWidget *)
void insertIndentChars (KateView *view)
bool invokeTabInterceptor (KKey)
bool isLastView (int numViews)
bool isModifiedOnDisc ()
void isModOnHD (bool=false)
void joinLines (uint first, uint last)
 KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false, QWidget *parentWidget=0, const char *widgetName=0, QObject *=0, const char *=0)
KateTextLine::Ptr kateTextLine (uint i)
Kate::ConfigPage * keysConfigPage (QWidget *)
uint lastLine () const
void lineInfo (KateLineInfo *info, unsigned int line)
void loadPlugin (uint pluginIndex)
void makeAttribs (bool needInvalidate=true)
QString mimeType ()
KMimeType::Ptr mimeTypeForContent ()
void newBracketMark (const KateTextCursor &start, KateBracketRange &bm, int maxLines=-1)
void newLine (KateTextCursor &, KateViewInternal *)
QString niceFileSize ()
bool openFile ()
bool openFile (KIO::Job *job)
bool openURL (const KURL &url)
bool ownedView (KateView *)
void paste (KateView *view)
KateTextLine::Ptr plainKateTextLine (uint i)
bool readOnly () const
void removeSuperCursor (class KateSuperCursor *, bool privateC)
bool removeTabInterceptor (KateKeyInterceptorFunctor *interceptor)
void removeView (KTextEditor::View *)
void repaintViews (bool paintOnlyDirty=true)
bool save ()
bool saveAs (const KURL &url)
Kate::ConfigPage * saveConfigPage (QWidget *)
bool saveFile ()
Kate::ConfigPage * selectConfigPage (QWidget *)
void setConfigFlags (uint flags)
void setDocName (QString docName)
void setEncodingSticky (bool e)
void setModified (bool m)
void setModifiedOnDisk (int reason)
void setReadWrite (bool readwrite=true)
bool setTabInterceptor (KateKeyInterceptorFunctor *interceptor)
bool singleViewMode () const
void tagAll ()
void transform (KateView *view, const KateTextCursor &, TextTransform)
void transpose (const KateTextCursor &)
bool typeChars (KateView *type, const QString &chars)
void unloadAllPlugins ()
void unloadPlugin (uint pluginIndex)
void updateConfig ()
void updateFileType (int newType, bool user=false)
QString variable (const QString &name) const
Kate::ConfigPage * viewDefaultsConfigPage (QWidget *)
QPtrList< KTextEditor::View > views () const
uint visibleLines ()
bool wrapText (uint startLine, uint endLine)
 ~KateDocument ()

Static Public Member Functions

static bool checkOverwrite (KURL u)
static void setDefaultEncoding (const QString &encoding)

Protected Slots

void dumpRegionTree ()
void testTemplateCode ()

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

Detailed Description

Definition at line 77 of file katedocument.h.


Member Enumeration Documentation

enum KateDocument::TextTransform

Enumerator:
Uppercase 
Lowercase 
Capitalize 

Definition at line 657 of file katedocument.h.


Constructor & Destructor Documentation

KateDocument::KateDocument ( bool  bSingleViewMode = false,
bool  bBrowserView = false,
bool  bReadOnly = false,
QWidget *  parentWidget = 0,
const char *  widgetName = 0,
QObject *  parent = 0,
const char *  name = 0 
)

Definition at line 93 of file katedocument.cpp.

KateDocument::~KateDocument (  ) 

Definition at line 238 of file katedocument.cpp.


Member Function Documentation

void KateDocument::aboutToRemoveText ( const KateTextRange &   )  [signal]

KateView* KateDocument::activeView (  )  const [inline]

Definition at line 140 of file katedocument.h.

void KateDocument::addMark ( uint  line,
uint  markType 
) [slot]

Definition at line 2056 of file katedocument.cpp.

void KateDocument::addSuperCursor ( class KateSuperCursor *  cursor,
bool  privateC 
)

Definition at line 2914 of file katedocument.cpp.

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

Definition at line 2885 of file katedocument.cpp.

void KateDocument::align ( KateView *  view,
uint  line 
)

Definition at line 3341 of file katedocument.cpp.

void KateDocument::applyWordWrap (  )  [virtual, slot]

Implements Kate::Document.

Definition at line 4489 of file katedocument.cpp.

KateArbitraryHighlight* KateDocument::arbitraryHL (  )  const [inline]

Definition at line 431 of file katedocument.h.

void KateDocument::backspace ( KateView *  view,
const KateTextCursor &  c 
)

Definition at line 3124 of file katedocument.cpp.

void KateDocument::backspacePressed (  )  [signal]

bool KateDocument::blockSelectionMode (  )  [slot]

Definition at line 5162 of file katedocument.cpp.

KateBrowserExtension* KateDocument::browserExtension (  )  [inline]

Definition at line 124 of file katedocument.h.

bool KateDocument::browserView (  )  const [inline]

Definition at line 122 of file katedocument.h.

void KateDocument::bufferHlChanged (  ) 

Definition at line 1852 of file katedocument.cpp.

void KateDocument::charactersInteractivelyInserted ( int  ,
int  ,
const QString &   
) [signal]

void KateDocument::charactersSemiInteractivelyInserted ( int  ,
int  ,
const QString &   
) [signal]

bool KateDocument::checkOverwrite ( KURL  u  )  [static]

Definition at line 5081 of file katedocument.cpp.

bool KateDocument::clear (  )  [slot]

Definition at line 662 of file katedocument.cpp.

void KateDocument::clearMark ( uint  line  )  [slot]

Definition at line 2040 of file katedocument.cpp.

void KateDocument::clearMarks (  )  [slot]

Definition at line 2137 of file katedocument.cpp.

void KateDocument::clearRedo (  )  [slot]

Definition at line 1633 of file katedocument.cpp.

bool KateDocument::clearSelection (  )  [slot]

Definition at line 5135 of file katedocument.cpp.

void KateDocument::clearUndo (  )  [slot]

Definition at line 1621 of file katedocument.cpp.

bool KateDocument::closeURL (  ) 

Definition at line 2742 of file katedocument.cpp.

void KateDocument::codeFoldingUpdated (  )  [signal]

Kate::ConfigPage* KateDocument::colorConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:
Deprecated:

Implements Kate::Document.

Definition at line 583 of file katedocument.h.

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

Definition at line 3822 of file katedocument.cpp.

KateDocumentConfig* KateDocument::config (  )  [inline]

Configuration.

Definition at line 949 of file katedocument.h.

void KateDocument::configDialog (  )  [slot]

Definition at line 1981 of file katedocument.cpp.

uint KateDocument::configFlags (  )  [virtual]

Implements Kate::Document.

Definition at line 4129 of file katedocument.cpp.

KTextEditor::ConfigPage * KateDocument::configPage ( uint  number = 0,
QWidget *  parent = 0,
const char *  name = 0 
) [slot]

Definition at line 385 of file katedocument.cpp.

QString KateDocument::configPageFullName ( uint  number = 0  )  const [slot]

Definition at line 467 of file katedocument.cpp.

QString KateDocument::configPageName ( uint  number = 0  )  const [slot]

Definition at line 426 of file katedocument.cpp.

QPixmap KateDocument::configPagePixmap ( uint  number = 0,
int  size = KIcon::SizeSmall 
) const [slot]

Definition at line 508 of file katedocument.cpp.

uint KateDocument::configPages (  )  const [slot]

Definition at line 380 of file katedocument.cpp.

KTextEditor::Cursor * KateDocument::createCursor (  )  [slot]

Definition at line 4512 of file katedocument.cpp.

KTextEditor::View * KateDocument::createView ( QWidget *  parent,
const char *  name 
)

Definition at line 356 of file katedocument.cpp.

uint KateDocument::currentColumn ( const KateTextCursor &  cursor  ) 

Definition at line 2943 of file katedocument.cpp.

QPtrList< KTextEditor::Cursor > KateDocument::cursors (  )  const [slot]

Definition at line 1645 of file katedocument.cpp.

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

Definition at line 3210 of file katedocument.cpp.

void KateDocument::disableAllPluginsGUI ( KateView *  view  ) 

Definition at line 280 of file katedocument.cpp.

void KateDocument::disablePluginGUI ( KTextEditor::Plugin *  plugin  ) 

Definition at line 344 of file katedocument.cpp.

void KateDocument::disablePluginGUI ( KTextEditor::Plugin *  plugin,
KateView *  view 
)

Definition at line 329 of file katedocument.cpp.

QString KateDocument::docName (  )  [inline, virtual]

Returns the document name.

Reimplemented from Kate::Document.

Definition at line 759 of file katedocument.h.

uint KateDocument::documentNumber (  )  const

Definition at line 5049 of file katedocument.cpp.

void KateDocument::dumpRegionTree (  )  [protected, slot]

Definition at line 4504 of file katedocument.cpp.

uint KateDocument::editableMarks (  )  [slot]

Definition at line 2189 of file katedocument.cpp.

void KateDocument::editBegin (  )  [inline]

Same as editStart() with undo.

Definition at line 211 of file katedocument.h.

Kate::ConfigPage* KateDocument::editConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 587 of file katedocument.h.

void KateDocument::editEnd (  ) 

End a editor operation.

See also:
editStart()

Definition at line 1008 of file katedocument.cpp.

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 1398 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 1162 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 1230 of file katedocument.cpp.

bool KateDocument::editRemoveLine ( uint  line  ) 

Remove a line.

Parameters:
line line number
Returns:
true on success

Definition at line 1444 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 1203 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 910 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
Returns:
true on success

Definition at line 1329 of file katedocument.cpp.

bool KateDocument::editWrapLine ( uint  line,
uint  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:
line line number
col column
newLine if true, force a new line
newLineAdded return value is true, if new line was added (may be 0)
Returns:
true on success

Definition at line 1253 of file katedocument.cpp.

void KateDocument::enableAllPluginsGUI ( KateView *  view  ) 

Definition at line 274 of file katedocument.cpp.

void KateDocument::enablePluginGUI ( KTextEditor::Plugin *  plugin  ) 

Definition at line 320 of file katedocument.cpp.

void KateDocument::enablePluginGUI ( KTextEditor::Plugin *  plugin,
KateView *  view 
)

Definition at line 305 of file katedocument.cpp.

QString KateDocument::encoding (  )  const [virtual, slot]

Implements Kate::Document.

Definition at line 4549 of file katedocument.cpp.

Kate::ActionMenu* KateDocument::exportActionMenu ( const QString &  ,
QObject *  = 0,
const char *  = 0 
) [inline, virtual]

Implements Kate::Document.

Definition at line 594 of file katedocument.h.

void KateDocument::exportAs ( const QString &   )  [inline, virtual, slot]

Implements Kate::Document.

Definition at line 623 of file katedocument.h.

void KateDocument::fileNameChanged (  )  [signal]

The file has been saved (perhaps the name has changed).

The main window can use this to change its caption

long KateDocument::fileSize (  ) 

Returns:
the calculated size in bytes that the document would have when saved to disk.
Since:
Kate 2.3
Todo:
implement this (it returns 0 right now)

Definition at line 2223 of file katedocument.cpp.

int KateDocument::fileType (  )  const [inline]

Definition at line 900 of file katedocument.h.

bool KateDocument::findMatchingBracket ( KateTextCursor &  start,
KateTextCursor &  end,
int  maxLines = -1 
)

Definition at line 4170 of file katedocument.cpp.

void KateDocument::flush (  )  [virtual, slot]

Reimplemented from Kate::Document.

Definition at line 4464 of file katedocument.cpp.

KateCodeFoldingTree * KateDocument::foldingTree (  ) 

Definition at line 4530 of file katedocument.cpp.

Kate::ConfigPage* KateDocument::fontConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 584 of file katedocument.h.

uint KateDocument::getRealLine ( unsigned int  virtualLine  )  [inline]

Definition at line 833 of file katedocument.h.

uint KateDocument::getVirtualLine ( unsigned int  realLine  )  [inline]

Definition at line 838 of file katedocument.h.

QString KateDocument::getWord ( const KateTextCursor &  cursor  ) 

Definition at line 4080 of file katedocument.cpp.

bool KateDocument::hasSelection (  )  const [slot]

Definition at line 5138 of file katedocument.cpp.

KateHighlighting* KateDocument::highlight (  )  const [inline]

Definition at line 615 of file katedocument.h.

KateHighlighting* KateDocument::highlight (  )  [inline]

Definition at line 613 of file katedocument.h.

Kate::ActionMenu* KateDocument::hlActionMenu ( const QString &  ,
QObject *  = 0,
const char *  = 0 
) [inline, virtual]

Implements Kate::Document.

Definition at line 593 of file katedocument.h.

void KateDocument::hlChanged (  )  [signal]

Kate::ConfigPage* KateDocument::hlConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 589 of file katedocument.h.

uint KateDocument::hlMode (  )  [slot]

Definition at line 1834 of file katedocument.cpp.

uint KateDocument::hlModeCount (  )  [slot]

Definition at line 1860 of file katedocument.cpp.

QString KateDocument::hlModeName ( uint  mode  )  [slot]

Definition at line 1865 of file katedocument.cpp.

QString KateDocument::hlModeSectionName ( uint  mode  )  [slot]

Definition at line 1870 of file katedocument.cpp.

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

Definition at line 3291 of file katedocument.cpp.

Kate::ConfigPage* KateDocument::indentConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 585 of file katedocument.h.

void KateDocument::insertIndentChars ( KateView *  view  ) 

Definition at line 3273 of file katedocument.cpp.

bool KateDocument::insertLine ( uint  line,
const QString &  s 
) [slot]

Definition at line 848 of file katedocument.cpp.

bool KateDocument::insertTemplateTextImplementation ( uint  line,
uint  column,
const QString &  templateString,
const QMap< QString, QString > &  initialValues,
QWidget *  parentWindow = 0 
) [protected, virtual]

Definition at line 5103 of file katedocument.cpp.

bool KateDocument::insertText ( uint  line,
uint  col,
const QString &  s,
bool  blockwise 
) [slot]

Definition at line 683 of file katedocument.cpp.

bool KateDocument::insertText ( uint  line,
uint  col,
const QString &  s 
) [slot]

Definition at line 678 of file katedocument.cpp.

bool KateDocument::invokeTabInterceptor ( KKey  key  ) 

Definition at line 5113 of file katedocument.cpp.

bool KateDocument::isLastView ( int  numViews  ) 

Definition at line 2939 of file katedocument.cpp.

bool KateDocument::isModifiedOnDisc (  )  [inline]

Returns:
wheather the document is modified on disc since last saved.
Since:
3.3

Definition at line 773 of file katedocument.h.

void KateDocument::isModOnHD ( bool  = false  )  [inline, virtual]

Deprecated:

Reimplemented from Kate::Document.

Definition at line 776 of file katedocument.h.

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

Unwrap a range of lines.

Definition at line 4039 of file katedocument.cpp.

KateTextLine::Ptr KateDocument::kateTextLine ( uint  i  )  [inline]

Definition at line 848 of file katedocument.h.

Kate::ConfigPage* KateDocument::keysConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 588 of file katedocument.h.

uint KateDocument::lastLine (  )  const [inline]

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

Definition at line 605 of file katedocument.h.

uint KateDocument::length (  )  const [slot]

Definition at line 870 of file katedocument.cpp.

void KateDocument::lineInfo ( KateLineInfo *  info,
unsigned int  line 
)

Definition at line 4525 of file katedocument.cpp.

int KateDocument::lineLength ( uint  line  )  const [slot]

Definition at line 895 of file katedocument.cpp.

void KateDocument::loadPlugin ( uint  pluginIndex  ) 

Definition at line 286 of file katedocument.cpp.

void KateDocument::makeAttribs ( bool  needInvalidate = true  ) 

Definition at line 2868 of file katedocument.cpp.

uint KateDocument::mark ( uint  line  )  [slot]

Definition at line 2027 of file katedocument.cpp.

void KateDocument::markChanged ( KTextEditor::Mark  ,
KTextEditor::MarkInterfaceExtension::MarkChangeAction   
) [signal]

QColor KateDocument::markColor ( MarkInterface::MarkTypes  type  )  [slot]

Definition at line 2167 of file katedocument.cpp.

QString KateDocument::markDescription ( MarkInterface::MarkTypes  type  )  [slot]

Definition at line 2177 of file katedocument.cpp.

QPixmap * KateDocument::markPixmap ( MarkInterface::MarkTypes  type  )  [slot]

Definition at line 2162 of file katedocument.cpp.

QPtrList< KTextEditor::Mark > KateDocument::marks (  )  [slot]

Definition at line 2125 of file katedocument.cpp.

void KateDocument::marksChanged (  )  [signal]

QString KateDocument::mimeType (  ) 

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().

Since:
Kate 2.3

Definition at line 2208 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.

Since:
Kate 2.3

Definition at line 2234 of file katedocument.cpp.

void KateDocument::modifiedChanged (  )  [signal]

void KateDocument::modStateChanged ( Kate::Document *  doc  )  [signal]

void KateDocument::nameChanged ( Kate::Document *  doc  )  [signal]

void KateDocument::newBracketMark ( const KateTextCursor &  start,
KateBracketRange &  bm,
int  maxLines = -1 
)

Definition at line 4153 of file katedocument.cpp.

void KateDocument::newLine ( KateTextCursor &  c,
KateViewInternal *  v 
)

Definition at line 3041 of file katedocument.cpp.

QString KateDocument::niceFileSize (  ) 

Returns:
the calculated size the document would have when saved to disk as a human readable string.
Since:
Kate 2.3
Todo:
implement this (it returns "UNKNOWN")

Definition at line 2229 of file katedocument.cpp.

uint KateDocument::numLines (  )  const [slot]

Definition at line 885 of file katedocument.cpp.

uint KateDocument::numVisLines (  )  const [slot]

Definition at line 890 of file katedocument.cpp.

bool KateDocument::openFile (  ) 

Definition at line 2371 of file katedocument.cpp.

bool KateDocument::openFile ( KIO::Job *  job  ) 

Definition at line 2376 of file katedocument.cpp.

bool KateDocument::openURL ( const KURL &  url  ) 

Definition at line 2264 of file katedocument.cpp.

bool KateDocument::ownedView ( KateView *  view  ) 

Definition at line 2934 of file katedocument.cpp.

bool KateDocument::pageUpDownMovesCursor (  )  [slot]

Definition at line 4499 of file katedocument.cpp.

void KateDocument::paste ( KateView *  view  ) 

Definition at line 3227 of file katedocument.cpp.

KateTextLine::Ptr KateDocument::plainKateTextLine ( uint  i  )  [inline]

Definition at line 853 of file katedocument.h.

void KateDocument::preHighlightChanged ( uint   )  [signal]

bool KateDocument::print (  )  [slot]

Definition at line 2201 of file katedocument.cpp.

bool KateDocument::printDialog (  )  [slot]

Definition at line 2196 of file katedocument.cpp.

void KateDocument::readConfig ( KConfig *  config  )  [slot]

Definition at line 1882 of file katedocument.cpp.

void KateDocument::readConfig (  )  [slot]

Definition at line 1914 of file katedocument.cpp.

bool KateDocument::readOnly (  )  const [inline]

Definition at line 121 of file katedocument.h.

void KateDocument::readSessionConfig ( KConfig *  kconfig  )  [slot]

Definition at line 1927 of file katedocument.cpp.

void KateDocument::redo (  )  [slot]

Definition at line 1532 of file katedocument.cpp.

uint KateDocument::redoCount (  )  const [slot]

Definition at line 1500 of file katedocument.cpp.

void KateDocument::reloadFile (  )  [virtual, slot]

Reloads the current document from disc if possible.

Implements Kate::Document.

Definition at line 4394 of file katedocument.cpp.

bool KateDocument::removeLine ( uint  line  )  [slot]

Definition at line 859 of file katedocument.cpp.

void KateDocument::removeMark ( uint  line,
uint  markType 
) [slot]

Definition at line 2093 of file katedocument.cpp.

bool KateDocument::removeSelectedText (  )  [slot]

Definition at line 5144 of file katedocument.cpp.

void KateDocument::removeSuperCursor ( class KateSuperCursor *  cursor,
bool  privateC 
)

Definition at line 2924 of file katedocument.cpp.

bool KateDocument::removeTabInterceptor ( KateKeyInterceptorFunctor *  interceptor  ) 

Definition at line 5124 of file katedocument.cpp.

bool KateDocument::removeText ( uint  startLine,
uint  startCol,
uint  endLine,
uint  endCol,
bool  blockwise 
) [slot]

Definition at line 760 of file katedocument.cpp.

bool KateDocument::removeText ( uint  startLine,
uint  startCol,
uint  endLine,
uint  endCol 
) [slot]

Definition at line 755 of file katedocument.cpp.

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

Definition at line 2903 of file katedocument.cpp.

void KateDocument::repaintViews ( bool  paintOnlyDirty = true  ) 

Definition at line 4114 of file katedocument.cpp.

bool KateDocument::save (  ) 

Definition at line 2507 of file katedocument.cpp.

bool KateDocument::saveAs ( const KURL &  url  ) 

Definition at line 2650 of file katedocument.cpp.

Kate::ConfigPage* KateDocument::saveConfigPage ( QWidget *   )  [inline]

Definition at line 591 of file katedocument.h.

bool KateDocument::saveFile (  ) 

Definition at line 2547 of file katedocument.cpp.

bool KateDocument::searchText ( unsigned int  startLine,
unsigned int  startCol,
const QRegExp &  regexp,
unsigned int *  foundAtLine,
unsigned int *  foundAtCol,
unsigned int *  matchLen,
bool  backwards = false 
) [slot]

Definition at line 1735 of file katedocument.cpp.

bool KateDocument::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 
) [slot]

Definition at line 1653 of file katedocument.cpp.

bool KateDocument::selectAll (  )  [slot]

Definition at line 5147 of file katedocument.cpp.

Kate::ConfigPage* KateDocument::selectConfigPage ( QWidget *   )  [inline, virtual]

Deprecated:

Implements Kate::Document.

Definition at line 586 of file katedocument.h.

QString KateDocument::selection (  )  const [slot]

Definition at line 5141 of file katedocument.cpp.

void KateDocument::selectionChanged (  )  [signal]

int KateDocument::selEndCol (  )  [slot]

Definition at line 5159 of file katedocument.cpp.

int KateDocument::selEndLine (  )  [slot]

Definition at line 5156 of file katedocument.cpp.

int KateDocument::selStartCol (  )  [slot]

Definition at line 5153 of file katedocument.cpp.

int KateDocument::selStartLine (  )  [slot]

Definition at line 5150 of file katedocument.cpp.

bool KateDocument::setBlockSelectionMode ( bool  on  )  [slot]

Definition at line 5165 of file katedocument.cpp.

void KateDocument::setConfigFlags ( uint  flags  )  [virtual]

Implements Kate::Document.

Definition at line 4134 of file katedocument.cpp.

void KateDocument::setDefaultEncoding ( const QString &  encoding  )  [static]

Definition at line 5097 of file katedocument.cpp.

void KateDocument::setDescription ( MarkInterface::MarkTypes  type,
const QString &  description 
) [slot]

Definition at line 2157 of file katedocument.cpp.

void KateDocument::setDocName ( QString   )  [virtual]

Sets the document name.

deprecated for KDE 4.0, is done internally, calling it won't hurt but changes nothing beside triggers signal

Deprecated:

Reimplemented from Kate::Document.

Definition at line 4268 of file katedocument.cpp.

void KateDocument::setEncoding ( const QString &  e  )  [virtual, slot]

Implements Kate::Document.

Definition at line 4535 of file katedocument.cpp.

void KateDocument::setEncodingSticky ( bool  e  )  [inline]

Definition at line 943 of file katedocument.h.

bool KateDocument::setHlMode ( uint  mode  )  [slot]

Definition at line 1839 of file katedocument.cpp.

void KateDocument::setMark ( uint  line,
uint  markType 
) [slot]

Definition at line 2034 of file katedocument.cpp.

void KateDocument::setMarksUserChangable ( uint  markMask  )  [slot]

Definition at line 2184 of file katedocument.cpp.

void KateDocument::setModified ( bool  m  ) 

Definition at line 2835 of file katedocument.cpp.

void KateDocument::setModifiedOnDisk ( int  reason  )  [virtual]

For client apps that want to deal with files modified on disk, it is nessecary to reset this property.

reason is a ModifiedOnDiskReason.

Implements Kate::DocumentExt.

Definition at line 4380 of file katedocument.cpp.

void KateDocument::setPageUpDownMovesCursor ( bool  on  )  [slot]

Definition at line 4494 of file katedocument.cpp.

void KateDocument::setPixmap ( MarkInterface::MarkTypes  type,
const QPixmap &  pixmap 
) [slot]

Definition at line 2152 of file katedocument.cpp.

void KateDocument::setReadWrite ( bool  readwrite = true  ) 

Definition at line 2821 of file katedocument.cpp.

bool KateDocument::setSelection ( uint  startLine,
uint  startCol,
uint  endLine,
uint  endCol 
) [slot]

Definition at line 5132 of file katedocument.cpp.

bool KateDocument::setTabInterceptor ( KateKeyInterceptorFunctor *  interceptor  ) 

Definition at line 5118 of file katedocument.cpp.

bool KateDocument::setText ( const QString &  s  )  [slot]

Definition at line 635 of file katedocument.cpp.

void KateDocument::setUndoSteps ( uint  steps  )  [slot]

Definition at line 1510 of file katedocument.cpp.

void KateDocument::setWordWrap ( bool  on  )  [virtual, slot]

Implements Kate::Document.

Definition at line 4469 of file katedocument.cpp.

void KateDocument::setWordWrapAt ( uint  col  )  [slot]

Definition at line 4479 of file katedocument.cpp.

bool KateDocument::singleViewMode (  )  const [inline]

Definition at line 123 of file katedocument.h.

void KateDocument::slotModifiedOnDisk ( Kate::View *  v = 0  )  [virtual, slot]

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

Reimplemented from Kate::Document.

Since:
3.3

Implements Kate::DocumentExt.

Definition at line 4308 of file katedocument.cpp.

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

Definition at line 5057 of file katedocument.cpp.

void KateDocument::tagAll (  ) 

Definition at line 4120 of file katedocument.cpp.

void KateDocument::tagLines ( KateTextCursor  start,
KateTextCursor  end 
) [slot]

Definition at line 4101 of file katedocument.cpp.

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

Definition at line 4095 of file katedocument.cpp.

void KateDocument::testTemplateCode (  )  [protected, slot]

Definition at line 5107 of file katedocument.cpp.

QString KateDocument::text ( uint  startLine,
uint  startCol,
uint  endLine,
uint  endCol,
bool  blockwise 
) const [slot]

Definition at line 577 of file katedocument.cpp.

QString KateDocument::text ( uint  startLine,
uint  startCol,
uint  endLine,
uint  endCol 
) const [slot]

Definition at line 572 of file katedocument.cpp.

QString KateDocument::text (  )  const [slot]

Definition at line 552 of file katedocument.cpp.

void KateDocument::textChanged (  )  [signal]

void KateDocument::textInserted ( int  line,
int  column 
) [signal]

QString KateDocument::textLine ( uint  line  )  const [slot]

Definition at line 625 of file katedocument.cpp.

void KateDocument::textRemoved (  )  [signal]

bool KateDocument::toggleBlockSelectionMode (  )  [slot]

Definition at line 5168 of file katedocument.cpp.

void KateDocument::transform ( KateView *  view,
const KateTextCursor &  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 3936 of file katedocument.cpp.

void KateDocument::transpose ( const KateTextCursor &  cursor  ) 

Definition at line 3093 of file katedocument.cpp.

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

Type chars in a view.

Definition at line 2953 of file katedocument.cpp.

void KateDocument::undo (  )  [slot]

Definition at line 1515 of file katedocument.cpp.

void KateDocument::undoChanged (  )  [signal]

uint KateDocument::undoCount (  )  const [slot]

Definition at line 1495 of file katedocument.cpp.

uint KateDocument::undoSteps (  )  const [slot]

Definition at line 1505 of file katedocument.cpp.

void KateDocument::unloadAllPlugins (  ) 

Definition at line 268 of file katedocument.cpp.

void KateDocument::unloadPlugin ( uint  pluginIndex  ) 

Definition at line 295 of file katedocument.cpp.

void KateDocument::updateConfig (  ) 

Definition at line 4554 of file katedocument.cpp.

void KateDocument::updateFileType ( int  newType,
bool  user = false 
)

Definition at line 5016 of file katedocument.cpp.

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

Definition at line 4893 of file katedocument.cpp.

void KateDocument::variableChanged ( const QString &  ,
const QString &   
) [signal]

Kate::ConfigPage* KateDocument::viewDefaultsConfigPage ( QWidget *   )  [inline]

Definition at line 590 of file katedocument.h.

QPtrList< KTextEditor::View > KateDocument::views (  )  const

Definition at line 365 of file katedocument.cpp.

uint KateDocument::visibleLines (  )  [inline]

Definition at line 843 of file katedocument.h.

bool KateDocument::wordWrap (  )  [virtual, slot]

Implements Kate::Document.

Definition at line 4474 of file katedocument.cpp.

unsigned int KateDocument::wordWrapAt (  )  [virtual, slot]

Implements Kate::Document.

Definition at line 4484 of file katedocument.cpp.

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

Remove a line.

Parameters:
startLine line to begin wrapping
endLine line to stop wrapping
Returns:
true on success

Definition at line 1043 of file katedocument.cpp.

void KateDocument::writeConfig ( KConfig *  config  )  [slot]

Definition at line 1898 of file katedocument.cpp.

void KateDocument::writeConfig (  )  [slot]

Definition at line 1920 of file katedocument.cpp.

void KateDocument::writeSessionConfig ( KConfig *  kconfig  )  [slot]

Definition at line 1956 of file katedocument.cpp.


Member Data Documentation

KateKeyInterceptorFunctor* KateDocument::m_tabInterceptor [protected]

Definition at line 1018 of file katedocument.h.


The documentation for this class was generated from the following files:
  • katedocument.h
  • katedocument.cpp

Kate

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal