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

kutils

  • kutils
kreplace.h
1 /*
2  Copyright (C) 2001, S.R.Haque <srhaque@iee.org>.
3  Copyright (C) 2002, David Faure <david@mandrakesoft.com>
4  This file is part of the KDE project
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 version 2, as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KREPLACE_H
22 #define KREPLACE_H
23 
24 #include "kfind.h"
25 
26 class KReplaceNextDialog;
27 
97 class KUTILS_EXPORT KReplace :
98  public KFind
99 {
100  Q_OBJECT
101 
102 public:
103 
112  KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent = 0);
124  KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget* replaceDialog);
125 
129  virtual ~KReplace();
130 
138  int numReplacements() const { return m_replacements; }
139 
145  virtual void resetCounts();
146 
153  Result replace();
154 
163  KDialogBase* replaceNextDialog( bool create = false );
164 
170  void closeReplaceNextDialog();
171 
189  static int replace( TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength );
190 
207  static int replace( TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength );
208 
225  virtual bool shouldRestart( bool forceAsking = false, bool showNumMatches = true ) const;
226 
231  virtual void displayFinalDialog() const;
232 
233 signals:
234 
249  void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
250 
251 protected slots:
252 
253  void slotSkip();
254  void slotReplace();
255  void slotReplaceAll();
256 
257 private:
258  KReplaceNextDialog* dialog();
259  void doReplace();
260  static int replace( TQString &text, const TQString &replacement, int index, long options, int length );
261 
262  TQString m_replacement;
263  unsigned m_replacements;
264 
265  // Binary compatible extensibility.
266  class KReplacePrivate;
267  KReplacePrivate *d;
268 };
269 #endif

kutils

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

kutils

Skip menu "kutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kutils by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |