• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • findreplace
kreplace.h
Go to the documentation of this file.
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 class KReplacePrivate;
28 
96 class KDEUI_EXPORT KReplace :
97  public KFind
98 {
99  Q_OBJECT
100 
101 public:
102 
107  KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent = 0);
114  KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent, QWidget* replaceDialog);
115 
116  virtual ~KReplace();
117 
124  int numReplacements() const;
125 
131  virtual void resetCounts();
132 
138  Result replace();
139 
147  KDialog* replaceNextDialog( bool create = false );
148 
154  void closeReplaceNextDialog();
155 
173  static int replace( QString &text, const QString &pattern, const QString &replacement, int index, long options, int *replacedLength );
174  static int replace( QString &text, const QRegExp &pattern, const QString &replacement, int index, long options, int *replacedLength );
175 
190  virtual bool shouldRestart( bool forceAsking = false, bool showNumMatches = true ) const;
191 
196  virtual void displayFinalDialog() const;
197 
198 Q_SIGNALS:
199 
214  void replace(const QString &text, int replacementIndex, int replacedLength, int matchedLength);
215 
216 private:
217  friend class KReplacePrivate;
218  KReplacePrivate * const d;
219 
220  Q_PRIVATE_SLOT( d, void _k_slotSkip() )
221  Q_PRIVATE_SLOT( d, void _k_slotReplace() )
222  Q_PRIVATE_SLOT( d, void _k_slotReplaceAll() )
223 };
224 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:49:40 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal