kate Library API Documentation

KateView Class Reference

Inheritance diagram for KateView:

Kate::View List of all members.

Public Slots

void cut ()
void copy () const
void paste ()
QPoint cursorCoordinates ()
void cursorPosition (uint *l, uint *c)
void cursorPositionReal (uint *l, uint *c)
bool setCursorPosition (uint line, uint col)
bool setCursorPositionReal (uint line, uint col)
uint cursorLine ()
uint cursorColumn ()
uint cursorColumnReal ()
void showArgHint (QStringList arg1, const QString &arg2, const QString &arg3)
void showCompletionBox (QValueList< KTextEditor::CompletionEntry > arg1, int offset=0, bool cs=true)
void flush ()
saveResult save ()
saveResult saveAs ()
void indent ()
void unIndent ()
void cleanIndent ()
void align ()
void comment ()
void uncomment ()
void killLine ()
void uppercase ()
void lowercase ()
void capitalize ()
void joinLines ()
void keyReturn ()
void backspace ()
void deleteWordLeft ()
void keyDelete ()
void deleteWordRight ()
void transpose ()
void cursorLeft ()
void shiftCursorLeft ()
void cursorRight ()
void shiftCursorRight ()
void wordLeft ()
void shiftWordLeft ()
void wordRight ()
void shiftWordRight ()
void home ()
void shiftHome ()
void end ()
void shiftEnd ()
void up ()
void shiftUp ()
void down ()
void shiftDown ()
void scrollUp ()
void scrollDown ()
void topOfView ()
void shiftTopOfView ()
void bottomOfView ()
void shiftBottomOfView ()
void pageUp ()
void shiftPageUp ()
void pageDown ()
void shiftPageDown ()
void top ()
void shiftTop ()
void bottom ()
void shiftBottom ()
void toMatchingBracket ()
void shiftToMatchingBracket ()
void gotoLine ()
void gotoLineNumber (int linenumber)
int getEol ()
void setEol (int eol)
void find ()
void find (const QString &, long, bool add=true)
void replace ()
void replace (const QString &, const QString &, long)
void findAgain (bool back)
void findAgain ()
void findPrev ()
void setFoldingMarkersOn (bool enable)
void setIconBorder (bool enable)
void setLineNumbersOn (bool enable)
void setScrollBarMarks (bool enable)
void showCmdLine (bool enable)
void toggleFoldingMarkers ()
void toggleIconBorder ()
void toggleLineNumbersOn ()
void toggleScrollBarMarks ()
void toggleDynWordWrap ()
void toggleCmdLine ()
void setDynWrapIndicators (int mode)
void gotoMark (KTextEditor::Mark *mark)
void selectionChanged ()
void slotNewUndo ()
void slotUpdate ()
void toggleInsert ()
void reloadFile ()
void toggleWWMarker ()
void toggleWriteLock ()
void switchToCmdLine ()
void slotReadWriteChanged ()
void slotSelectionTypeChanged ()
void spellcheckFromCursor ()
void spellcheckSelection ()

Signals

void cursorPositionChanged ()
void completionAborted ()
void completionDone ()
void argHintHidden ()
void completionDone (KTextEditor::CompletionEntry)
void filterInsertString (KTextEditor::CompletionEntry *, QString *)
void aboutToShowCompletionBox ()
void needTextHint (int line, int col, QString &text)
void gotFocus (Kate::View *)
void lostFocus (Kate::View *)
void newStatus ()
void dropEventPass (QDropEvent *)
void viewStatusMsg (const QString &msg)

Public Member Functions

 KateView (KateDocument *doc, QWidget *parent=0L, const char *name=0)
 ~KateView ()
KTextEditor::Document * document () const
void installPopup (QPopupMenu *menu)
QPopupMenupopup () const
void enableTextHints (int timeout)
void disableTextHints ()
void setDynWordWrap (bool b)
bool dynWordWrap () const
void editStart ()
void editEnd (int editTagLineStart, int editTagLineEnd, bool tagFrom)
void editSetCursor (const KateTextCursor &cursor)
bool tagLine (const KateTextCursor &virtualCursor)
bool tagLines (int start, int end, bool realLines=false)
bool tagLines (KateTextCursor start, KateTextCursor end, bool realCursors=false)
void tagAll ()
void clear ()
void repaintText (bool paintOnlyDirty=false)
void updateView (bool changed=false)
bool isOverwriteMode () const
void setOverwriteMode (bool b)
QString currentTextLine ()
QString currentWord ()
void insertText (const QString &text)
bool canDiscard ()
int tabWidth ()
void setTabWidth (int w)
void setEncoding (QString e)
bool isLastView ()
void readSessionConfig (KConfig *)
void writeSessionConfig (KConfig *)
KateRendererrenderer ()
bool iconBorder ()
bool lineNumbersOn ()
bool scrollBarMarks ()
int dynWrapIndicators ()
bool foldingMarkersOn ()
Kate::DocumentgetDoc ()
void setActive (bool b)
bool isActive ()
KateDocumentdoc () const
KActionCollectioneditActionCollection () const
bool setCursorPositionInternal (uint line, uint col, uint tabwidth=1, bool calledExternally=false)
KateViewConfigconfig ()
void updateConfig ()
void updateDocumentConfig ()
void updateRendererConfig ()

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *)
bool checkOverwrite (KURL)

Friends

class KateViewInternal
class KateIconBorder
class KateCodeCompletion

Detailed Description

Definition at line 56 of file kateview.h.


Member Function Documentation

bool KateView::isOverwriteMode  )  const [virtual]
 

Set editor mode.

Reimplemented from Kate::View.

Definition at line 708 of file kateview.cpp.

References KateDocument::config(), and KateDocumentConfig::configFlags().

Referenced by KateViewInternal::paintText(), setOverwriteMode(), toggleInsert(), and updateConfig().

void KateView::setOverwriteMode bool  b  )  [virtual]
 

Get editor mode.

Reimplemented from Kate::View.

Definition at line 816 of file kateview.cpp.

References KateDocument::config(), KateDocumentConfig::configFlags(), isOverwriteMode(), KToggleAction::setChecked(), and KateDocument::setConfigFlags().

QString KateView::currentTextLine  )  [inline, virtual]
 

Gets the text line where the cursor is on.

Reimplemented from Kate::View.

Definition at line 179 of file kateview.h.

References cursorLine(), and getDoc().

QString KateView::currentWord  )  [inline, virtual]
 

Gets the word where the cursor is on.

Reimplemented from Kate::View.

Definition at line 181 of file kateview.h.

References KateViewInternal::getCursor(), and KateDocument::getWord().

void KateView::insertText const QString text  )  [inline, virtual]
 

Insert text at the current cursor position.

Parameters:
mark is unused.

Reimplemented from Kate::View.

Definition at line 183 of file kateview.h.

References cursorColumnReal(), cursorLine(), and getDoc().

bool KateView::canDiscard  )  [virtual]
 

Works exactly like closeURL() of KParts::ReadWritePart.

Reimplemented from Kate::View.

Definition at line 834 of file kateview.cpp.

References KateDocument::closeURL().

bool KateView::isLastView  )  [inline, virtual]
 

Returns true if this editor is the only owner of its document.

Implements Kate::View.

Definition at line 189 of file kateview.h.

References KateDocument::isLastView().

void KateView::flush  )  [virtual, slot]
 

Flushes the document of the text widget.

The user is given a chance to save the current document if the current document has been modified.

Reimplemented from Kate::View.

Definition at line 839 of file kateview.cpp.

References KateDocument::closeURL().

KateView::saveResult KateView::save  )  [virtual, slot]
 

Saves the file under the current file name.

If the current file name is Untitled, as it is after a call to newFile(), this routine will call saveAs().

Reimplemented from Kate::View.

Definition at line 844 of file kateview.cpp.

References doc(), KateDocument::save(), and saveAs().

KateView::saveResult KateView::saveAs  )  [virtual, slot]
 

Allows the user to save the file under a new name.

Reimplemented from Kate::View.

Definition at line 855 of file kateview.cpp.

References checkOverwrite(), config(), doc(), KEncodingFileDialog::Result::encoding, QValueList::first(), KEncodingFileDialog::getSaveURLAndEncoding(), QValueList::isEmpty(), KateDocument::saveAs(), KateDocument::setEncoding(), and KEncodingFileDialog::Result::URLs.

Referenced by save().

void KateView::indent  )  [inline, virtual, slot]
 

Moves the current line or the selection one position to the right.

Reimplemented from Kate::View.

Definition at line 196 of file kateview.h.

References cursorLine(), and KateDocument::indent().

Referenced by KateCommands::CoreCommands::exec().

void KateView::unIndent  )  [inline, virtual, slot]
 

Moves the current line or the selection one position to the left.

Reimplemented from Kate::View.

Definition at line 197 of file kateview.h.

References cursorLine(), and KateDocument::indent().

Referenced by KateCommands::CoreCommands::exec().

void KateView::cleanIndent  )  [inline, virtual, slot]
 

Optimizes the selected indentation, replacing tabs and spaces as needed.

Reimplemented from Kate::View.

Definition at line 198 of file kateview.h.

References cursorLine(), and KateDocument::indent().

Referenced by KateCommands::CoreCommands::exec().

void KateView::comment  )  [inline, virtual, slot]
 

Comments out current line.

Reimplemented from Kate::View.

Definition at line 200 of file kateview.h.

References KateDocument::comment(), cursorColumnReal(), and cursorLine().

Referenced by KateCommands::CoreCommands::exec().

void KateView::uncomment  )  [inline, virtual, slot]
 

Removes comment signs in the current line.

Reimplemented from Kate::View.

Definition at line 201 of file kateview.h.

References KateDocument::comment(), cursorColumnReal(), and cursorLine().

Referenced by KateCommands::CoreCommands::exec().

void KateView::uppercase  )  [inline, slot]
 

Uppercases selected text, or an alphabetic character next to the cursor.

Definition at line 207 of file kateview.h.

References KateViewInternal::cursor, and KateDocument::transform().

void KateView::lowercase  )  [inline, slot]
 

Lowercases selected text, or an alphabetic character next to the cursor.

Definition at line 211 of file kateview.h.

References KateViewInternal::cursor, and KateDocument::transform().

void KateView::capitalize  )  [inline, slot]
 

Capitalizes the selection (makes each word start with an uppercase) or the word under the cursor.

Definition at line 216 of file kateview.h.

References KateViewInternal::cursor, and KateDocument::transform().

void KateView::joinLines  )  [slot]
 

Joins lines touched by the selection.

Definition at line 917 of file kateview.cpp.

References cursorLine(), KateDocument::joinLines(), KateDocument::selEndLine(), and KateDocument::selStartLine().

void KateView::keyReturn  )  [inline, virtual, slot]
 

Some simply key commands.

Reimplemented from Kate::View.

Definition at line 223 of file kateview.h.

References KateViewInternal::doReturn().

Referenced by KateViewInternal::keyPressEvent().

void KateView::cursorLeft  )  [inline, virtual, slot]
 

Move cursor in the view.

Reimplemented from Kate::View.

Definition at line 229 of file kateview.h.

References KateViewInternal::cursorLeft().

void KateView::gotoLine  )  [virtual, slot]
 

Presents a "Goto Line" dialog to the user.

Reimplemented from Kate::View.

Definition at line 899 of file kateview.cpp.

References QDialog::exec(), KateViewInternal::getCursor(), KateGotoLineDialog::getLine(), gotoLineNumber(), KateTextCursor::line(), and KateDocument::numLines().

void KateView::readSessionConfig KConfig config  )  [virtual]
 

Reads session config out of the KConfig object.

This also includes the actual cursor position and the bookmarks.

Reimplemented from Kate::View.

Definition at line 930 of file kateview.cpp.

References KConfigBase::readNumEntry(), and setCursorPositionInternal().

void KateView::writeSessionConfig KConfig config  )  [virtual]
 

Writes session config into the KConfig object.

Reimplemented from Kate::View.

Definition at line 935 of file kateview.cpp.

References KateTextCursor::col(), KateViewInternal::cursor, KateTextCursor::line(), and KConfigBase::writeEntry().

int KateView::getEol  )  [virtual, slot]
 

Get the end of line mode (Unix, Macintosh or Dos).

Reimplemented from Kate::View.

Definition at line 941 of file kateview.cpp.

References KateDocument::config(), and KateDocumentConfig::eol().

void KateView::setEol int  eol  )  [virtual, slot]
 

Set the end of line mode (Unix, Macintosh or Dos).

Reimplemented from Kate::View.

Definition at line 946 of file kateview.cpp.

References KateDocument::config(), doc(), and KateDocumentConfig::setEol().

void KateView::find  )  [virtual, slot]
 

Presents a search dialog to the user.

Reimplemented from Kate::View.

Definition at line 1081 of file kateview.cpp.

References KateSearch::find().

Referenced by SearchCommand::processText().

void KateView::find const QString ,
long  ,
bool  add = true
[slot]
 

proxy for KateSearch

Definition at line 1086 of file kateview.cpp.

References KateSearch::find().

void KateView::replace  )  [virtual, slot]
 

Presents a replace dialog to the user.

Reimplemented from Kate::View.

Definition at line 1091 of file kateview.cpp.

References KateSearch::replace().

void KateView::replace const QString ,
const QString ,
long 
[slot]
 

proxy for KateSearch

Definition at line 1096 of file kateview.cpp.

References KateSearch::replace().

void KateView::findAgain bool  back  )  [virtual, slot]
 

Searches for the last searched text forward from cursor position.

Parameters:
forward determines the search direction.

Reimplemented from Kate::View.

Definition at line 1101 of file kateview.cpp.

References KateSearch::findAgain().

void KateView::findAgain  )  [inline, virtual, slot]
 

Searches for the last searched text forward from cursor position.

Searches forward from current cursor position.

Reimplemented from Kate::View.

Definition at line 278 of file kateview.h.

Referenced by findPrev().

void KateView::findPrev  )  [inline, virtual, slot]
 

Searches for the last searched text forward from cursor position.

Searches backward from current cursor position.

Reimplemented from Kate::View.

Definition at line 279 of file kateview.h.

References findAgain().

void KateView::setIconBorder bool  enable  )  [virtual, slot]
 

Sets icon border on or off depending on.

Parameters:
enable the flag

Reimplemented from Kate::View.

Definition at line 957 of file kateview.cpp.

References config(), and KateViewConfig::setIconBar().

Referenced by KateCommands::CoreCommands::exec().

void KateView::setLineNumbersOn bool  enable  )  [virtual, slot]
 

Sets display of line numbers on/off depending on enable.

Parameters:
enable the flag

Reimplemented from Kate::View.

Definition at line 967 of file kateview.cpp.

References config(), and KateViewConfig::setLineNumbers().

Referenced by KateCommands::CoreCommands::exec().

void KateView::toggleIconBorder  )  [virtual, slot]
 

Toggles icon border.

Reimplemented from Kate::View.

Definition at line 962 of file kateview.cpp.

References config(), and KateViewConfig::setIconBar().

void KateView::toggleLineNumbersOn  )  [virtual, slot]
 

Toggles display of lineNumbers.

Reimplemented from Kate::View.

Definition at line 972 of file kateview.cpp.

References config(), and KateViewConfig::setLineNumbers().

bool KateView::iconBorder  )  [virtual]
 

Returns whether iconborder is visible.

Reimplemented from Kate::View.

Definition at line 1012 of file kateview.cpp.

References KateIconBorder::iconBorderOn(), and KateViewInternal::leftBorder.

bool KateView::lineNumbersOn  )  [virtual]
 

Returns:
Wheather line numbers display is on

Reimplemented from Kate::View.

Definition at line 1016 of file kateview.cpp.

References KateViewInternal::leftBorder, and KateIconBorder::lineNumbersOn().

Kate::Document* KateView::getDoc  )  [inline, virtual]
 

Returns a pointer to the document of the view.

Reimplemented from Kate::View.

Definition at line 302 of file kateview.h.

Referenced by currentTextLine(), insertText(), KateBookmarks::KateBookmarks(), and SearchCommand::processText().

KateViewConfig* KateView::config  )  [inline]
 

Configuration.

Definition at line 427 of file kateview.h.

Referenced by saveAs(), setDynWordWrap(), setDynWrapIndicators(), setFoldingMarkersOn(), setIconBorder(), setLineNumbersOn(), setScrollBarMarks(), toggleDynWordWrap(), toggleFoldingMarkers(), toggleIconBorder(), toggleLineNumbersOn(), toggleScrollBarMarks(), updateConfig(), and KateDocument::updateFileType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kate Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 8 08:05:43 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003