• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
KEdit Class Reference

#include <keditcl.h>

Inherits TQMultiLineEdit.

Public Types

enum  { NONE , FORWARD , BACKWARD }
 

Public Slots

void corrected (const TQString &originalword, const TQString &newword, unsigned int pos)
 
void misspelling (const TQString &word, const TQStringList &, unsigned int pos)
 

Signals

void gotUrlDrop (TQDropEvent *e)
 
void CursorPositionChanged ()
 
void toggle_overwrite_signal ()
 

Public Member Functions

 KEdit (TQWidget *_parent=NULL, const char *name=NULL)
 
void insertText (TQTextStream *)
 
void saveText (TQTextStream *, bool softWrap)
 
void saveText (TQTextStream *)
 
void selectFont ()
 
void search ()
 
bool repeatSearch ()
 
void replace ()
 
void doGotoLine ()
 
void cleanWhiteSpace ()
 
void installRBPopup (TQPopupMenu *)
 
int currentLine ()
 
int currentColumn ()
 
void spellcheck_start ()
 
void spellcheck_stop ()
 
void setOverwriteEnabled (bool b)
 
TQString selectWordUnderCursor ()
 
TQPopupMenu * createPopupMenu (const TQPoint &pos)
 
void setAutoUpdate (bool b)
 

Protected Member Functions

void computePosition ()
 
int doSearch (TQString s_pattern, bool case_sensitive, bool regex, bool forward, int line, int col)
 
int doReplace (TQString s_pattern, bool case_sensitive, bool regex, bool forward, int line, int col, bool replace)
 
void posToRowCol (unsigned int pos, unsigned int &line, unsigned int &col)
 
virtual void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
 
virtual void ensureCursorVisible ()
 
virtual void setCursor (const TQCursor &)
 
virtual void viewportPaintEvent (TQPaintEvent *)
 
void keyPressEvent (TQKeyEvent *)
 
void dragMoveEvent (TQDragMoveEvent *e)
 
void dragEnterEvent (TQDragEnterEvent *e)
 
void dropEvent (TQDropEvent *e)
 
void contentsDragMoveEvent (TQDragMoveEvent *e)
 
void contentsDragEnterEvent (TQDragEnterEvent *e)
 
void contentsDropEvent (TQDropEvent *e)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

A simple text editor for the KDE project.

Deprecated:
Use KTextEditor::Editor or KTextEdit instead.
Author
Bernd Johannes Wuebben wuebb.nosp@m.en@m.nosp@m.ath.c.nosp@m.orne.nosp@m.ll.ed.nosp@m.u, Waldo Bastian basti.nosp@m.an@k.nosp@m.de.or.nosp@m.g

Definition at line 171 of file keditcl.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Search directions.

Definition at line 187 of file keditcl.h.

Constructor & Destructor Documentation

◆ KEdit()

KEdit::KEdit ( TQWidget *  _parent = NULL,
const char *  name = NULL 
)

The usual constructor.

Definition at line 49 of file keditcl1.cpp.

◆ ~KEdit()

KEdit::~KEdit ( )

Definition at line 75 of file keditcl1.cpp.

Member Function Documentation

◆ cleanWhiteSpace()

void KEdit::cleanWhiteSpace ( )

Clean up redundant whitespace from selected text.

Definition at line 148 of file keditcl1.cpp.

◆ computePosition()

void KEdit::computePosition ( )
protected

Definition at line 309 of file keditcl1.cpp.

◆ contentsDragEnterEvent()

void KEdit::contentsDragEnterEvent ( TQDragEnterEvent *  e)
protected

Definition at line 641 of file keditcl1.cpp.

◆ contentsDragMoveEvent()

void KEdit::contentsDragMoveEvent ( TQDragMoveEvent *  e)
protected

Definition at line 627 of file keditcl1.cpp.

◆ contentsDropEvent()

void KEdit::contentsDropEvent ( TQDropEvent *  e)
protected

Definition at line 659 of file keditcl1.cpp.

◆ corrected

void KEdit::corrected ( const TQString &  originalword,
const TQString &  newword,
unsigned int  pos 
)
slot

Definition at line 1034 of file keditcl2.cpp.

◆ create()

void KEdit::create ( WId  id = 0,
bool  initializeWindow = true,
bool  destroyOldWindow = true 
)
protectedvirtual

Reimplemented for internal reasons, the API is not affected.

Definition at line 676 of file keditcl1.cpp.

◆ createPopupMenu()

TQPopupMenu * KEdit::createPopupMenu ( const TQPoint &  pos)
Since
3.3

Definition at line 1108 of file keditcl2.cpp.

◆ currentColumn()

int KEdit::currentColumn ( )

Retrieve the actual column number the cursor is on.

This call differs from TQMultiLineEdit::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.

Definition at line 297 of file keditcl1.cpp.

◆ currentLine()

int KEdit::currentLine ( )

Retrieve the current line number.

The current line is the line the cursor is on.

Definition at line 290 of file keditcl1.cpp.

◆ CursorPositionChanged

void KEdit::CursorPositionChanged ( )
signal

This signal is emitted whenever the cursor position changes.

Use this in conjunction with currentLine(), currentColumn() if you need to know the cursor position.

◆ doGotoLine()

void KEdit::doGotoLine ( )

Present a "Goto Line" dialog to the user.

Definition at line 575 of file keditcl1.cpp.

◆ doReplace()

int KEdit::doReplace ( TQString  s_pattern,
bool  case_sensitive,
bool  regex,
bool  forward,
int  line,
int  col,
bool  replace 
)
protected

Definition at line 505 of file keditcl2.cpp.

◆ doSearch()

int KEdit::doSearch ( TQString  s_pattern,
bool  case_sensitive,
bool  regex,
bool  forward,
int  line,
int  col 
)
protected

Definition at line 148 of file keditcl2.cpp.

◆ dragEnterEvent()

void KEdit::dragEnterEvent ( TQDragEnterEvent *  e)
protected

Definition at line 635 of file keditcl1.cpp.

◆ dragMoveEvent()

void KEdit::dragMoveEvent ( TQDragMoveEvent *  e)
protected

Definition at line 619 of file keditcl1.cpp.

◆ dropEvent()

void KEdit::dropEvent ( TQDropEvent *  e)
protected

Definition at line 648 of file keditcl1.cpp.

◆ ensureCursorVisible()

void KEdit::ensureCursorVisible ( )
protectedvirtual

Reimplemented for internal reasons, the API is not affected.

Definition at line 682 of file keditcl1.cpp.

◆ gotUrlDrop

void KEdit::gotUrlDrop ( TQDropEvent *  e)
signal

This signal is emitted if the user dropped a URL over the text editor TQMultiLineEdit widget.

Note that the user can drop also Text on it, but this is already handled internally by TQMultiLineEdit.

◆ insertText()

void KEdit::insertText ( TQTextStream *  stream)

Insert text from the text stream into the edit widget.

Definition at line 87 of file keditcl1.cpp.

◆ installRBPopup()

void KEdit::installRBPopup ( TQPopupMenu *  p)

Install a context menu for KEdit.

The Popup Menu will be activated on a right mouse button press event.

Definition at line 563 of file keditcl1.cpp.

◆ keyPressEvent()

void KEdit::keyPressEvent ( TQKeyEvent *  e)
protected

Definition at line 383 of file keditcl1.cpp.

◆ misspelling

void KEdit::misspelling ( const TQString &  word,
const TQStringList &  ,
unsigned int  pos 
)
slot

Definition at line 1016 of file keditcl2.cpp.

◆ posToRowCol()

void KEdit::posToRowCol ( unsigned int  pos,
unsigned int &  line,
unsigned int &  col 
)
protected

Sets line and col to the position pos, considering word wrap.

Definition at line 1058 of file keditcl2.cpp.

◆ repeatSearch()

bool KEdit::repeatSearch ( )

Repeat 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.

Returns
true if a search was done. false if no search was done.

Definition at line 225 of file keditcl2.cpp.

◆ replace()

void KEdit::replace ( )

Present a Search and Replace Dialog to the user.

Definition at line 247 of file keditcl2.cpp.

◆ saveText() [1/2]

void KEdit::saveText ( TQTextStream *  stream)

Definition at line 236 of file keditcl1.cpp.

◆ saveText() [2/2]

void KEdit::saveText ( TQTextStream *  stream,
bool  softWrap 
)

Save text from the edit widget to a text stream.

If softWrap is false soft line wrappings are replaced with line-feeds If softWrap is true soft line wrappings are ignored.

Since
3.1

Definition at line 242 of file keditcl1.cpp.

◆ search()

void KEdit::search ( )

Present a search dialog to the user.

Definition at line 51 of file keditcl2.cpp.

◆ selectFont()

void KEdit::selectFont ( )

Let the user select a font and set the font of the textwidget to that selected font.

Definition at line 567 of file keditcl1.cpp.

◆ selectWordUnderCursor()

TQString KEdit::selectWordUnderCursor ( )

Definition at line 1075 of file keditcl2.cpp.

◆ setAutoUpdate()

void KEdit::setAutoUpdate ( bool  b)

Definition at line 81 of file keditcl1.cpp.

◆ setCursor()

void KEdit::setCursor ( const TQCursor &  c)
protectedvirtual

Definition at line 690 of file keditcl1.cpp.

◆ setOverwriteEnabled()

void KEdit::setOverwriteEnabled ( bool  b)

Allow the user to toggle between insert mode and overwrite mode with the "Insert" key.

See also toggle_overwrite_signal();

The default is false: the user can not toggle.

Definition at line 670 of file keditcl1.cpp.

◆ spellcheck_start()

void KEdit::spellcheck_start ( )

Start spellchecking mode.

Definition at line 1010 of file keditcl2.cpp.

◆ spellcheck_stop()

void KEdit::spellcheck_stop ( )

Exit spellchecking mode.

Definition at line 1068 of file keditcl2.cpp.

◆ toggle_overwrite_signal

void KEdit::toggle_overwrite_signal ( )
signal

This signal is emitted if the user toggles from insert to overwrite mode or vice versa.

The user can do so by pressing the "Insert" button on a PC keyboard.

This feature must be activated by calling setOverwriteEnabled(true) first.

◆ viewportPaintEvent()

void KEdit::viewportPaintEvent ( TQPaintEvent *  pe)
protectedvirtual

Definition at line 698 of file keditcl1.cpp.

◆ virtual_hook()

void KEdit::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 716 of file keditcl1.cpp.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.