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

tdeutils

  • tdeutils
kfind.cpp
1 /*
2  Copyright (C) 2001, S.R.Haque <srhaque@iee.org>.
3  Copyright (C) 2002, David Faure <david@mandrakesoft.com>
4  Copyright (C) 2004, Arend van Beelen jr. <arend@auton.nl>
5  This file is part of the KDE project
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License version 2, as published by the Free Software Foundation.
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 
22 #include "kfind.h"
23 #include "kfinddialog.h"
24 #include <tdeapplication.h>
25 #include <tdelocale.h>
26 #include <tdemessagebox.h>
27 #include <tqlabel.h>
28 #include <tqregexp.h>
29 #include <tqstylesheet.h>
30 #include <tqguardedptr.h>
31 #include <tqptrvector.h>
32 #include <kdebug.h>
33 
34 //#define DEBUG_FIND
35 
36 #define INDEX_NOMATCH -1
37 
38 class KFindNextDialog : public KDialogBase
39 {
40 public:
41  KFindNextDialog(const TQString &pattern, TQWidget *parent);
42 };
43 
44 // Create the dialog.
45 KFindNextDialog::KFindNextDialog(const TQString &pattern, TQWidget *parent) :
46  KDialogBase(parent, 0, false, // non-modal!
47  i18n("Find Next"),
48  User1 | Close,
49  User1,
50  false,
51  KStdGuiItem::find())
52 {
53  setMainWidget( new TQLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
54 }
55 
57 
58 struct KFind::Private
59 {
60  Private() :
61  findDialog(0),
62  patternChanged(false),
63  matchedPattern(""),
64  incrementalPath(29, true),
65  emptyMatch(0),
66  currentId(0),
67  customIds(false)
68  {
69  incrementalPath.setAutoDelete(true);
70  data.setAutoDelete(true);
71  }
72 
73  ~Private()
74  {
75  delete emptyMatch;
76  emptyMatch = 0;
77  }
78 
79  struct Match
80  {
81  Match(int dataId, int index, int matchedLength) :
82  dataId(dataId),
83  index(index),
84  matchedLength(matchedLength)
85  { }
86 
87  int dataId;
88  int index;
89  int matchedLength;
90  };
91 
92  struct Data
93  {
94  Data() : id(-1), dirty(false) { }
95  Data(int id, const TQString &text, bool dirty = false) :
96  id(id),
97  text(text),
98  dirty(dirty)
99  { }
100 
101  int id;
102  TQString text;
103  bool dirty;
104  };
105 
106  TQGuardedPtr<TQWidget> findDialog;
107  bool patternChanged;
108  TQString matchedPattern;
109  TQDict<Match> incrementalPath;
110  Match * emptyMatch;
111  TQPtrVector<Data> data;
112  int currentId;
113  bool customIds;
114 };
115 
117 
118 KFind::KFind( const TQString &pattern, long options, TQWidget *parent )
119  : TQObject( parent )
120 {
121  d = new KFind::Private;
122  m_options = options;
123  init( pattern );
124 }
125 
126 KFind::KFind( const TQString &pattern, long options, TQWidget *parent, TQWidget *findDialog )
127  : TQObject( parent )
128 {
129  d = new KFind::Private;
130  d->findDialog = findDialog;
131  m_options = options;
132  init( pattern );
133 }
134 
135 void KFind::init( const TQString& pattern )
136 {
137  m_matches = 0;
138  m_pattern = pattern;
139  m_dialog = 0;
140  m_dialogClosed = false;
141  m_index = INDEX_NOMATCH;
142  m_lastResult = NoMatch;
143  if (m_options & KFindDialog::RegularExpression)
144  m_regExp = new TQRegExp(pattern, m_options & KFindDialog::CaseSensitive);
145  else {
146  m_regExp = 0;
147  }
148 }
149 
150 KFind::~KFind()
151 {
152  delete m_dialog;
153  delete d;
154 }
155 
156 bool KFind::needData() const
157 {
158  // always true when m_text is empty.
159  if (m_options & KFindDialog::FindBackwards)
160  // m_index==-1 and m_lastResult==Match means we haven't answered nomatch yet
161  // This is important in the "replace with a prompt" case.
162  return ( m_index < 0 && m_lastResult != Match );
163  else
164  // "index over length" test removed: we want to get a nomatch before we set data again
165  // This is important in the "replace with a prompt" case.
166  return m_index == INDEX_NOMATCH;
167 }
168 
169 void KFind::setData( const TQString& data, int startPos )
170 {
171  setData( -1, data, startPos );
172 }
173 
174 void KFind::setData( int id, const TQString& data, int startPos )
175 {
176  // cache the data for incremental find
177  if ( m_options & KFindDialog::FindIncremental )
178  {
179  if ( id != -1 )
180  d->customIds = true;
181  else
182  id = d->currentId + 1;
183 
184  if ( id >= (int) d->data.size() )
185  d->data.resize( id + 100 );
186 
187  d->data.insert( id, new Private::Data(id, data, true) );
188  }
189 
190  if ( !(m_options & KFindDialog::FindIncremental) || needData() )
191  {
192  m_text = data;
193 
194  if ( startPos != -1 )
195  m_index = startPos;
196  else if (m_options & KFindDialog::FindBackwards)
197  m_index = m_text.length();
198  else
199  m_index = 0;
200 #ifdef DEBUG_FIND
201  kdDebug() << "setData: '" << m_text << "' m_index=" << m_index << endl;
202 #endif
203  Q_ASSERT( m_index != INDEX_NOMATCH );
204  m_lastResult = NoMatch;
205 
206  d->currentId = id;
207  }
208 }
209 
210 KDialogBase* KFind::findNextDialog( bool create )
211 {
212  if ( !m_dialog && create )
213  {
214  m_dialog = new KFindNextDialog( m_pattern, parentWidget() );
215  connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotFindNext() ) );
216  connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
217  }
218  return m_dialog;
219 }
220 
221 KFind::Result KFind::find()
222 {
223  Q_ASSERT( m_index != INDEX_NOMATCH || d->patternChanged );
224 
225  if ( m_lastResult == Match && !d->patternChanged )
226  {
227  // Move on before looking for the next match, _if_ we just found a match
228  if (m_options & KFindDialog::FindBackwards) {
229  m_index--;
230  if ( m_index == -1 ) // don't call KFind::find with -1, it has a special meaning
231  {
232  m_lastResult = NoMatch;
233  return NoMatch;
234  }
235  } else
236  m_index++;
237  }
238  d->patternChanged = false;
239 
240  if ( m_options & KFindDialog::FindIncremental )
241  {
242  // if the current pattern is shorter than the matchedPattern we can
243  // probably look up the match in the incrementalPath
244  if ( m_pattern.length() < d->matchedPattern.length() )
245  {
246  Private::Match *match = m_pattern.isEmpty() ? d->emptyMatch : d->incrementalPath[m_pattern];
247  TQString previousPattern = d->matchedPattern;
248  d->matchedPattern = m_pattern;
249  if ( match != 0 )
250  {
251  bool clean = true;
252 
253  // find the first result backwards on the path that isn't dirty
254  while ( d->data[match->dataId]->dirty == true &&
255  !m_pattern.isEmpty() )
256  {
257  m_pattern.truncate( m_pattern.length() - 1 );
258 
259  match = d->incrementalPath[m_pattern];
260 
261  clean = false;
262  }
263 
264  // remove all matches that lie after the current match
265  while ( m_pattern.length() < previousPattern.length() )
266  {
267  d->incrementalPath.remove(previousPattern);
268  previousPattern.truncate(previousPattern.length() - 1);
269  }
270 
271  // set the current text, index, etc. to the found match
272  m_text = d->data[match->dataId]->text;
273  m_index = match->index;
274  m_matchedLength = match->matchedLength;
275  d->currentId = match->dataId;
276 
277  // if the result is clean we can return it now
278  if ( clean )
279  {
280  if ( d->customIds )
281  emit highlight(d->currentId, m_index, m_matchedLength);
282  else
283  emit highlight(m_text, m_index, m_matchedLength);
284 
285  m_lastResult = Match;
286  d->matchedPattern = m_pattern;
287  return Match;
288  }
289  }
290  // if we couldn't look up the match, the new pattern isn't a
291  // substring of the matchedPattern, so we start a new search
292  else
293  {
294  startNewIncrementalSearch();
295  }
296  }
297  // if the new pattern is longer than the matchedPattern we might be
298  // able to proceed from the last search
299  else if ( m_pattern.length() > d->matchedPattern.length() )
300  {
301  // continue from the previous pattern
302  if ( m_pattern.startsWith(d->matchedPattern) )
303  {
304  // we can't proceed from the previous position if the previous
305  // position already failed
306  if ( m_index == INDEX_NOMATCH )
307  return NoMatch;
308 
309  TQString temp = m_pattern;
310  m_pattern.truncate(d->matchedPattern.length() + 1);
311  d->matchedPattern = temp;
312  }
313  // start a new search
314  else
315  {
316  startNewIncrementalSearch();
317  }
318  }
319  // if the new pattern is as long as the matchedPattern, we reset if
320  // they are not equal
321  else if ( m_pattern != d->matchedPattern )
322  {
323  startNewIncrementalSearch();
324  }
325  }
326 
327 #ifdef DEBUG_FIND
328  kdDebug() << k_funcinfo << "m_index=" << m_index << endl;
329 #endif
330  do
331  {
332  // if we have multiple data blocks in our cache, walk through these
333  // blocks till we either searched all blocks or we find a match
334  do
335  {
336  // Find the next candidate match.
337  if ( m_options & KFindDialog::RegularExpression )
338  m_index = KFind::find(m_text, *m_regExp, m_index, m_options, &m_matchedLength);
339  else
340  m_index = KFind::find(m_text, m_pattern, m_index, m_options, &m_matchedLength);
341 
342  if ( m_options & KFindDialog::FindIncremental )
343  d->data[d->currentId]->dirty = false;
344 
345  if ( m_index == -1 && d->currentId < (int) d->data.count() - 1 )
346  {
347  m_text = d->data[++d->currentId]->text;
348 
349  if ( m_options & KFindDialog::FindBackwards )
350  m_index = m_text.length();
351  else
352  m_index = 0;
353  }
354  else
355  break;
356  } while ( !(m_options & KFindDialog::RegularExpression) );
357 
358  if ( m_index != -1 )
359  {
360  // Flexibility: the app can add more rules to validate a possible match
361  if ( validateMatch( m_text, m_index, m_matchedLength ) )
362  {
363  bool done = true;
364 
365  if ( m_options & KFindDialog::FindIncremental )
366  {
367  if ( m_pattern.isEmpty() ) {
368  delete d->emptyMatch;
369  d->emptyMatch = new Private::Match( d->currentId, m_index, m_matchedLength );
370  } else
371  d->incrementalPath.replace(m_pattern, new Private::Match(d->currentId, m_index, m_matchedLength));
372 
373  if ( m_pattern.length() < d->matchedPattern.length() )
374  {
375  m_pattern += d->matchedPattern.mid(m_pattern.length(), 1);
376  done = false;
377  }
378  }
379 
380  if ( done )
381  {
382  m_matches++;
383  // Tell the world about the match we found, in case someone wants to
384  // highlight it.
385  if ( d->customIds )
386  emit highlight(d->currentId, m_index, m_matchedLength);
387  else
388  emit highlight(m_text, m_index, m_matchedLength);
389 
390  if ( !m_dialogClosed )
391  findNextDialog(true)->show();
392 
393 #ifdef DEBUG_FIND
394  kdDebug() << k_funcinfo << "Match. Next m_index=" << m_index << endl;
395 #endif
396  m_lastResult = Match;
397  return Match;
398  }
399  }
400  else // Skip match
401  {
402  if (m_options & KFindDialog::FindBackwards)
403  m_index--;
404  else
405  m_index++;
406  }
407  }
408  else
409  {
410  if ( m_options & KFindDialog::FindIncremental )
411  {
412  TQString temp = m_pattern;
413  temp.truncate(temp.length() - 1);
414  m_pattern = d->matchedPattern;
415  d->matchedPattern = temp;
416  }
417 
418  m_index = INDEX_NOMATCH;
419  }
420  }
421  while (m_index != INDEX_NOMATCH);
422 
423 #ifdef DEBUG_FIND
424  kdDebug() << k_funcinfo << "NoMatch. m_index=" << m_index << endl;
425 #endif
426  m_lastResult = NoMatch;
427  return NoMatch;
428 }
429 
430 void KFind::startNewIncrementalSearch()
431 {
432  Private::Match *match = d->emptyMatch;
433  if(match == 0)
434  {
435  m_text = TQString::null;
436  m_index = 0;
437  d->currentId = 0;
438  }
439  else
440  {
441  m_text = d->data[match->dataId]->text;
442  m_index = match->index;
443  d->currentId = match->dataId;
444  }
445  m_matchedLength = 0;
446  d->incrementalPath.clear();
447  delete d->emptyMatch;
448  d->emptyMatch = 0;
449  d->matchedPattern = m_pattern;
450  m_pattern = TQString::null;
451 }
452 
453 // static
454 int KFind::find(const TQString &text, const TQString &pattern, int index, long options, int *matchedLength)
455 {
456  // Handle regular expressions in the appropriate way.
457  if (options & KFindDialog::RegularExpression)
458  {
459  TQRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
460 
461  return find(text, regExp, index, options, matchedLength);
462  }
463 
464  bool caseSensitive = (options & KFindDialog::CaseSensitive);
465 
466  if (options & KFindDialog::WholeWordsOnly)
467  {
468  if (options & KFindDialog::FindBackwards)
469  {
470  // Backward search, until the beginning of the line...
471  while (index >= 0)
472  {
473  // ...find the next match.
474  index = text.findRev(pattern, index, caseSensitive);
475  if (index == -1)
476  break;
477 
478  // Is the match delimited correctly?
479  *matchedLength = pattern.length();
480  if (isWholeWords(text, index, *matchedLength))
481  break;
482  index--;
483  }
484  }
485  else
486  {
487  // Forward search, until the end of the line...
488  while (index < (int)text.length())
489  {
490  // ...find the next match.
491  index = text.find(pattern, index, caseSensitive);
492  if (index == -1)
493  break;
494 
495  // Is the match delimited correctly?
496  *matchedLength = pattern.length();
497  if (isWholeWords(text, index, *matchedLength))
498  break;
499  index++;
500  }
501  if (index >= (int)text.length()) // end of line
502  index = -1; // not found
503  }
504  }
505  else
506  {
507  // Non-whole-word search.
508  if (options & KFindDialog::FindBackwards)
509  {
510  index = text.findRev(pattern, index, caseSensitive);
511  }
512  else
513  {
514  index = text.find(pattern, index, caseSensitive);
515  }
516  if (index != -1)
517  {
518  *matchedLength = pattern.length();
519  }
520  }
521  return index;
522 }
523 
524 // static
525 int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedLength)
526 {
527  if (options & KFindDialog::WholeWordsOnly)
528  {
529  if (options & KFindDialog::FindBackwards)
530  {
531  // Backward search, until the beginning of the line...
532  while (index >= 0)
533  {
534  // ...find the next match.
535  index = text.findRev(pattern, index);
536  if (index == -1)
537  break;
538 
539  // Is the match delimited correctly?
540  //pattern.match(text, index, matchedLength, false);
541  /*int pos =*/ pattern.search( text.mid(index) );
542  *matchedLength = pattern.matchedLength();
543  if (isWholeWords(text, index, *matchedLength))
544  break;
545  index--;
546  }
547  }
548  else
549  {
550  // Forward search, until the end of the line...
551  while (index < (int)text.length())
552  {
553  // ...find the next match.
554  index = text.find(pattern, index);
555  if (index == -1)
556  break;
557 
558  // Is the match delimited correctly?
559  //pattern.match(text, index, matchedLength, false);
560  /*int pos =*/ pattern.search( text.mid(index) );
561  *matchedLength = pattern.matchedLength();
562  if (isWholeWords(text, index, *matchedLength))
563  break;
564  index++;
565  }
566  if (index >= (int)text.length()) // end of line
567  index = -1; // not found
568  }
569  }
570  else
571  {
572  // Non-whole-word search.
573  if (options & KFindDialog::FindBackwards)
574  {
575  index = text.findRev(pattern, index);
576  }
577  else
578  {
579  index = text.find(pattern, index);
580  }
581  if (index != -1)
582  {
583  //pattern.match(text, index, matchedLength, false);
584  /*int pos =*/ pattern.search( text.mid(index) );
585  *matchedLength = pattern.matchedLength();
586  }
587  }
588  return index;
589 }
590 
591 bool KFind::isInWord(TQChar ch)
592 {
593  return ch.isLetter() || ch.isDigit() || ch == '_';
594 }
595 
596 bool KFind::isWholeWords(const TQString &text, int starts, int matchedLength)
597 {
598  if ((starts == 0) || (!isInWord(text[starts - 1])))
599  {
600  int ends = starts + matchedLength;
601 
602  if ((ends == (int)text.length()) || (!isInWord(text[ends])))
603  return true;
604  }
605  return false;
606 }
607 
608 void KFind::slotFindNext()
609 {
610  emit findNext();
611 }
612 
613 void KFind::slotDialogClosed()
614 {
615  emit dialogClosed();
616  m_dialogClosed = true;
617 }
618 
619 void KFind::displayFinalDialog() const
620 {
621  TQString message;
622  if ( numMatches() )
623  message = i18n( "1 match found.", "%n matches found.", numMatches() );
624  else
625  message = i18n("<qt>No matches found for '<b>%1</b>'.</qt>").arg(TQStyleSheet::escape(m_pattern));
626  KMessageBox::information(dialogsParent(), message);
627 }
628 
629 bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
630 {
631  // Only ask if we did a "find from cursor", otherwise it's pointless.
632  // Well, unless the user can modify the document during a search operation,
633  // hence the force boolean.
634  if ( !forceAsking && (m_options & KFindDialog::FromCursor) == 0 )
635  {
636  displayFinalDialog();
637  return false;
638  }
639  TQString message;
640  if ( showNumMatches )
641  {
642  if ( numMatches() )
643  message = i18n( "1 match found.", "%n matches found.", numMatches() );
644  else
645  message = i18n("No matches found for '<b>%1</b>'.").arg(TQStyleSheet::escape(m_pattern));
646  }
647  else
648  {
649  if ( m_options & KFindDialog::FindBackwards )
650  message = i18n( "Beginning of document reached." );
651  else
652  message = i18n( "End of document reached." );
653  }
654 
655  message += "<br><br>"; // can't be in the i18n() of the first if() because of the plural form.
656  // Hope this word puzzle is ok, it's a different sentence
657  message +=
658  ( m_options & KFindDialog::FindBackwards ) ?
659  i18n("Continue from the end?")
660  : i18n("Continue from the beginning?");
661 
662  int ret = KMessageBox::questionYesNo( dialogsParent(), TQString("<qt>")+message+TQString("</qt>"),
663  TQString::null, KStdGuiItem::cont(), KStdGuiItem::stop() );
664  bool yes = ( ret == KMessageBox::Yes );
665  if ( yes )
666  const_cast<KFind*>(this)->m_options &= ~KFindDialog::FromCursor; // clear FromCursor option
667  return yes;
668 }
669 
670 void KFind::setOptions( long options )
671 {
672  m_options = options;
673 
674  delete m_regExp;
675  if (m_options & KFindDialog::RegularExpression)
676  m_regExp = new TQRegExp(m_pattern, m_options & KFindDialog::CaseSensitive);
677  else
678  m_regExp = 0;
679 }
680 
681 void KFind::closeFindNextDialog()
682 {
683  delete m_dialog;
684  m_dialog = 0L;
685  m_dialogClosed = true;
686 }
687 
688 int KFind::index() const
689 {
690  return m_index;
691 }
692 
693 void KFind::setPattern( const TQString& pattern )
694 {
695  if ( m_options & KFindDialog::FindIncremental && m_pattern != pattern )
696  d->patternChanged = true;
697 
698  m_pattern = pattern;
699  setOptions( options() ); // rebuild m_regExp if necessary
700 }
701 
702 TQWidget* KFind::dialogsParent() const
703 {
704  // If the find dialog is still up, it should get the focus when closing a message box
705  // Otherwise, maybe the "find next?" dialog is up
706  // Otherwise, the "view" is the parent.
707  return d->findDialog ? (TQWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
708 }
709 
710 #include "kfind.moc"
KFind::~KFind
virtual ~KFind()
Destructor.
Definition: kfind.cpp:150
KFind::index
int index() const
Definition: kfind.cpp:688
KMessageBox::questionYesNo
static int questionYesNo(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontAskAgainName=TQString::null, int options=Notify)
KFind::find
Result find()
Walk the text fragment (e.g.
Definition: kfind.cpp:221
KFind::Match
A match was found.
Definition: kfind.h:142
KStdGuiItem::stop
static KGuiItem stop()
KFind::NoMatch
No match was found.
Definition: kfind.h:141
KFind::setOptions
virtual void setOptions(long options)
Set new options.
Definition: kfind.cpp:670
kdDebug
kdbgstream kdDebug(int area=0)
KStdGuiItem::cont
static KGuiItem cont()
KFind::validateMatch
virtual bool validateMatch(const TQString &text, int index, int matchedlength)
Virtual method, which allows applications to add extra checks for validating a candidate match...
Definition: kfind.h:244
KFindDialog::RegularExpression
Interpret the pattern as a regular expression.
Definition: kfinddialog.h:94
KDialogBase
KFind::highlight
void highlight(const TQString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
KFind::setPattern
void setPattern(const TQString &pattern)
Change the pattern we're looking for.
Definition: kfind.cpp:693
tdelocale.h
KFind::displayFinalDialog
virtual void displayFinalDialog() const
Displays the final dialog saying "no match was found", if that was the case.
Definition: kfind.cpp:619
KMessageBox::information
static void information(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const TQString &dontShowAgainName=TQString::null, int options=Notify)
KFind::numMatches
int numMatches() const
Return the number of matches found (i.e.
Definition: kfind.h:224
KFind::findNextDialog
KDialogBase * findNextDialog(bool create=false)
Return (or create) the dialog that shows the "find next?" prompt.
Definition: kfind.cpp:210
TDEStdAccel::find
const TDEShortcut & find()
KFind
A generic implementation of the "find" function.
Definition: kfind.h:103
KFind::Result
Result
Result enum.
Definition: kfind.h:140
KFind::shouldRestart
virtual bool shouldRestart(bool forceAsking=false, bool showNumMatches=true) const
Returns true if we should restart the search from scratch.
Definition: kfind.cpp:629
KFindDialog::FindBackwards
Go backwards.
Definition: kfinddialog.h:93
KFindDialog::WholeWordsOnly
Match whole words only.
Definition: kfinddialog.h:89
KFind::closeFindNextDialog
void closeFindNextDialog()
Close the "find next?" dialog.
Definition: kfind.cpp:681
KFindDialog::CaseSensitive
Consider case when matching.
Definition: kfinddialog.h:92
KFind::KFind
KFind(const TQString &pattern, long options, TQWidget *parent)
Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog...
Definition: kfind.cpp:118
KFindDialog::FromCursor
Start from current cursor position.
Definition: kfinddialog.h:90
KFind::options
long options() const
Return the current options.
Definition: kfind.h:196
endl
kndbgstream & endl(kndbgstream &s)
KStdGuiItem
KFind::needData
bool needData() const
Definition: kfind.cpp:156
KFind::dialogClosed
void dialogClosed()
Emitted when the 'find next' dialog is being closed.
KFind::setData
void setData(const TQString &data, int startPos=-1)
Call this when needData returns true, before calling find().
Definition: kfind.cpp:169
KFindDialog::FindIncremental
Find incremental.
Definition: kfinddialog.h:95
KFind::pattern
TQString pattern() const
Definition: kfind.h:209

tdeutils

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

tdeutils

Skip menu "tdeutils"
  • 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 tdeutils by doxygen 1.8.8
This website is maintained by Timothy Pearson.