24#include <tqmultilineedit.h>
26#include <kdialogbase.h>
42 KEdGotoLine( TQWidget *parent=0,
const char *name=0,
bool modal=
true );
49 KIntNumInput *lineNum;
52 virtual void virtual_hook(
int id,
void* data );
54 class KEdGotoLinePrivate;
55 KEdGotoLinePrivate *d;
62 TQ_PROPERTY( TQString text READ getText WRITE setText )
63 TQ_PROPERTY(
bool caseSensitivity READ case_sensitive WRITE setCaseSensitive )
64 TQ_PROPERTY(
bool direction READ get_direction WRITE setDirection )
67 KEdFind( TQWidget *parent = 0,
const char *name=0,
bool modal=
true);
70 TQString getText()
const;
71 void setText(TQString
string);
72 void setCaseSensitive(
bool b );
73 bool case_sensitive()
const;
74 void setDirection(
bool b );
75 bool get_direction()
const;
81 KHistoryCombo *searchCombo()
const;
86 void textSearchChanged (
const TQString & );
89 TQVButtonGroup* group;
92 TQCheckBox *sensitive;
93 TQCheckBox *direction;
95 virtual void done(
int i ) { KDialogBase::done(i); }
102 virtual void virtual_hook(
int id,
void* data );
104 class KEdFindPrivate;
115 KEdReplace ( TQWidget *parent = 0,
const char *name=0,
bool modal=
true );
119 TQString getReplaceText();
120 void setText(TQString);
126 KHistoryCombo *searchCombo()
const;
132 KHistoryCombo *replaceCombo()
const;
134 bool case_sensitive();
135 bool get_direction();
143 void textSearchChanged (
const TQString & );
146 TQCheckBox *sensitive;
147 TQCheckBox *direction;
149 virtual void done(
int i ) { KDialogBase::done(i); }
157 virtual void virtual_hook(
int id,
void* data );
159 class KEdReplacePrivate;
160 KEdReplacePrivate *d;
171class TDEUI_EXPORT_DEPRECATED
KEdit :
public TQMultiLineEdit
179 KEdit (TQWidget *_parent=NULL,
const char *name=NULL);
201 void saveText(TQTextStream *,
bool softWrap);
284 TQString selectWordUnderCursor();
289 void setAutoUpdate(
bool b);
322 void corrected (
const TQString &originalword,
const TQString &newword,
unsigned int pos);
326 void misspelling (
const TQString &word,
const TQStringList &,
unsigned int pos);
338 void searchdone_slot();
348 void replace_all_slot();
353 void replace_search_slot();
358 void replacedone_slot();
363 void slotCursorPositionChanged();
366 void computePosition();
367 int doSearch(TQString s_pattern,
bool case_sensitive,
368 bool regex,
bool forward,
int line,
int col);
370 int doReplace(TQString s_pattern,
bool case_sensitive,
371 bool regex,
bool forward,
int line,
int col,
bool replace);
376 void posToRowCol(
unsigned int pos,
unsigned int &line,
unsigned int &col);
381 virtual void create( WId = 0,
bool initializeWindow =
true,
382 bool destroyOldWindow =
true );
388 virtual void setCursor(
const TQCursor & );
389 virtual void viewportPaintEvent( TQPaintEvent* );
393 void keyPressEvent ( TQKeyEvent * );
396 void dragMoveEvent(TQDragMoveEvent* e);
397 void dragEnterEvent(TQDragEnterEvent* e);
398 void dropEvent(TQDropEvent* e);
399 void contentsDragMoveEvent(TQDragMoveEvent* e);
400 void contentsDragEnterEvent(TQDragEnterEvent* e);
401 void contentsDropEvent(TQDropEvent* e);
404 TQTimer* repaintTimer;
406 TQString killbufferstring;
409 KEdReplace *replace_dialog;
410 KEdGotoLine *gotodialog;
417 bool lastwasanewline;
418 bool saved_readonlystate;
421 int replace_all_line;
424 int line_pos, col_pos;
425 bool fill_column_is_set;
426 bool word_wrap_is_set;
427 int fill_column_value;
430 virtual void virtual_hook(
int id,
void* data );
A dialog base class with standard buttons and predefined layouts.
virtual void slotCancel()
Activated when the Cancel button has been clicked.
virtual void slotUser3()
Activated when the User3 button has been clicked.
virtual void slotClose()
Activated when the Close button has been clicked.
virtual void slotUser1()
Activated when the User1 button has been clicked.
virtual void slotUser2()
Activated when the User2 button has been clicked.
void misspelling(const TQString &word, const TQStringList &, unsigned int pos)
void posToRowCol(unsigned int pos, unsigned int &line, unsigned int &col)
Sets line and col to the position pos, considering word wrap.
void CursorPositionChanged()
This signal is emitted whenever the cursor position changes.
void spellcheck_stop()
Exit spellchecking mode.
void installRBPopup(TQPopupMenu *)
Install a context menu for KEdit.
virtual void ensureCursorVisible()
Reimplemented for internal reasons, the API is not affected.
void toggle_overwrite_signal()
This signal is emitted if the user toggles from insert to overwrite mode or vice versa.
virtual void create(WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
Reimplemented for internal reasons, the API is not affected.
void insertText(TQTextStream *)
Insert text from the text stream into the edit widget.
void search()
Present a search dialog to the user.
void corrected(const TQString &originalword, const TQString &newword, unsigned int pos)
int currentColumn()
Retrieve the actual column number the cursor is on.
void selectFont()
Let the user select a font and set the font of the textwidget to that selected font.
bool repeatSearch()
Repeat the last search specified on the search dialog.
void saveText(TQTextStream *, bool softWrap)
Save text from the edit widget to a text stream.
void gotUrlDrop(TQDropEvent *e)
This signal is emitted if the user dropped a URL over the text editor TQMultiLineEdit widget.
void cleanWhiteSpace()
Clean up redundant whitespace from selected text.
void doGotoLine()
Present a "Goto Line" dialog to the user.
void spellcheck_start()
Start spellchecking mode.
void replace()
Present a Search and Replace Dialog to the user.
KEdit(TQWidget *_parent=NULL, const char *name=NULL)
The usual constructor.
TQPopupMenu * createPopupMenu(const TQPoint &pos)
int currentLine()
Retrieve the current line number.
void setOverwriteEnabled(bool b)
Allow the user to toggle between insert mode and overwrite mode with the "Insert" key.
A combobox for offering a history and completion.
const TDEShortcut & find()
const TDEShortcut & replace()