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

tdeutils

  • tdeutils
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
26class KReplaceNextDialog;
27
97class TDEUTILS_EXPORT KReplace :
98 public KFind
99{
100 TQ_OBJECT
101
102public:
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
233signals:
234
249 void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
250
251protected slots:
252
253 void slotSkip();
254 void slotReplace();
255 void slotReplaceAll();
256
257private:
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
KDialogBase
KFind
A generic implementation of the "find" function.
Definition: kfind.h:105
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
KFind::displayFinalDialog
virtual void displayFinalDialog() const
Displays the final dialog saying "no match was found", if that was the case.
Definition: kfind.cpp:619
KFind::resetCounts
virtual void resetCounts()
Call this to reset the numMatches count (and the numReplacements count for a KReplace).
Definition: kfind.h:232
KReplace
A generic implementation of the "replace" function.
Definition: kreplace.h:99
KReplace::replace
void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength)
Connect to this slot to implement updating of replaced text during the replace operation.
KReplace::numReplacements
int numReplacements() const
Return the number of replacements made (i.e.
Definition: kreplace.h:138

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
  • 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 tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.