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

Kate

Kate::View

Kate::View Class Reference

The Kate::View text editor interface. More...

#include <view.h>

Inheritance diagram for Kate::View:

Inheritance graph
[legend]

List of all members.


Public Types

enum  saveResult { SAVE_OK, SAVE_CANCEL, SAVE_RETRY, SAVE_ERROR }

Public Slots

virtual void backspace ()
virtual void bottom ()
virtual void bottomOfView ()
virtual void cleanIndent ()
virtual void comment ()
virtual void cursorLeft ()
virtual void cursorRight ()
virtual void down ()
virtual void end ()
virtual void find ()
virtual void findAgain ()
virtual void findAgain (bool forward)
virtual void findPrev ()
virtual void flush ()
virtual int getEol ()
virtual void gotoLine ()
virtual void gotoLineNumber (int)=0
virtual void gotoMark (KTextEditor::Mark *mark)=0
virtual void home ()
virtual void indent ()
virtual void keyDelete ()
virtual void keyReturn ()
virtual void killLine ()
virtual void pageDown ()
virtual void pageUp ()
virtual void replace ()
virtual saveResult save ()
virtual saveResult saveAs ()
virtual void scrollDown ()
virtual void scrollUp ()
virtual void setEol (int)
virtual void setFocus ()
virtual void setIconBorder (bool enable)
virtual void setLineNumbersOn (bool enable)
virtual void shiftBottom ()
virtual void shiftCursorLeft ()
virtual void shiftCursorRight ()
virtual void shiftDown ()
virtual void shiftEnd ()
virtual void shiftHome ()
virtual void shiftPageDown ()
virtual void shiftPageUp ()
virtual void shiftTop ()
virtual void shiftUp ()
virtual void shiftWordLeft ()
virtual void shiftWordRight ()
virtual void slotDecFontSizes ()
virtual void slotEditCommand ()
virtual void slotIncFontSizes ()
virtual void toggleBookmark ()
virtual void toggleIconBorder ()
virtual void toggleLineNumbersOn ()
virtual void top ()
virtual void topOfView ()
virtual void uncomment ()
virtual void unIndent ()
virtual void up ()
virtual void wordLeft ()
virtual void wordRight ()

Signals

void gotFocus (View *)

Public Member Functions

virtual bool canDiscard ()
virtual QString currentTextLine ()
virtual QString currentWord ()
virtual Document * getDoc ()
virtual bool iconBorder ()
virtual void insertText (const QString &mark)
virtual bool isActive ()=0
virtual bool isLastView ()=0
virtual bool isOverwriteMode () const
virtual bool lineNumbersOn ()
virtual void readSessionConfig (KConfig *)
virtual void setActive (bool b)=0
virtual void setEncoding (QString e)=0
virtual void setOverwriteMode (bool)
virtual void setTabWidth (int)=0
virtual int tabWidth ()=0
 View (KTextEditor::Document *, QWidget *, const char *name=0)
virtual QString word (int, int)
virtual void writeSessionConfig (KConfig *)
virtual ~View ()

Detailed Description

The Kate::View text editor interface.

Author:
Cullmann Christoph, modified by rokrau (6/21/01)

Definition at line 42 of file view.h.


Member Enumeration Documentation

enum Kate::View::saveResult

Return values for "save" related commands.

Enumerator:
SAVE_OK 
SAVE_CANCEL 
SAVE_RETRY 
SAVE_ERROR 

Definition at line 52 of file view.h.


Constructor & Destructor Documentation

Kate::View::View ( KTextEditor::Document *  doc,
QWidget *  parent,
const char *  name = 0 
)

Constructor (should much rather take a reference to the document).

Definition at line 77 of file interfaces.cpp.

Kate::View::~View (  )  [virtual]

Destructor, you need a destructor if Scott Meyers says so.

Definition at line 81 of file interfaces.cpp.


Member Function Documentation

virtual void Kate::View::backspace (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 144 of file view.h.

virtual void Kate::View::bottom (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 175 of file view.h.

virtual void Kate::View::bottomOfView (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 168 of file view.h.

virtual bool Kate::View::canDiscard (  )  [inline, virtual]

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

Reimplemented in KateView.

Definition at line 90 of file view.h.

virtual void Kate::View::cleanIndent (  )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 130 of file view.h.

virtual void Kate::View::comment (  )  [inline, virtual, slot]

Comments out current line.

Reimplemented in KateView.

Definition at line 134 of file view.h.

virtual QString Kate::View::currentTextLine (  )  [inline, virtual]

Gets the text line where the cursor is on.

Reimplemented in KateView.

Definition at line 72 of file view.h.

virtual QString Kate::View::currentWord (  )  [inline, virtual]

Gets the word where the cursor is on.

Reimplemented in KateView.

Definition at line 76 of file view.h.

virtual void Kate::View::cursorLeft (  )  [inline, virtual, slot]

Move cursor in the view.

Reimplemented in KateView.

Definition at line 149 of file view.h.

virtual void Kate::View::cursorRight (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 151 of file view.h.

virtual void Kate::View::down (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 163 of file view.h.

virtual void Kate::View::end (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 159 of file view.h.

virtual void Kate::View::find (  )  [inline, virtual, slot]

Presents a search dialog to the user.

Reimplemented in KateView.

Definition at line 180 of file view.h.

virtual void Kate::View::findAgain (  )  [inline, virtual, slot]

Searches for the last searched text forward from cursor position.

Searches forward from current cursor position.

Reimplemented in KateView.

Definition at line 224 of file view.h.

virtual void Kate::View::findAgain ( bool  forward  )  [inline, virtual, slot]

Searches for the last searched text forward from cursor position.

Parameters:
forward determines the search direction.

Reimplemented in KateView.

Definition at line 219 of file view.h.

virtual void Kate::View::findPrev (  )  [inline, virtual, slot]

Searches for the last searched text forward from cursor position.

Searches backward from current cursor position.

Reimplemented in KateView.

Definition at line 229 of file view.h.

virtual void Kate::View::flush (  )  [inline, 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 in KateView.

Definition at line 108 of file view.h.

virtual Document* Kate::View::getDoc (  )  [inline, virtual]

Returns a pointer to the document of the view.

Reimplemented in KateView.

Definition at line 267 of file view.h.

virtual int Kate::View::getEol (  )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 205 of file view.h.

void Kate::View::gotFocus ( View *   )  [signal]

Reimplemented in KateView.

virtual void Kate::View::gotoLine (  )  [inline, virtual, slot]

Presents a "Goto Line" dialog to the user.

Reimplemented in KateView.

Definition at line 188 of file view.h.

virtual void Kate::View::gotoLineNumber ( int   )  [pure virtual, slot]

Implemented in KateView.

virtual void Kate::View::gotoMark ( KTextEditor::Mark *  mark  )  [pure virtual, slot]

Implemented in KateView.

virtual void Kate::View::home (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 157 of file view.h.

virtual bool Kate::View::iconBorder (  )  [inline, virtual]

Returns whether iconborder is visible.

Reimplemented in KateView.

Definition at line 259 of file view.h.

virtual void Kate::View::indent (  )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 122 of file view.h.

virtual void Kate::View::insertText ( const QString &  mark  )  [inline, virtual]

Insert text at the current cursor position.

Parameters:
mark is unused.

Reimplemented in KateView.

Definition at line 86 of file view.h.

virtual bool Kate::View::isActive (  )  [pure virtual]

Implemented in KateView.

virtual bool Kate::View::isLastView (  )  [pure virtual]

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

Implemented in KateView.

virtual bool Kate::View::isOverwriteMode (  )  const [inline, virtual]

Set editor mode.

Reimplemented in KateView.

Definition at line 64 of file view.h.

virtual void Kate::View::keyDelete (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 143 of file view.h.

virtual void Kate::View::keyReturn (  )  [inline, virtual, slot]

Some simply key commands.

Reimplemented in KateView.

Definition at line 142 of file view.h.

virtual void Kate::View::killLine (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 145 of file view.h.

virtual bool Kate::View::lineNumbersOn (  )  [inline, virtual]

Returns:
Wheather line numbers display is on

Reimplemented in KateView.

Definition at line 263 of file view.h.

virtual void Kate::View::pageDown (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 171 of file view.h.

virtual void Kate::View::pageUp (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 169 of file view.h.

virtual void Kate::View::readSessionConfig ( KConfig *   )  [inline, virtual]

Reads session config out of the KConfig object.

This also includes the actual cursor position and the bookmarks.

Reimplemented in KateView.

Definition at line 195 of file view.h.

virtual void Kate::View::replace (  )  [inline, virtual, slot]

Presents a replace dialog to the user.

Reimplemented in KateView.

Definition at line 184 of file view.h.

virtual saveResult Kate::View::save (  )  [inline, 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 in KateView.

Definition at line 114 of file view.h.

virtual saveResult Kate::View::saveAs (  )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 118 of file view.h.

virtual void Kate::View::scrollDown (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 166 of file view.h.

virtual void Kate::View::scrollUp (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 165 of file view.h.

virtual void Kate::View::setActive ( bool  b  )  [pure virtual]

Implemented in KateView.

virtual void Kate::View::setEncoding ( QString  e  )  [pure virtual]

Implemented in KateView.

virtual void Kate::View::setEol ( int   )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 209 of file view.h.

virtual void Kate::View::setFocus (  )  [inline, virtual, slot]

Set focus to the current window.

Definition at line 214 of file view.h.

virtual void Kate::View::setIconBorder ( bool  enable  )  [inline, virtual, slot]

Sets icon border on or off depending on.

Parameters:
enable the flag

Reimplemented in KateView.

Definition at line 240 of file view.h.

virtual void Kate::View::setLineNumbersOn ( bool  enable  )  [inline, virtual, slot]

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

Parameters:
enable the flag

Reimplemented in KateView.

Definition at line 249 of file view.h.

virtual void Kate::View::setOverwriteMode ( bool   )  [inline, virtual]

Get editor mode.

Reimplemented in KateView.

Definition at line 68 of file view.h.

virtual void Kate::View::setTabWidth ( int   )  [pure virtual]

Implemented in KateView.

virtual void Kate::View::shiftBottom (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 176 of file view.h.

virtual void Kate::View::shiftCursorLeft (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 150 of file view.h.

virtual void Kate::View::shiftCursorRight (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 152 of file view.h.

virtual void Kate::View::shiftDown (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 164 of file view.h.

virtual void Kate::View::shiftEnd (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 160 of file view.h.

virtual void Kate::View::shiftHome (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 158 of file view.h.

virtual void Kate::View::shiftPageDown (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 172 of file view.h.

virtual void Kate::View::shiftPageUp (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 170 of file view.h.

virtual void Kate::View::shiftTop (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 174 of file view.h.

virtual void Kate::View::shiftUp (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 162 of file view.h.

virtual void Kate::View::shiftWordLeft (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 154 of file view.h.

virtual void Kate::View::shiftWordRight (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 156 of file view.h.

virtual void Kate::View::slotDecFontSizes (  )  [inline, virtual, slot]

Decrease font size.

Definition at line 277 of file view.h.

virtual void Kate::View::slotEditCommand (  )  [inline, virtual, slot]

Presents an edit command popup window, where the user can apply a shell command to the contents of the current window.

Definition at line 234 of file view.h.

virtual void Kate::View::slotIncFontSizes (  )  [inline, virtual, slot]

Increase font size.

Definition at line 273 of file view.h.

virtual int Kate::View::tabWidth (  )  [pure virtual]

Implemented in KateView.

virtual void Kate::View::toggleBookmark (  )  [inline, virtual, slot]

Deprecated:
No longer does anything. Use KTextEditor equivalents

Definition at line 286 of file view.h.

virtual void Kate::View::toggleIconBorder (  )  [inline, virtual, slot]

Toggles icon border.

Reimplemented in KateView.

Definition at line 244 of file view.h.

virtual void Kate::View::toggleLineNumbersOn (  )  [inline, virtual, slot]

Toggles display of lineNumbers.

Reimplemented in KateView.

Definition at line 253 of file view.h.

virtual void Kate::View::top (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 173 of file view.h.

virtual void Kate::View::topOfView (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 167 of file view.h.

virtual void Kate::View::uncomment (  )  [inline, virtual, slot]

Removes comment signs in the current line.

Reimplemented in KateView.

Definition at line 138 of file view.h.

virtual void Kate::View::unIndent (  )  [inline, virtual, slot]

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

Reimplemented in KateView.

Definition at line 126 of file view.h.

virtual void Kate::View::up (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 161 of file view.h.

virtual QString Kate::View::word ( int  ,
int   
) [inline, virtual]

Gets the word at position x, y.

Can be used to find the word under the mouse cursor

Definition at line 81 of file view.h.

virtual void Kate::View::wordLeft (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 153 of file view.h.

virtual void Kate::View::wordRight (  )  [inline, virtual, slot]

Reimplemented in KateView.

Definition at line 155 of file view.h.

virtual void Kate::View::writeSessionConfig ( KConfig *   )  [inline, virtual]

Writes session config into the KConfig object.

Reimplemented in KateView.

Definition at line 199 of file view.h.


The documentation for this class was generated from the following files:
  • view.h
  • interfaces.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