class KEdit


Definition#include <keditcl.h>
InheritsQMultiLineEdit (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots

Signals

Protected Methods

Protected Members

int  newFile ()

Opens a new untitled document in the text widget The user is given a chance to save the current document if the current document has been modified.

int  doSave ()

Saves the file if necessary under the current file name. If the current file name is Untitled, as it is after a call to newFile(), this routing will call saveAs().

int  doSave ( const char *filename )

Saves the file as filename

int  saveAs ()

Allows the user to save the file under a new name

int  openFile ( int mode )

This will present an open file dialog and open the file specified by the user, if possible. The return codes are KEDIT_OK, KEDIT_USER_CANCEL and KEDIT_OS_ERROR. The user will be given a chance to save the current file if it has been modified. mode is one of OPEN_READONLY, OPEN_READWRITE. OPEN_READONLY means that the user will not be able to insert characters into the document.

int  insertFile ()

Calling this method will let the user insert a file at the current cursor position. Return codes are KEDIT_OK, KEDIT_USER_CANCEL, KDEDIT_OS_ERROR.

int  loadFile ( QString filename , int mode )

Loads the file filename into editor. The possible modes are OPEN_READONLY, OPEN_READWRITE, OPEN_INSERT. OPEN_READONLY means that the user will not be able to insert characters into the document. OPEN_INSERT means that the file will be inserted into the current document at the current cursor position.

QString  getName ()

Returns the filename of the currnet file. You can use setName() to set the filename of the current file

void  setName ( const char *_name )

Sets the filename of the currnet file. You can use getName() to set the filename of the current file

Reimplemented from QObject

QString  markedText ()

Returns the currently marked text.

Reimplemented from QMultiLineEdit

void  selectFont ()

Lets the user select a font and sets the font of the textwidget to that selected font.

void  Search ()

Presents a search dialog to the user

int  repeatSearch ()

Repeasts the last search specified on the search dialog. If the user hasn't searched for anything until now, this method will simply return without doing anything.

void  Replace ()

Presents a Search and Replace Dialog to the User.

void  doGotoLine ()

Presents a "Goto Line" dialog to the User

bool  isModified ()

Returns true if the document has been modified.

void  toggleModified ( bool )

Toggles the modification status of the document. TRUE = Modified, FALSE = UNMODIFIED. Methods such as doSave() rely on this to see whether the document needs to be saved.

void  setAutoIndentMode ( bool )

Sets the Indent Mode. TRUE = Indent mode on, FALSE = Indent mode off.

bool  AutoIndentMode ()

Returns the Indent Mode. TRUE = Indent mode on, FALSE = Indent mode off.

void  installRBPopup ( QPopupMenu* )

Install a Popup Menue for KEdit. The Popup Menu will be activated on a right mouse button press event.

int  currentLine ()

Returns the current line number, that is the line the cursor is on.

int  currentColumn ()

This returns the actual column number the cursor is on. This call differs from QMultiLineEdit::getCursorPosition in that it returns the actual cursor position and not the character position. Use currentLine() and currentColumn() if you want to display the current line or column in the status bar for example.

bool  WordWrap ()

Returns TRUE if word wrap is on. You also need to specify the fill column with setFillColumnMode() otherwise wordwrap is not in effect.

void  setWordWrap (bool )

You also need to specify the fill column with setFillColumnMode() otherwise wordwrap is not in effect.

bool  FillColumnMode ()

Returns TRUE if fill column mode is on, that is if the line will be broken automatically when if a character is to be inserted past this position.

void  setFillColumnMode (int line, bool set)

Set the fill column to column col, if col is strictly larger than 0. If col is 0, fill column mode is turned off. In fill column mode, the line will be broken automatically at column col, when a character is inserted past column col..

void  saveBackupCopy (bool copy)

If copy is TRUE KEdit will make a backup copy of the document that is being edited on opening it. The backup copy will receive the suffix ~. The default is TRUE.

void  setFileName (char* name)

Sets the name of the file if a file is open.

void  saveasfile (char* name)

saves the current file as 'name'

void  setReduceWhiteOnJustify (bool reduce)

remove tabs and whitespace on the end of lines during a justify operation

void  fileChanged ()

[signal]

This signal is emitted when the document in the textwidget has changed

void  CursorPositionChanged ()

[signal]

This signal is emitted whenever the cursor position changed. Use this in conjunction with currentLine(), currentColumn() if you need to know the cursor position.

void  saving ()

[signal]

This signal is emitted just before saving a file. Since KEdit calls kapp->processEvents(), you have a chance to let the user know what's going to happen.

void  loading ()

[signal]

This signal is emitted just before loading a file. Since KEdit calls kapp->processEvents(), you have a chance to let the user know what's going to happen.

void  toggle_overwrite_signal ()

[signal]

This signal is emitted if the user toggles from overwrite to insert mode. He can do so by pressing the "Insert" Button on a PC keyboard.


Generated by: tasin@pcw-home on Sun Feb 13 22:02:02 2000, using kdoc 2.0a35.