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

tdeui

  • tdeui
keditcl.h
1 /* This file is part of the KDE libraries
2 
3  Copyright (C) 1996 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
4  Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 #ifndef __KEDITCL_H__
22 #define __KEDITCL_H__
23 
24 #include <tqmultilineedit.h>
25 #include <tqstring.h>
26 #include <kdialogbase.h>
27 
28 class TQDropEvent;
29 class TQPushButton;
30 class TQCheckBox;
31 class TQRadioButton;
32 class TQTextStream;
33 class KHistoryCombo;
34 class KIntNumInput;
35 class TQVButtonGroup;
36 
37 class TDEUI_EXPORT KEdGotoLine : public KDialogBase
38 {
39  Q_OBJECT
40 
41 public:
42  KEdGotoLine( TQWidget *parent=0, const char *name=0, bool modal=true );
43  int getLineNumber();
44 
45 public slots:
46  void selected( int );
47 
48 private:
49  KIntNumInput *lineNum;
50 
51 protected:
52  virtual void virtual_hook( int id, void* data );
53 private:
54  class KEdGotoLinePrivate;
55  KEdGotoLinePrivate *d;
56 };
57 
59 class TDEUI_EXPORT KEdFind : public KDialogBase
60 {
61  Q_OBJECT
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 )
65 public:
66 
67  KEdFind( TQWidget *parent = 0, const char *name=0, bool modal=true);
68  ~KEdFind();
69 
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;
76 
81  KHistoryCombo *searchCombo() const;
82 
83 protected slots:
84  void slotCancel( void );
85  void slotUser1( void );
86  void textSearchChanged ( const TQString & );
87 
88 protected:
89  TQVButtonGroup* group;
90 
91 private:
92  TQCheckBox *sensitive;
93  TQCheckBox *direction;
94 
95  virtual void done(int i ) { KDialogBase::done(i); }
96 
97 signals:
98 
99  void search();
100  void done();
101 protected:
102  virtual void virtual_hook( int id, void* data );
103 private:
104  class KEdFindPrivate;
105  KEdFindPrivate *d;
106 };
107 
109 class TDEUI_EXPORT KEdReplace : public KDialogBase
110 {
111  Q_OBJECT
112 
113 public:
114 
115  KEdReplace ( TQWidget *parent = 0, const char *name=0, bool modal=true );
116  ~KEdReplace();
117 
118  TQString getText();
119  TQString getReplaceText();
120  void setText(TQString);
121 
126  KHistoryCombo *searchCombo() const;
127 
132  KHistoryCombo *replaceCombo() const;
133 
134  bool case_sensitive();
135  bool get_direction();
136 
137 protected slots:
138  void slotCancel( void );
139  void slotClose( void );
140  void slotUser1( void );
141  void slotUser2( void );
142  void slotUser3( void );
143  void textSearchChanged ( const TQString & );
144 
145 private:
146  TQCheckBox *sensitive;
147  TQCheckBox *direction;
148 
149  virtual void done(int i ) { KDialogBase::done(i); }
150 
151 signals:
152  void replace();
153  void find();
154  void replaceAll();
155  void done();
156 protected:
157  virtual void virtual_hook( int id, void* data );
158 private:
159  class KEdReplacePrivate;
160  KEdReplacePrivate *d;
161 };
162 
163 
171 class TDEUI_EXPORT_DEPRECATED KEdit : public TQMultiLineEdit
172 {
173  Q_OBJECT
174 
175 public:
179  KEdit (TQWidget *_parent=NULL, const char *name=NULL);
180 
181  ~KEdit();
182 
187  enum { NONE,
188  FORWARD,
189  BACKWARD };
193  void insertText(TQTextStream *);
194 
201  void saveText(TQTextStream *, bool softWrap);
202  void saveText(TQTextStream *); // KDE 4.0: remove
203 
208  void selectFont();
209 
213  void search();
214 
223  bool repeatSearch();
224 
228  void replace();
229 
233  void doGotoLine();
234 
238  void cleanWhiteSpace();
239 
245  void installRBPopup( TQPopupMenu* );
246 
252  int currentLine();
253 
263  int currentColumn();
264 
265 
269  void spellcheck_start();
270 
274  void spellcheck_stop();
275 
282  void setOverwriteEnabled(bool b);
283 
284  TQString selectWordUnderCursor();
285 
287  TQPopupMenu *createPopupMenu( const TQPoint& pos );
288 
289  void setAutoUpdate(bool b);
290 
291 signals:
298  void gotUrlDrop(TQDropEvent* e);
299 
305  void CursorPositionChanged();
306 
316  void toggle_overwrite_signal();
317 
318 public slots:
322  void corrected (const TQString &originalword, const TQString &newword, unsigned int pos);
326  void misspelling (const TQString &word, const TQStringList &, unsigned int pos);
327 private slots:
328 
333  void search_slot();
334 
338  void searchdone_slot();
339 
343  void replace_slot();
344 
348  void replace_all_slot();
349 
353  void replace_search_slot();
354 
358  void replacedone_slot();
359 
363  void slotCursorPositionChanged();
364 
365 protected:
366  void computePosition();
367  int doSearch(TQString s_pattern, bool case_sensitive,
368  bool regex, bool forward,int line, int col);
369 
370  int doReplace(TQString s_pattern, bool case_sensitive,
371  bool regex, bool forward,int line, int col,bool replace);
372 
376  void posToRowCol(unsigned int pos, unsigned int &line, unsigned int &col);
377 
381  virtual void create( WId = 0, bool initializeWindow = true,
382  bool destroyOldWindow = true );
383 
387  virtual void ensureCursorVisible();
388  virtual void setCursor( const TQCursor & );
389  virtual void viewportPaintEvent( TQPaintEvent* );
390 
391 protected:
392 
393  void keyPressEvent ( TQKeyEvent * );
394 
395  // DnD interface
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);
402 
403 private:
404  TQTimer* repaintTimer;
405 
406  QString killbufferstring;
407  TQWidget *parent;
408  KEdFind *srchdialog;
409  KEdReplace *replace_dialog;
410  KEdGotoLine *gotodialog;
411 
412  TQString pattern;
413 
414  bool can_replace;
415  bool killing;
416  bool killtrue;
417  bool lastwasanewline;
418  bool saved_readonlystate;
419  int last_search;
420  int last_replace;
421  int replace_all_line;
422  int replace_all_col;
423 
424  int line_pos, col_pos;
425  bool fill_column_is_set;
426  bool word_wrap_is_set;
427  int fill_column_value;
428 
429 protected:
430  virtual void virtual_hook( int id, void* data );
431 private:
432  class KEditPrivate;
433  KEditPrivate *d;
434 };
435 
436 #endif
KDialogBase
A dialog base class with standard buttons and predefined layouts.
Definition: kdialogbase.h:191
KEdit
A simple text editor for the KDE project.
Definition: keditcl.h:171
TDEStdAccel::find
const TDEShortcut & find()
TDEStdAccel::replace
const TDEShortcut & replace()
KDialogBase::slotUser1
virtual void slotUser1()
Activated when the User1 button has been clicked.
Definition: kdialogbase.cpp:1195
KDialogBase::slotCancel
virtual void slotCancel()
Activated when the Cancel button has been clicked.
Definition: kdialogbase.cpp:1215
KDialogBase::slotClose
virtual void slotClose()
Activated when the Close button has been clicked.
Definition: kdialogbase.cpp:1222
KDialogBase::slotUser3
virtual void slotUser3()
Activated when the User3 button has been clicked.
Definition: kdialogbase.cpp:1183
KHistoryCombo
A combobox for offering a history and completion.
Definition: kcombobox.h:540
KDialogBase::slotUser2
virtual void slotUser2()
Activated when the User2 button has been clicked.
Definition: kdialogbase.cpp:1189
KIntNumInput
An input widget for integer numbers, consisting of a spinbox and a slider.
Definition: knuminput.h:188

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.